/SkilljarApi

A .Net client for the Skilljar API

Primary LanguageC#Apache License 2.0Apache-2.0

SkilljarApi - Skilljar API Client Library for .NET

A quick attempt to create a API client for the Skilljar LMS API. For more information and how to get started with the Skilljar API, see this help article.

Note: this library is incomplete. See table below for status of each object defined in the Skilljar API.

API Object Status
assets Complete
courses Complete
domains In Process
group-categories
groups
ilt-instructors
ilt-multi-session-events
ilt-sessions
lesson-progress
lessons
offers
paths
ping Complete
progresstokens
promo-code-pools
promo-codes
purchases
question-banks
quiz-questions
quizzes
training-credit-codes
users
vilt-session-events
vilt-session-registrations
web-packages
webhooks

Icons Provided by Icons8

Example Usage

To get started, the Skilljar API client requires an HttpClient object that has been created with the API Base Address and Authentication Header:

var authString = Convert.ToBase64String(Encoding.UTF8.GetBytes(apiKey));

HttpClient httpClient = new()
{
    BaseAddress = new Uri("https://api.skilljar.com/v1/"),
    Timeout = new TimeSpan(0,0,30)
};

httpClient.DefaultRequestHeaders.Clear();
httpClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", authString);

After creating your HttpClient instance, you can pass it to your SkilljarApiClient and begin working with the supported API calls:

Domain

Get a list of domains for your skilljar instance

var client = new SkilljarApiClient(httpClient);
var domainList = await client.Domains.ListAllAsync();

List all Published Courses for a particular domain

var client = new SkilljarApiClient(httpClient);
var publishedCourses = await client.Domains.PublishedCourses.ListAllAsync("your-domain-name");

Courses

Read details of a specific course

var client = new SkilljarApiClient(httpClient);
var publishedCourses = await client.Courses.ReadAsync("your-course-id");