Skip to content

Commit 944b06e

Browse files
committed
finalize gedcomx-php integration
1 parent ab9da9b commit 944b06e

File tree

5 files changed

+31
-30
lines changed

5 files changed

+31
-30
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,5 @@ When a response body is present, it will be deserialized as either an
142142
or a [FamilySearchPlatform](http://familysearch.github.io/gedcomx-php/class-Gedcomx.Extensions.FamilySearch.FamilySearchPlatform.html)
143143
object.
144144

145-
gedcomx-php must be installed and included separately.
145+
gedcomx-php must be installed and included separately. gedcomx-php version 3.1.2
146+
or later is required.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
}
88
],
99
"require-dev": {
10-
"gedcomx/gedcomx-php": "^3.0",
10+
"gedcomx/gedcomx-php": "^3.1.2",
1111
"php-vcr/php-vcr": "^1.2",
1212
"phpunit/phpunit": "^4.8",
1313
"php-vcr/phpunit-testlistener-vcr": "^1.1"

composer.lock

Lines changed: 23 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/FamilySearch.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,13 +463,13 @@ private function request($url, $options = array())
463463
if ($response->data && $this->objects){
464464

465465
// Atom Feed
466-
if (isset($response->data->entries)){
466+
if (isset($response->data['entries'])){
467467
$response->gedcomx = new \Gedcomx\Atom\Feed($response->data);
468468
}
469469

470470
// OAuth token success response
471-
else if (isset($response->data['access_token'])) {
472-
// TODO
471+
else if (isset($response->data['access_token']) || isset($response->data['error'])) {
472+
$response->gedcomx = new \Gedcomx\Extensions\FamilySearch\OAuth2($response->data);
473473
}
474474

475475
// GedcomX

test/GedcomxPHPTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ public function testAuthenticate()
2525
$response = $this->login();
2626
$this->assertResponseOK($response);
2727
$this->assertResponseData($response);
28-
$this->assertArrayHasKey('token', $response->data);
29-
$this->assertNotHasGedcomxObject($response);
28+
$this->assertArrayHasKey('access_token', $response->data);
29+
$this->assertHasGedcomxObject($response);
3030
}
3131

3232
/**

0 commit comments

Comments
 (0)