Skip to content

Instantly share code, notes, and snippets.

@cvasilak
Created April 1, 2013 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cvasilak/5285205 to your computer and use it in GitHub Desktop.
Save cvasilak/5285205 to your computer and use it in GitHub Desktop.
e.g.
-----
AGPipeline* pipeline = [AGPipeline pipelineWithBaseURL:BASE_SOCCER_APP_URL];
id<AGPipe> leagues = [pipeline pipe:^(id<AGPipeConfig> config) {
[config setName:@"leagues"];
[config setNestedPipes:[@"teams", @"players"]; // an array of nested resources for this pipe
}];
-----
A new "pipe" method is added in the pipeline with params the Parent ID's of this nested resource. Once returned you have a fill Pipe to invoke operations on.
-----
soccer.org/leagues/seattle/teams/trebuchet - >
[[pipeline pipe:@"teams" pathParams:@[@"seattle"]] read:@"trebuchet"] ...
soccer.org/leagues/seattle/teams/trebuchet/players/foo - >
[[pipeline pipe:@"players" pathParams:@[@"seattle", @"trebuchet"]] read:@"foo"] ..
-----
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment