Highlights are a more fluent API to create pipes,stores and authModules as well as using configuration objects!
Get it from the CocoaPods repo!
// NSURL object:
NSURL* serverURL = [NSURL URLWithString:@"http://todo-aerogear.rhcloud.com/todo-server/"];
// create the 'todo' pipeline, which points to the baseURL of the REST application
AGPipeline* todo = [AGPipeline pipeline:serverURL];
// Add a REST pipe for the 'projects' endpoint
id<AGPipe> projects = [pipeline pipe:^(id<AGPipeConfig> config) {
[config name:@"projects"];
[config type:@"REST"];
}];
// create the datamanager
AGDataManager* dm = [AGDataManager manager];
// add a new (default) store object:
id<AGStore> myStore = [dm store:^(id<AGStoreConfig> config) {
[config name:@"tasks"];
[config TYPE:@"MEMORY"];
}];
// create an authenticator object
AGAuthenticator* authenticator = [AGAuthenticator authenticator];
// add a new auth module and the required 'base url':
NSURL* baseURL = [NSURL URLWithString:@"https://todoauth-aerogear.rhcloud.com/todo-server/"];
id<AGAuthenticationModule> myMod = [authenticator auth:^(id<AGAuthConfig> config) {
[config name:@"authMod"];
[config baseURL:baseURL];
}];