Skip to content

Using the SDK Documentation

Daniel Marshall edited this page Sep 3, 2015 · 34 revisions

Step 4: Use the PHP 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.

  1. Open the gedcomx-php SDK documentation documentation.

  2. Move to the Gedcomx\Extensions\FamilySearch\Rs\Client Namespace.

  3. In the Classes Summary list, click the FamilySearchClient link to show the FamilySearchClient class details.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. Click the link in the left side of the Methods summary of the readPersonById() method to open the FamilyTreePersonState class page.

  9. 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.

  10. Click the link in the left side of the Methods summary of the getPerson() method to see the Person class.

  11. 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.

  12. Use the getName() method getter to get the person's name.

What Next?

You might want to examine or run the sample app as your next step, or simply get started coding on your own.

Home

Tutorial

  • Step 1: Register
  • Step 2: Set up your test environment
  • Step 3: Build tutorial.php
  • Step 4: Use the SDK Documentation

Sample App

Documentation

Design

Clone this wiki locally