NET

NET

Overview

Our open source C# client provides a simple way to invoke the API from C#.

Installation

You can download the C# API from /clients/csharp-api-client.zip and include it in your project.

Depencencies: https://github.com/mgholam/fastJSON

Initialization

You need to put following classes in your application and initialise the API class with your Host URL and Api Key:

Api.cs
ApiException.cs
Api api_client = new Api("http://example.com", "YOUR API KEY");

Exception Handling

All of the exceptions raised within the API object are encapsulated into an ApiException exception. You can easily make a separation between your exceptions and between Api thrown exceptions.

try{
  // api_client...
} catch (ApiException e){
  // handle exception
}

API Methods

Return                      | Method       | Input 
value                       | signature    | params

int                         GetVersion()
bool                        IsAuthenticated(string username, string password)
Dictionary  GetMyAccount()
List                GetAllUsers()
List                GetUsersWithIds(int[] user_ids)
List                GetUsersThatMatch(Dictionary queryParamsDict)
Dictionary  AddUser(Dictionary queryParamsDict)
int                         ArchiveStudents(int[] student_ids)
int                         ReactivateStudents(int[] student_ids)
List                GetAllClasses()
List                GetArchivedClasses()
List                GetClassesWithIDs(int[] class_ids)
List                GetClassesThatMatch(Dictionary queryParamsDict)List                GetClassesForOrganization(int organization_id, int page)Dictionary  AddClass(Dictionary queryParamsDict)int                         ArchiveClasses(int[] class_ids)int                         ReactivateClasses(int[] class_ids)void                        DeleteClasses(int[] class_ids)void                        RestoreClasses(int[] class_ids)List                GetAllClassTemplates(int page)List                GetClassTemplatesWithIDs(int[] class_ids)List                GetClassTemplatesThatMatch(Dictionary queryParamsDict, int page)List                GetClassTemplatesForOrganization(int organization_id, int page)void                        DeleteClassTemplates(int[] class_ids)void                        RestoreClassTemplates(int[] class_ids)List                GetClassesTaughtBy(int user_id)
List                GetClassesEnrolledBy(int user_id)
List                GetTeachersForClass(int class_id)int                         AddTeachersToClass(int class_id, int[] user_ids)int                         RemoveTeachersFromClass(int class_id, int[] user_ids)List                GetClassesTaughtBy(int user_id)List                GetClassesEnrolledBy(int user_id)List                GetStudentsForClass(int class_id)
int                         AddStudentsToClass(int class_id, int[] user_ids)
int                         RemoveStudentsFromClass(int class_id, int[] user_ids)List                GetStatusOfClasses(int user_id)
List                GetAllGroups()
List                GetGroupsWithIds(int[] group_ids)
List                GetGroupsThatMatch(Dictionary queryParamsDict)Dictionary  AddGroup(Dictionary queryParamsDict)Dictionary  EditGroup(int group_id, Dictionary queryParamsDict)void                        DeleteGroups(int[] group_ids)List                GetMembersForGroup(int group_id)void                        AddMembersToGroup(int group_id, int[] user_ids)void                        RemoveMembersFromGroup(int group_id, int[] user_ids)
List                GetAdminsForGroup(int group_id)
void                        AddAdminsToGroup(int group_id, int[] user_ids)
void                        RemoveAdminsFromGroup(int group_id, int[] user_ids)List                GetGroupsWithMember(int user_id)
List                GetGroupsWithAdmin(int user_id)List                GetResources(Dictionary queryParamsDict, int page)List                GetAllOrganizations(int page)List                GetOrganizationsWithIds(int[] organization_ids)Dictionary  AddOrganization(Dictionary queryParamsDict)Dictionary  EditOrganization(int organization_id, Dictionary queryParamsDict)void                        DeleteOrganizations(int[] organization_ids)List                GetAllPaths(int page)List                GetPathsWithIds(int[] path_ids)List                GetAdminsForPath(int path_id)List                GetStudentsForPath(int path_id)int                         AddStudentsToPath(int path_id, int[] user_ids)int                         RemoveStudentsFromPath(int path_id, int[] user_ids)List                GetAllCertificates()List                GetCertificatesWithIds(int[] certificate_ids)List                GetAllCurricula()List                GetCurriculaWithIds(int[] curriculum_ids)List                GetProficienciesForCurriculum(int curriculum_id)List                GetLessonsForClass(int class_id)
List                GetAssignmentsForClass(int class_id)
List                GetGradesForClass(int class_id)List                GetGradesForUser(int user_id)
Dictionary  SetGradesForAssignment(int assignment_id, Dictionary[] grades)
List                GetAllCertificates() 
List                GetCertificatesWithIds(int[] certificate_ids)
List                GetSessionDetails(int[] user_ids)
List                GetClassReport(int class_id, Dictionary conditions)
List                GetAllAttendance(int class_id)
List                GetAttendance(int class_id, DateTime date_and_time)
int                         PostClassAnnouncement(int class_id, string message, Dictionary options)
int                         PostClassMessage(int class_id, string message, Dictionary options)
int                         PostGroupAnnouncement(int group_id, string message, Dictionary options)
int                         PostGroupMessage(int group_id, string message, Dictionary options)
int                         PostSiteAnnouncement(string message, Dictionary options)
int                         PostSiteMessage(string message, Dictionary options)List                GetGamesForSite()List                GetGamesForClass(int class_id)List                GetStatusForAllPlayers(int game_id)List                GetStatusForPlayers(int game_id, int[] user_ids)List                GetSessionDetails(int[] user_ids)List                GetClassReport(int class_id, Dictionary conditions)
    • Related Articles

    • API 3.0

      Introduction Welcome to the help area for API 3.0, the third generation of our Application Programming Interface. API 3.0 implements RESTFUL best practices whenever possible, and includes an OpenAPI 3.0.2 specification so that it can be easily ...
    • Java

      Overview Our open source Java client provides a simple way to invoke the API from Java. Installation You can download the Java API from/clients/java-api-client.zip and include it in your project. Dependencies: http://unirest.io/java.html and ...
    • Javascript

      Overview Our open source Javascript client provides a simple way to invoke the API from Javascript. To download the Javascript client, right-click /javascripts/lms_api.js and the save the contents to your local computer. The Javascript client is ...
    • PHP

      Overview Our open source PHP client provides a simple way to invoke the API from PHP. To download the PHP client, right-click /clients/lms_api.php and then save the contents to your local computer. Example: code The following example lists all the ...
    • Ruby

      Our open source Ruby client provides a simple way to invoke the API from Ruby. Overview To download the Ruby client, right-click /clients/lms_api.rb and the save the contents to your local computer. Example: code The following example lists all the ...