gmail-api-parse-message-ts
Advanced tools
Comparing version 2.2.6 to 2.2.7
{ | ||
"name": "gmail-api-parse-message-ts", | ||
"version": "2.2.6", | ||
"version": "2.2.7", | ||
"description": "Parses Gmail API's GET method to iGmail object. Typescript", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
[![npm][npm]][npm-url] | ||
# gmail-api-parse-message typescript | ||
## forked from https://github.com/EmilTholin/gmail-api-parse-message v2.1 | ||
Parses Gmail API's GET message method, and returns a IGmail object | ||
## Parses Gmail API's GET message method, and returns a IGmail object | ||
forked from https://github.com/EmilTholin/gmail-api-parse-message v2.1 | ||
@@ -26,3 +26,3 @@ ## To install: | ||
export class ParseEmailService { | ||
/** fetch single email from Gmail, and also updates emails array (see paramenter 'emails' below from component) */ | ||
/** fetch single email from Gmail API */ | ||
async getGmail(id: string): Promise<gapi.client.gmail.Message> { | ||
@@ -40,12 +40,12 @@ const email: gapi.client.gmail.Message = await gapi.client.gmail.users.messages.get({ | ||
const parse = new ParseGmailApi(); | ||
const gmailResponse = await getEmail('nm7ntsgm7tu1b6od') | ||
const gmailResponse = await getEmail('[id of your gmail message]'); | ||
const iGmail = parse.parseMessage(gmailResponse); | ||
console.log(iGmail) // which return an object of type iGmail with the following properties | ||
console.log(iGmail); // see iGmail below | ||
} | ||
} | ||
``` | ||
which return the following objects | ||
running parseEmail() which returns an iGmail object | ||
```ts | ||
interface iGmail { | ||
@@ -52,0 +52,0 @@ id: string; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14987