Class FamilySearchClient
API Client for the FamilySearch API
Class Client
-
Gedcomx\Extensions\FamilySearch\Rs\Client\FamilySearchClient
implements
Psr\Log\LoggerAwareInterface
Methods summary
public
|
#
__construct( array $options = array() )
Construct a FamilySearch Client.
Construct a FamilySearch Client.
Parameters
- $options
A keyed array of configuration options for the client. Available options:
clientId - Required for authentication.
redirectURI - Required for authentication.
accessToken - If the access token is set then the clientId and redirectURI are not needed.
environment - production , beta , or integration ; defaults to integration .
userAgent - A string which will be prepended to the default user agent string.
pendingModifications - An array of pending modifications that should be enabled.
logger - A Psr\Log\LoggerInterface . A logger can also be registered via the setLogger() method but passing it in as an option during instantiation ensures that the logger will see all client events.
middleware - An array of Guzzle Middleware.
httpExceptions - When true , the client will throw a Gedcomx\Rs\Client\Exception\GedcomxApplicationException when a 400 or 500 level HTTP response is received.
throttling - When true , the client will automatically handled throttled responses.
|
public
Gedcomx\Extensions\FamilySearch\Rs\Client\FamilyTree\FamilyTreeCollectionState
|
|
public
Gedcomx\Extensions\FamilySearch\Rs\Client\FamilySearchClient
|
#
authenticateViaOAuth2Password( string $username, string $password )
Authenticate via the OAuth2 password flow
Authenticate via the OAuth2 password flow
Parameters
Returns
|
public
Gedcomx\Extensions\FamilySearch\Rs\Client\FamilySearchClient
|
|
public
string
|
#
getOAuth2AuthorizationURI( )
Get the URL that the user should be sent to in order to
begin the OAuth2 redirect flow.
Get the URL that the user should be sent to in order to
begin the OAuth2 redirect flow.
Returns
string $url
|
public
string
|
#
getAccessToken( )
Get the access token for this session
Get the access token for this session
Returns
string
|
public
Gedcomx\Extensions\FamilySearch\Rs\Client\FamilySearchClient
|
#
setAccessToken( $accessToken )
Set the access token for this session
Set the access token for this session
Returns
|
public
array
|
#
getAvailablePendingModifications( )
Get a list of valid pending modifications
Get a list of valid pending modifications
Returns
array Array of \Gedcomx\Extensions\FamilySearch\Feature
|
public
null
|
#
setLogger( Psr\Log\LoggerInterface $logger )
Sets a logger instance on the object
Sets a logger instance on the object
Parameters
Returns
null
|