Yonoma 1.1.4

dotnet add package Yonoma --version 1.1.4
                    
NuGet\Install-Package Yonoma -Version 1.1.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Yonoma" Version="1.1.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Yonoma" Version="1.1.4" />
                    
Directory.Packages.props
<PackageReference Include="Yonoma" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Yonoma --version 1.1.4
                    
#r "nuget: Yonoma, 1.1.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Yonoma&version=1.1.4
                    
Install Yonoma as a Cake Addin
#tool nuget:?package=Yonoma&version=1.1.4
                    
Install Yonoma as a Cake Tool

Yonoma .NET SDK

Introduction

Yonoma .NET SDK provides a simple way to interact with the Yonoma API for managing lists, tags, contacts, and email sending.

Installation

dotnet add package Yonoma --version 1.1.4

Table of Contents

Authentication

To use the Yonoma API, initialize the client with your API key:

var Yonoma = new Yonoma("YOUR-API-KEY");

Usage

Lists

Create a List
var response = await Yonoma.Lists.Create('list_name':'New group');
Console.WriteLine(response);
Get a list of Lists
var response = await Yonoma.Lists.Lists();
Console.WriteLine(response);
Retrieve a specific list
var response = await Yonoma.Lists.Retrieve("list_id");
Console.WriteLine(response);
Update a List
var response = await Yonoma.Lists.Update("list_id", {
    'list_name': 'Upadated list name'
});
Console.WriteLine(response);
Delete a List
var response = await Yonoma.Lists.Delete("list_id");
Console.WriteLine(response);

Tags

Create a Tag
var response = await Yonoma.Tags.Create({'tag_name': 'New tag'});
Console.WriteLine(response);
Get a list of tags
var response = await Yonoma.Tags.List();
Console.WriteLine(response);
Retrieve a specific tag
var response = await Yonoma.Tags.Retrieve("tag_id");
Console.WriteLine(response);
Update a Tag
var response = await Yonoma.Tags.Update("tag_id", {
    'tag_name': 'Updated Tag Name'
});
Console.WriteLine(response);
Delete a Tag
var response = await Yonoma.Tags.Delete("tag_id");
Console.WriteLine(response);

Contacts

Create a Contact
var response = await Yonoma.Contacts.Create("list_id", {
    email: "email@example.com",
    status: "Subscribed" | "Unsubscribed",
    data: {
        firstName: string,
        lastName: string,
        phone: string,
        gender: string,
        address: string,
        city: string,
        state: string,
        country: string,
        zipcode: string,
    }
});
Console.WriteLine(response);
Unsubscribe a Contact
var response = await Yonoma.Contacts.Update("list_id", "contact_id", {
    'status': "Subscribed" | "Unsubscribed" 
});
Console.WriteLine(response);
Add Tag to a Contact
var response = await Yonoma.Contacts.AddTag("contact_id", {
    'tag_id': 'Tag id'
});
Console.WriteLine(response);
Remove Tag from a Contact
var response = await Yonoma.Contacts.RemoveTag("contact_id", {
    'tag_id': 'Tag id'
});
Console.WriteLine(response);

Sending Emails

Send an Email
var response = await Yonoma.Email.SendEmail({
   'from_email': 'updates@yonoma.io',
    'to_email': 'email@yourdomain.com',
    'subject':"Welcome to Yonoma - You're In!",
    'mail_template': "We're excited to welcome you to Yonoma! Your successful signup marks the beginning of what we hope will be an exceptional journey."
});
Console.WriteLine(response);

Error Handling

Each API call returns a response object that contains success or error messages. Handle errors using:

try
{
    var response = Yonoma.Lists.Create("Existing List");
    Console.WriteLine(response);
}
catch (Exception ex)
{
    Console.WriteLine("Error: " + ex.Message);
}

License

This project is licensed under the MIT License. See LICENSE for details.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.4 135 25 days ago