-
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, the following steps walk you through the methods you used in the coding step of this tutorial to get 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. Take a look at the following methods:
-
Familiarize yourself with the content of the _construct array method by clicking the associated links. This is where you put your app key, a redirect URI, and access token. For an example, see the $clientOptions array in the SETUP section of the tutorial.php file you previously tested.
-
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. This is how to get an authenticated access token.
-
Click the link in the left side of the familytree() Methods summary to open the page for the FamilyTreeCollectionState class. When you use the familytree() method it transitions you to the FamilyTreeCollectionState class state.
-
Click the link in the left side of the readPersonById() Methods summary to open the FamilyTreePersonState class page.
-
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. The FamilyTreePersonState class inherits the getPerson() method from the PersonState class.
-
Click the link in the left side of the getPerson() Methods summary to see the Person class.
-
Click the link in the left side of the getDisplayExtension() Methods summary to see the DisplayProperties class.
The DisplayProperties class is where you can get (or set) a person's information.
-
The getName() method getter is used 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.