AFNetworking/AFIncrementalStore — pull request #75 by lordkev (2012-10-16 16:42:15+00:00)
Title: Add operation argument to representationOrArrayOfRepresentationsFromResp...

I believe that this would help in allowing people to work around APIs that don't always return consistent response structures between calls. For example, most of the calls to the API I'm currently interacting with work fine with the existing implementation of representationOrArrayOfRepresentationsFromResponseObject:

However, one call returns a response in the following format.

{
"query": {
"limit": numberMaximum number of results returned,
"offset": numberOffset requested in query (zero based),
"active_after": numberResults include contacts in at least one email dated after a given time,
"active_before": numberResults include contacts in at least one email dated before a given time,
"search": stringResults included contacts whose name of address match this search term
},
"matches": [
{
"email": stringemail address of contact,
"count": numbernumber of messages exchanged with this contact,
"name": stringName associated to contact,
"thumbnail": stringURL pointing to Gravatar image associated to contact's email address, if applicable
},
...
]
}

In my particular case, I could probably rely on analyzing the response object alone, but using the operation and attached request seems like it may be a bit cleaner and more flexible. What do you think? Any other ideas?