forked from rapidwebltd/php-google-contacts-v3-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added page to test individual contact retrieval and updating
- Loading branch information
Jordan Hall
committed
Jul 27, 2015
1 parent
6dfd019
commit ed3c832
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
require_once 'vendor/autoload.php'; | ||
|
||
use rapidweb\googlecontacts\factories\ContactFactory; | ||
|
||
if (!isset($_GET['selfURL'])) { | ||
throw new Exception('No selfURL specified.'); | ||
} | ||
|
||
$contact = ContactFactory::getBySelfURL($_GET['selfURL']); | ||
|
||
var_dump($contact); | ||
|
||
$contact->name = 'Test'; | ||
$contact->phoneNumber = '07812363789'; | ||
$contact->email = 'test@example.com'; | ||
|
||
$contactAfterUpdate = ContactFactory::submitUpdates($contact); | ||
|
||
var_dump($contactAfterUpdate); |