Skip to content

[Issue #115] Allow subentities to be specified from API response #266

Closed
wants to merge 1 commit into from

2 participants

@lukerattei

AFIncrementalStore assumed a one-to-one mapping of API endpoint to entity. However, an API like an activity stream might return several different types of data that should be represented by subentities. With this commit, the API client can map entities to the representations of those entities. The same can be done with relationship representations.

This change should be backwards compatible for those who have not overridden private methods and are using AFRESTClient. For anyone rolling their own client, the following methods are now required:

representationsByEntityOfEntity:fromResponseObject:
representationsByEntityForRelationshipsFromRepresentation:ofEntity:fromResponse:

And these methods are now optional:

representationOrArrayOfRepresentationsOfEntity:fromResponseObject:
representationsForRelationshipsFromRepresentation:ofEntity:fromResponse:

Luke Rattei [Issue #115] Allow subentities to be specified from API response
AFIncrementalStore assumed a one-to-one mapping of API endpoint to entity. However, an API like an activity stream might return several different types of data that should be represented by subentities. With this commit, the API client can map entities to the representations of those entities. The same can be done with relationship representations.

This change should be backwards compatible for those who have not overridden private methods and are using AFRESTClient. For anyone rolling their own client, the following methods are now required:

representationsByEntityOfEntity:fromResponseObject:
representationsByEntityForRelationshipsFromRepresentation:ofEntity:fromResponse:

And these methods are now optional:

representationOrArrayOfRepresentationsOfEntity:fromResponseObject:
representationsForRelationshipsFromRepresentation:ofEntity:fromResponse:
abae9a3
@mattt
mattt commented Nov 18, 2014

As of e8c6472, AFIncrementalStore is no longer being actively maintained. Thank you for your contributions; my sincere apologies for any inconvenience this may have caused.

@mattt mattt closed this Nov 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.