Skip to content

Instantly share code, notes, and snippets.

@matzew
Last active December 14, 2015 22:38
Show Gist options
  • Save matzew/6ab432e437b9a017a21d to your computer and use it in GitHub Desktop.
Save matzew/6ab432e437b9a017a21d to your computer and use it in GitHub Desktop.

Comments for Blog Post NR1:

NSURL* serverURL = [NSURL URLWithString:@"http://todo-aerogear.rhcloud.com/posts/1/"];

AGPipeline* pipeline = [AGPipeline pipelineWithBaseURL:serverURL];

// Add a REST pipe for the 'projects' endpoint
id<AGPipe> commentsForBlog1 = [pipeline pipe:^(id<AGPipeConfig> config) {
    [config setName:@"comments"];
}];

Comments for Blog Post NR2:

// Add a REST pipe for the 'projects' endpoint
NSURL* serverURL2 = [NSURL URLWithString:@"http://todo-aerogear.rhcloud.com/posts/2/"];

id<AGPipe> commentsForBlog2 = [pipeline pipe:^(id<AGPipeConfig> config) {
    [config baseURL:serverURL2];
    [config setName:@"comments"];
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment