Created
April 1, 2013 14:21
-
-
Save cvasilak/5285205 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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