GMail API
I started experimenting with the GMail API and it rocks!
We’re going to use this API in our Petri-Jungle E-volution project to create life-forms from e-mail. More info follows.
[code lang=”PHP”]$gmailer = new GMailer();
if ($gmailer->created) {
$gmailer->setLoginInfo($gmail_acc, $gmail_pwd, $my_timezone);
if ($gmailer->connect()) {
// $gmailer->fetchBox(GM_STANDARD, “inbox”, 0);
// $gmailer->fetchBox(GM_LABEL, “Globe4D”, 0);
// $gmailer->fetchBox(GM_CONTACT, “all”, 0);
$gmailer->fetchBox(GM_QUERY, “To:Nico”, 0);
$snapshot = $gmailer->getSnapshot(GM_STANDARD);
//echo print_r_xml($snapshot);
print_r($snapshot);
[/code]
The output is a snapshot object like this:
[code lang=”PHP”]
GMailSnapshot Object
(
[created] => 1
[gmail_ver] => cd4adb3001353850
[country] =>
[google_name] => Rick Companje
[have_invit] => 96
[quota_mb] => 1760
[quota_tot] => 2743
[quota_per] => 64
[quota_col] => #006633
[gmail_tip] => Shortcuts: …………
[personality] => Array
(
[0] => Array
(
[name] => Rick Companje
[email] => ……………….
[default] => 1
[reply-to] =>
[verified] => 1
)
)
[label_list] => Array
(
[0] => 3voor12
[1] => ARP Mailing
[2] => Cijfers.net
[3] => Domeinen
[4] => Events
[5] => Fabrique
[6] => Flash
[7] => FlexCoders
[8] => Globe4D
[9] => Hardware
[10] => HHS
[11] => Kamer zoeken
[12] => Lasergame
[13] => Links
[14] => Lowlands 2004
[15] => Lowlands 2005
[16] => Nieuwsbrieven
[17] => Nieuw Zeeland
……..
[view] => 11
[box_name] => Search results for: To:Nico
[box_total] => 190
[box_pos] => 0
[box_display] => 20
[box_query] => To:Nico
[queried_results] => 1
[box] => Array
(
[0] => Array
(
[id] => 10c67372660b17a8
[is_read] => 0
[is_starred] => 0
[date] => 10:28 am
[sender] => Draft
[flag] =>
[subj] => goed nieuws gmail api
[snippet] =>
[msgid] => 10c67372660b17a8
[labels] => Array
(
[0] => ^r
)
[attachment] => Array
(
)
[long_date] => Thu Jul 13 2006
[long_time] => 10:28 AM
[is_chat] => 0
[chat_length] =>
)
[/code]

Any way to get this working in processing? In which environment are you using it?
Comment by Sylvain — 15 July 2006 @ 19:13