Import your Gmail Contacts the fast and easy way (insert Billy Mays voice here)

My overall objective was to build very simple API that would allow a user to download his/her Gmail contacts and display them in a specific format.

In my opinion a API like this should be very popular amongst the social networking sites.

The API has the capability to be configured to show results in several different formats XML, JSON, and PHP format. The PHP format returns the results in an array format.

The operating format is as follows.

  • Source:contacts
  • Gmail:Username
  • Gmail:Password
  • Format:PHP, or XML, or JSON

http://apime.josephtinsley.com/contacts/{user_name}:{user_password}/{format}

http://apime.josephtinsley.com/contacts/bob:I_luv_Tacos/json

A simple way of including the result set into your PHP web page is to use PHP’s file_get_contents function.

1
2
3
4
5
6
7
8
<?PHP

$results = file_get_contents('http://apime.josephtinsley.com/contacts/{Email_Address}:{Password}/{Format}');
print '<pre>';
print_r($results);
print '<pre>';

?>

*results are limited to 25 contacts right now*
Thanks,
Joe