libgmail

Module libgmail |
[hide private]
[frames] | no frames]

# Module libgmail

source code

Classes | [hide private]
| GmailError Exception thrown upon gmail-specific failures, in particular a failure to log in and a failure to parse responses.
| GmailSendError Exception to throw if we're unable to send a message
| SmartRedirectHandler
| CookieJar A rough cookie handler, intended to only refer to one domain.
| GmailLoginFailure Raised whenever the login process fails--could be wrong username/password, or Gmail service error, for example.
| GmailAccount
| GmailContact Class for storing a Gmail Contacts list entry
| GmailContactList Class for storing an entire Gmail contacts list and retrieving contacts by Id, Email address, and name
| GmailSearchResult
| GmailSessionState
| _LabelHandlerMixin Note: Because a message id can be used as a thread id this works for messages as well as threads.
| GmailThread Note: As far as I can tell, the "canonical" thread id is always the same as the id of the last message in the thread.
| GmailMessageStub Intended to be used where not all message information is known/required.
| GmailMessage
| GmailAttachment
| GmailComposedMessage

Functions | [hide private]
_parsePage(pageContent) Parse the supplied HTML page and extract useful information from the embedded Javascript. | source code
_splitBunches(infoItems) Utility to help make it easy to iterate over each item separately, even if they were bunched on the page. | source code
_buildURL(**kwargs) | source code
_paramsToMime(params, filenames, files) | source code

