Hacking Gmail

(Grace) #1

Chapter 7 — Gmail Libraries 123


Constant Description

GM_ACT_TRASH Move message to or away from the Trash.
GM_ACT_UNTRASH
GM_ACT_DELFOREVER Delete message forever.
GM_USE_PHPSESSION Use PHP session to handle Gmail-lite session.
[0.6.4]
GM_USE_COOKIE [0.6.4] Use cookie to handle Gmail-lite session.

Table 7-3 gives special properties available for each constant’s Snapshot.


Table 7-3 The Data Available via a Snapshot

Properties available to all Snapshot types except GM_CONTACT

Property Description

gmail_ver Version of Gmail JavaScript core program.
quota_mb Mailbox quota in MB.
quota_per Mailbox quota in percentage.
std_box_new Number-indexed array. Number of unread mails in each standard box. You
may call GMailer::getStandardBox()to get an array of names of
standard boxes.
have_invit Number of invites you have. 0 = no invitation, and so forth.
label_list Number-indexed array. An array of label names.
label_new Number-indexed array. Number of unread mails in each label. (A 1-to-1
mapping of label_list.)
Properties available to Snapshot types GM_STANDARD, GM_LABEL, and GM_QUERY
Property Description
box_name Name of the standard box or label, or query string currently viewing.
box_total Total number of conversations in current mailbox.
box_pos Current starting position (for paged results).

Number-indexed array. An array of conversations in the current mailbox.
Each conversation is a text-indexed arrayof the following:

Continued
Free download pdf