
gmail-api-parse-message typescript
Parses Gmail API's GET message method, and returns a IGmail object
Run Test
tsc && node dist/test/runtests.js
Example usage
var rp = require('request-promise');
var parseMessage = require('gmail-api-parse-message');
rp({
uri: 'https://www.googleapis.com/gmail/v1/users/me/messages/{MESSAGE_ID}?access_token={ACCESS_TOKEN}',
json: true
}).then(function (response) {
var parsedMessage = parseMessage(response);
console.log(parsedMessage);
/
});
API
parseMessage(response);
Licence
MIT
2.2.0 (ts)
Fixes bug in the original code (v2.1.0), as some attachments are not correctly recognized as attachments
Tests added
Forked from https://github.com/EmilTholin/gmail-api-parse-message
, v2.1.0, some parts converted to typescript, as necessary