Skip to content

veleek/sesame-net

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Sesame.NET

A .NET client for the Sesame API. Sesame.NET is licensed under the MIT license.

Installation

You can either download the Sesame.NET NuGet package or download the binaries directly from GitHub.

Usage

  1. Configure a Sesame API Key on the CandyHouse Dashboard.

  2. Initialize an instance of SesameClient.

    string apiKey = "<Sesame API Key>";
    SesameClient client = new SesameClient(apiKey);
  3. Make other calls to list or control sesames.

    // Get ALL Sesames associated with the account.
    List<Sesames> sesames = await client.ListSesamesAsync();
    
    // Get a specific sesame and refresh it's state.
    Sesame sesame = sesames.FirstOrDefault(s => s.NickName == "Home");
    await sesame.RefreshAsync();
    
    // Execute operations.
    await sesame.LockAsync();
    await sesame.UnlockAsync();

Building

Sesame.NET is built using .NET Core (.NET Standard 1.4 and 2.0).

  1. Install .NET Core

  2. Clone the Sesame.NET repository

  3. Restore all of the NuGet packages for the project and build it

     dotnet restore
     dotnet build
    
  4. (Optional) You can generate a NuGet package using the pack command

     dotnet pack Sesame
     # To build release package
     #   dotnet pack Sesame -c Release