Skip to content

Instantly share code, notes, and snippets.

@matzew
Created January 21, 2013 12:48
Show Gist options
  • Select an option

  • Save matzew/4585805 to your computer and use it in GitHub Desktop.

Select an option

Save matzew/4585805 to your computer and use it in GitHub Desktop.
Parameter provider
##Parameter Provider Propsal Let's just use a plain ```NSDictionary``` for the _parameter provider_: ```ObjC AGPipeline *testPipeline = [AGPipeline pipelineWithBaseURL:_baseURL]; id pipe = [testPipeline pipe:^(id config) { [config setName:@"cars"]; // using the `fancy` literals [config setParameterProvider:@{ @"page" : @"1", @"perPage" : @"15", @"sorting" : @"DESC" }]; }]; ... ``` Override on a per request level: ```ObjC // use just five per page: [pipe readWithParams:@{@"perPage" : @"5"} success:^(id responseObject) { //// } failure:^(NSError *error) { /// }]; ```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment