Skip to content

cstlex/Cobalt-iOS-SDK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cobalt-iOS-SDK

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

About

Unofficial Cobalt iOS SDK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published