Skip to content

Commit

Permalink
Added page to test individual contact retrieval and updating
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Hall committed Jul 27, 2015
1 parent 6dfd019 commit ed3c832
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test_individual.php
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);

0 comments on commit ed3c832

Please sign in to comment.