So, I'm a little confused as to what the differences are between the two functions, or at least how to combine them together. I have a situation where I have this descriptor:
RKResponseDescriptor *responsePlant = [RKResponseDescriptor responseDescriptorWithMapping:plantMapping pathPattern:@"/api/rest/plants/:plant_id" keyPath:nil statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)];
Now I would like to do something like this
RKResponseDescriptor *responsePlantAll = [RKResponseDescriptor responseDescriptorWithMapping:plantMapping pathPattern:@"/api/rest/plants/" keyPath:@"objects" statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)];
Note that keyPath is zero in one place and not in another .
It works ... but a lot of gluing copies. Can I use RKRouter for this?
Thanks a lot!
source share