/FrostSharp

Unofficial C# wrapper for @poetapp's Frost API.

Primary LanguageC#

FrostSharp

NuGet version

.NET Core library wrapping po.et's Frost API.

Updated for Frost API v0.1

Usage

Install:

dotnet add package FrostSharp

or

Install-Package FrostSharp

Examples:

// Your api key
string APIKey = "your api key here";

// Create a Frost configuration with all default values (should work for most people)
var Config = new Configuration();

// do we want all HTTP request logging to stdout (mostly useful for testing)
bool logging = false;

// Create the client we will use.
var client = new Frost(APIKey, Config, logging);

// Create a work (Work name, date created, date published, author name, work content)
WorkAttributes myWork = new WorkAttribute("Work Name", DateTime.UtcNow, DateTime.UtcNow, "Alec Chan", "This is the content of the work");

// Post the work onto the po.et network (runs asynchronously)
string myWorkId = await client.CreateWork(myWork);

// Look up a work by work ID
WorkAttributes thisIsTheSameWorkWeJustPosted = await client.GetWork(myWorkId);

// Get all the works that your API key has posted
List<WorkAttributes> listOfWorks = await client.GetAllWorks();

Development

Building library: cd FrostSharp && dotnet build

Running tests: cd FrostSharp.Tests && dotnet test

To contribute:

  • Clone this repo
  • Create an integration branch (e.g. -integration)
  • Make changes
  • Submit a pull request to pull changes into master