-
Notifications
You must be signed in to change notification settings - Fork 15
Using the SDK Documentation
To orient you on how to navigate the gedcomx-php SDK documentation, follow the documentation through the following steps of getting the name of a person in the Family Tree.
-
Open the gedcomx-php SDK documentation documentation.
-
Move to the Gedcomx\Extensions\FamilySearch\Rs\Client Namespace.
-
In the Classes Summary list, click the FamilySearchClient link to show the FamilySearchClient class details.
-
Familiarize yourself with the content of the _construct method by clicking the associated links. This is where you put your app key, a redirect URI, and access token.
-
Examine the getOAuth2AuthorizationURI() method to familiarize yourself with its parameters and return value. This method directs the user to the FamilySearch login page and returns an authorization code.
-
Examine the authenticateViaOAuth2AuthCode($code) method and the getAccessToken() getter method to familiarize yourself with how to obtain authentication. See the setup portion of the tutorial.php file. This is how to get an authenticated access token.
-
When you use the familytree() method it transitions you to the FamilyTreeCollectionState class state. Click the link in the left side of the Methods summary of the familytree() method to open the page for the FamilyTreeCollectionState class.
-
Click the link in the left side of the Methods summary of the readPersonById() method to open the FamilyTreePersonState class page.
-
The FamilyTreePersonState class inherits the getPerson() method from the PersonState class. See the "Methods inherited from Gedcomx\Rs\Client\PersonState" heading toward the bottom of the page and click the getPerson() link to see the PersonState class and its methods.
-
Click the link in the left side of the Methods summary of the getPerson() method to see the Person class.
-
Click the link in the left side of the Methods summary of the getDisplayExtension() method to see the DisplayProperties class.
The DisplayProperties class is where you can get (or set) a person's information.
-
Use the getName() method getter to get the person's name.
You might want to examine or run the sample app as your next step, or simply get started coding on your own.