-
Notifications
You must be signed in to change notification settings - Fork 0
OhNotreDame edited this page May 22, 2017
·
2 revisions
Due to Google Chrome constraints, pages and code are separated.
All the components created to interact with gmail api is stored in the mail folder.
- inbox.js and inbox.html prepare and render the page, based on different queries (Inbox, Updates, Promotions, ...)
- mail.js contains all the functions used in inbox.js
Gmail API v1 Reference
gapi.client.load('gmail', 'v1', renderInbox);
function getThreadMessage(threadId, callback) {
var request = gapi.client.gmail.users.threads.get({
'userId': USER,
'id': threadId
});
request.execute(function (resp) {
callback(resp);
});
}
Methods | Implemented | Used | Function |
---|---|---|---|
users.messages.list | Yes | mail.js | listMessages() |
users.messages.get | Yes | mail.js | getMessage() |
users.messages.modify | Yes | mail.js | markMessageAsRead() |
users.messages.delete | Yes | mail.js | deleteMessagePermanently() |
users.messages.trash | Yes | mail.js | sendMessageToTrash() |
users.messages.untrash | Yes | mail.js | sendMessageBackToInbox() |
Methods | Implemented | Used | Function |
---|---|---|---|
users.threads.list | Yes | mail.js | listThreads() |
users.threads.get | Yes | mail.js | getThread() |
users.threads.modify | Yes | mail.js | markThreadAsRead() |
users.threads.delete | Yes | mail.js | deleteThreadPermanently() |
users.threads.trash | Yes | mail.js | sendThreadToTrash() |
users.threads.untrash | Yes | mail.js | sendThreadBackToInbox() |