-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load persons with relationships? #1
Comments
I updated the The endpoints don't return all persons in the relationships, just the particular type that was requested.
The new states returned by Processing these relationships, as currently shown in the example, is painful. There must be a better way. Given the async nature of PHP, I would rather request all the relationships without the persons then request the persons one at a time as I needed them even though that would be slower. In a case like this where we're processing all relationships, using the Persons with Relationships resource would be much easier. |
I agree that the example is now much more complex. However, it is a common use case. We should provide an alternative implementation using Persons with Relationships. It will be interesting to see how things play out in code and performance. My thought is that we should use the example to improve the SDK functionality, much like you've already suggested with the getPerson() method issue. My goal is for the SDK to provide an interface that allows the common use cases to be handled in an elegant way. I think it is moving that direction. |
From @jimmyz:
For the Read Family, the code is currently using
loadParentRelationships
,loadSpouseRelationships
, andloadChildRelationships
.You may consider using
readParents
,readSpouses
, andreadChildren
methods. These should provide the relationships and the person objects in one call.The
loadParentRelationships
method uses the "Relationships to Parents" REST resource, which only contains relationship data. https://familysearch.org/developers/docs/api/tree/Relationships_to_Parents_resourceThe
readParents
method uses the "Parents of a Person" REST resource, which contains the parent person objects and the relationship https://familysearch.org/developers/docs/api/tree/Read_Parents_of_a_Person_usecaseThe text was updated successfully, but these errors were encountered: