Skip to content

tk26/courier-csharp

Repository files navigation

Com.Courier - the C# library for the Courier API Reference

The Courier REST API.

This C# SDK is automatically generated by the OpenAPI Generator project:

  • API version: 0.0.4

Dependencies

The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:

Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
Install-Package System.ComponentModel.Annotations

NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742. NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See RestSharp#1406.

Installation

TO BE UPDATED

Usage

TO BE UPDATED

Getting Started

using System.Collections.Generic;
using System.Diagnostics;
using Com.Courier.Api;
using Com.Courier.Client;
using Com.Courier.Model;

namespace Example
{
    public class Example
    {
        public static void Main()
        {

            Configuration config = new Configuration();
            config.BasePath = "https://api.courier.com";
            // Configure HTTP basic authorization: basicAuth
            config.Username = "YOUR_USERNAME";
            config.Password = "YOUR_PASSWORD";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new MessagesAPIApi(config);
            var messageId = messageId_example;  // string | A unique identifier associated with the message you wish to retrieve (results from a send). (default to "1-5e2b2615-05efbb3acab9172f88dd3f6f")

            try
            {
                // GET /messages/{message_id}
                Object result = apiInstance.GetMessageById(messageId);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling MessagesAPIApi.GetMessageById: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }

        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://api.courier.com

Class Method HTTP request Description
MessagesAPIApi GetMessageById GET /messages/{message_id} GET /messages/{message_id}
MessagesAPIApi GetMessageHistoryById GET /messages/{message_id}/history GET /messages/{message_id}/history
MessagesAPIApi GetMessageOutput GET /messages/{message_id}/output GET /messages/{message_id}/output
MessagesAPIApi GetMessages GET /messages GET /messages
SendAPIApi SendPost POST /send POST /send

Documentation for Models

Documentation for Authorization

basicAuth

  • Type: HTTP basic authentication

bearerAuth

  • Type: Bearer Authentication

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages