Unofficial Coblat iOS SDK
##Setup
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[MSCobaltKit setApiKey:@"YOUR-COBALT-KEY"]
//Only when you do self hosting
[MSCobaltKit setBaseUrl:@"BASE-URL"]
}
##Usage
[MSCCourseKit getCourseListWithSkip:0 limit:20 sort:@[@"+department"] success:^(NSArray *response){
//Use array of MSCCourse object
} error:^(NSError *error){
NSLog(@"%@", error);
}];
[MSCCourseKit searchWithQuery:@"Introduction" skip:0 limit:200 sort:@[@"+department"] success^(NSArray *response){
//Use array of MSCCourse object
} error:^(NSError *error){
NSLog(@"%@", error);
}];
Correspond to courses/show/:id
MSCCourse *course = [MSCCourse objectWithCourseId:@"CSC148H1F20159"];
[course fetchIfNeededInBackgroundWithCompletion:^(NSError *error){
if (error) {
NSLog(@"%@", error);
} else {
//Use course instance
}
}];
##Unimplemented Parts Currently Building and filter of Course is not implemented but will be implemented soon