Variables | [hide private]
| Version = ``'``0.1.7``'``
| LG_DEBUG = `0`
| GMAIL_URL_LOGIN = ``'``https://www.google.com/accounts/ServiceLogi``...``
| GMAIL_URL_GMAIL = ``'``https://mail.google.com/mail/``'``
| PROXY_URL = `None`
| STANDARD_FOLDERS = ``[``'``inbox``'``,` `'``starred``'``,` `'``all``'``,` `'``drafts``'``,` `'``sent``...``
| U_SAVEDRAFT_VIEW = ``'``sd``'``
| D_DRAFTINFO = ``'``di``'``
| DI_BODY = `19`
| versionWarned = `False`
| RE_SPLIT_PAGE_CONTENT = `re.compile(r'`(?s)`D\(`(`.`*?``)`\);')`
| ACTION_TOKEN_COOKIE = ``'``GMAIL_AT``'``
| AR_MSG = `1`
| AR_SUCCESS = `0`
| A_FILENAME = `1`
| A_FILESIZE = `3`
| A_ID = `0`
| A_MIMETYPE = `2`
| BACKSPACE_ACTION = `2`
| CMD_SEARCH = ``'``SEARCH``'``
| COMPOSE_VIEW = ``'``comp``'``
| CONV_VIEW = ``'``conv``'``
| CS_ADKEY = `8`
| CS_CATEGORIES = `4`
| CS_MATCHING_MSGID = `9`
| CS_NUM_MSGS = `7`
| CS_PREVNEXTTHREADIDS = `5`
| CS_SUBJECT = `1`
| CS_SUMMARY_HTML = `3`
| CS_THREADID = `0`
| CS_THREAD_UPDATED = `6`
| CS_TITLE_HTML = `2`
| CT_COUNT = `1`
| CT_NAME = `0`
| D_ACTION_RESULT = ``'``ar``'``
| D_CATEGORIES = ``'``ct``'``
| D_CATEGORIES_COUNT_ALL = ``'``cta``'``
| D_COMPOSE = ``'``c``'``
| D_CONTACT = ``'``co``'``
| D_CONV_END = ``'``ce``'``
| D_CONV_SUMMARY = ``'``cs``'``
| D_DEFAULTSEARCH_SUMMARY = ``'``ds``'``
| D_END_PAGE = ``'``e``'``
| D_FILTERS = ``'``fi``'``
| D_GAIA_NAME = ``'``gn``'``
| D_INVITE_STATUS = ``'``i``'``
| D_LOADED_ERROR = ``'``le``'``
| D_LOADED_SUCCESS = ``'``ld``'``
| D_LOADING = ``'``l``'``
| D_MSGATT = ``'``ma``'``
| D_MSGBODY = ``'``mb``'``
| D_MSGINFO = ``'``mi``'``
| D_PREFERENCES = ``'``p``'``
| D_PREFERENCES_PANEL = ``'``pp``'``
| D_QUICKLOADED = ``'``ql``'``
| D_QUOTA = ``'``qu``'``
| D_SENDMAIL_RESULT = ``'``sr``'``
| D_THREAD = ``'``t``'``
| D_THREADLIST_END = ``'``te``'``
| D_THREADLIST_SUMMARY = ``'``ts``'``
| D_VERSION = ``'``v``'``
| HIDDEN_ACTION = `0`
| HIST_VIEW = ``'``hist``'``
| MI_ATTACHINFO = `17`
| MI_AUTHOREMAIL = `7`
| MI_AUTHORFIRSTNAME = `6`
| MI_AUTHORNAME = `5`
| MI_BCC = `12`
| MI_CC = `11`
| MI_DATE = `14`
| MI_DATEHTML = `9`
| MI_FLAGS = `0`
| MI_KNOWNAUTHOR = `18`
| MI_MINIHDRHTML = `8`
| MI_MSGID = `2`
| MI_NUM = `1`
| MI_PHISHWARNING = `19`
| MI_REFMSG = `4`
| MI_REPLYTO = `13`
| MI_SNIPPETHTML = `16`
| MI_STAR = `3`
| MI_SUBJECT = `15`
| MI_TO = `10`
| PREFS_VIEW = ``'``prefs``'``
| QU_COLOR = `3`
| QU_PERCENT = `2`
| QU_QUOTA = `1`
| QU_SPACEUSED = `0`
| SM_COMPOSEID = `0`
| SM_MSG = `2`
| SM_NEWTHREADID = `3`
| SM_SUCCESS = `1`
| TLIST_VIEW = ``'``tlist``'``
| TS_ESTIMATES = `3`
| TS_NUM = `1`
| TS_START = `0`
| TS_TIMESTAMP = `6`
| TS_TITLE = `4`
| TS_TOTAL = `2`
| TS_TOTAL_MSGS = `7`
| T_ATTACH_HTML = `9`
| T_AUTHORS_HTML = `4`
| T_CATEGORIES = `8`
| T_DATE_HTML = `3`
| T_EXTRA_SNIPPET = `11`
| T_FLAGS = `5`
| T_MATCHING_MSGID = `10`
| T_SNIPPET_HTML = `7`
| T_STAR = `2`
| T_SUBJECT_HTML = `6`
| T_THREADID = `0`
| T_UNREAD = `1`
| URL_GMAIL = ``'``https://mail.google.com/mail/``'``
| URL_LOGIN = ``'``https://www.google.com/accounts/ServiceLoginBoxAuth``'``
| USER_ACTION = `1`
| U_ACTION = ``'``act``'``
| U_ACTION_MESSAGE = ``'``m``'``
| U_ACTION_PREF_PREFIX = ``'``p_``'``
| U_ACTION_THREAD = ``'``t``'``
| U_ACTION_TOKEN = ``'``at``'``
| U_ADDCATEGORY_ACTION = ``'``ac_``'``
| U_ADDRESS_ACTION = ``'``a``'``
| U_ADDRESS_IMPORT_VIEW = ``'``ai``'``
| U_ADDRESS_VIEW = ``'``address``'``
| U_ADDSENDERTOCONTACTS_ACTION = ``'``astc``'``
| U_ADDSTAR_ACTION = ``'``st``'``
| U_ADVANCED_SEARCH = ``'``adv``'``
| U_AD_VIEW = ``'``ad``'``
| U_ALL_SEARCH = ``'``all``'``
| U_AS_ATTACH = ``'``as_attach``'``
| U_AS_DATE = ``'``as_date``'``
| U_AS_FROM = ``'``as_from``'``
| U_AS_HAS = ``'``as_has``'``
| U_AS_HASNOT = ``'``as_hasnot``'``
| U_AS_SUBJECT = ``'``as_subj``'``
| U_AS_SUBSET = ``'``as_subset``'``
| U_AS_SUBSET_ALL = ``'``all``'``
| U_AS_SUBSET_ALLSPAMTRASH = ``'``ast``'``
| U_AS_SUBSET_CATEGORY_PREFIX = ``'``cat_``'``
| U_AS_SUBSET_DRAFTS = ``'``drafts``'``
| U_AS_SUBSET_INBOX = ``'``inbox``'``
| U_AS_SUBSET_READ = ``'``read``'``
| U_AS_SUBSET_SENT = ``'``sent``'``
| U_AS_SUBSET_SPAM = ``'``spam``'``
| U_AS_SUBSET_STARRED = ``'``starred``'``
| U_AS_SUBSET_TRASH = ``'``trash``'``
| U_AS_SUBSET_UNREAD = ``'``unread``'``
| U_AS_TO = ``'``as_to``'``
| U_AS_WITHIN = ``'``as_within``'``
| U_ATTACHMENT_VIEW = ``'``att``'``
| U_CATEGORY_SEARCH = ``'``cat``'``
| U_COMPOSEID = ``'``cmid``'``
| U_COMPOSE_BCC = ``'``bcc``'``
| U_COMPOSE_BODY = ``'``body``'``
| U_COMPOSE_CC = ``'``cc``'``
| U_COMPOSE_MODE = ``'``cmode``'``
| U_COMPOSE_SUBJECT = ``'``su``'``
| U_COMPOSE_TO = ``'``to``'``
| U_COMPOSE_VIEW = ``'``cm``'``
| U_CONVERSATION_VIEW = ``'``cv``'``
| U_CREATECATEGORY_ACTION = ``'``cc_``'``
| U_CREATEFILTER_ACTION = ``'``cf``'``
| U_CREATEFILTER_SEARCH = ``'``cf``'``
| U_DEBUG_ADS_RESPONSE_VIEW = ``'``da``'``
| U_DELETECATEGORY_ACTION = ``'``dc_``'``
| U_DELETEFILTER_ACTION = ``'``df_``'``
| U_DELETEMESSAGE_ACTION = ``'``dm``'``
| U_DELETE_ACTION = ``'``dl``'``
| U_DRAFTS_SEARCH = ``'``drafts``'``
| U_DRAFT_MSG = ``'``draft``'``
| U_EMPTYSPAM_ACTION = ``'``es_``'``
| U_EMPTYTRASH_ACTION = ``'``et_``'``
| U_INBOX_ACTION = ``'``ib``'``
| U_INBOX_SEARCH = ``'``inbox``'``
| U_INVITE_VIEW = ``'``invite``'``
| U_JSREPORT_VIEW = ``'``jr``'``
| U_MARKREAD_ACTION = ``'``rd``'``
| U_MARKSPAM_ACTION = ``'``sp``'``
| U_MARKTRASH_ACTION = ``'``tr``'``
| U_MARKUNREAD_ACTION = ``'``ur``'``
| U_NEXT_THREAD = ``'``next``'``
| U_ORIGINAL_MESSAGE_VIEW = ``'``om``'``
| U_PAGE_VIEW = ``'``page``'``
| U_PREFERENCES_VIEW = ``'``pr``'``
| U_PREV_THREAD = ``'``prev``'``
| U_PRINT_THREAD = ``'``pth``'``
| U_PRINT_VIEW = ``'``pt``'``
| U_QUERY_SEARCH = ``'``query``'``
| U_REFERENCED_MSG = ``'``rm``'``
| U_REMOVECATEGORY_ACTION = ``'``rc_``'``
| U_REMOVESTAR_ACTION = ``'``xst``'``
| U_RENAMECATEGORY_ACTION = ``'``nc_``'``
| U_REPLACEFILTER_ACTION = ``'``rf``'``
| U_REPORT_BAD_RELATED_INFO_VIEW = ``'``rbri``'``
| U_SAVEPREFS_ACTION = ``'``prefs``'``
| U_SEARCH = ``'``search``'``
| U_SENDMAIL_VIEW = ``'``sm``'``
| U_SENT_SEARCH = ``'``sent``'``
| U_SPAM_SEARCH = ``'``spam``'``
| U_SPELLCHECK_VIEW = ``'``sc``'``
| U_STARRED_SEARCH = ``'``starred``'``
| U_START = ``'``start``'``
| U_THREAD = ``'``th``'``
| U_THREADLIST_VIEW = ``'``tl``'``
| U_TRASH_SEARCH = ``'``trash``'``
| U_UNMARKSPAM_ACTION = ``'``us``'``
| U_UPDATE_VIEW = ``'``up``'``
| U_VIEW = ``'``view``'``
| js_version = ``'``44f09303f2d4f76f``'``

Variables Details | [hide private]

  ### GMAIL_URL_LOGIN Value:
      'https://www.google.com/accounts/ServiceLoginBoxAuth'

  ### STANDARD_FOLDERS Value:
      ['inbox', 'starred', 'all', 'drafts', 'sent', 'spam']