cw31362

I've built a new C#.NET library for REST APIs

Discussion created by cw31362 on Jan 16, 2019
Latest reply on Jan 16, 2019 by Alberto Ruiz

I've ported my NodeJS library bb-rest to C#.NET and made some improvements. Thankfully, we are past the dark days of callback hell -- we can now use the await syntax like sane people! It also supports all versions of the API instead of just v1. For instance, updating a course's name via this library might look like this:

 

using BBREST;

string key = "myApplicationKey";
string secret = "myApplicationSecret";
string origin = "https://myproductionsite.com";

var mySchool = new RestApp(origin, key, secret);
var response = await mySchool.Request("PATCH", "v1/courses/_2353_1", @"{""name"":""New Course Name""}");
Console.WriteLine(await response.ReadContentAsync());

 

It doesn't have a README yet, but I'm actively working on improving this library so I'm certainly open to suggestions. I hope some of you find it useful! You can find it here: GitHub - C-Weinstein/BBREST.NET

Outcomes