New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gmail_history_parser

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gmail_history_parser

Gmail API history parser for partial sync

  • 1.3.1
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

GMail History Parser

Gmail API history parser for partial sync.

History API outputs a lot of data some of them are not so valuable and some of them are just opposite of what's already included in history array above (which can be excluded). Gmail history parser helps to remove those noise or unnecessary history data and outputs only those which need to be change in client side. Check the examples in sample for more clarity. Sample

History Pattern

Each object in history array contains either one thread changes or one message change. One object do not contain multiple messages of different threads. In one object only one label change is done. Multiple label changed are shown in multiple objects.

How to Parse Response of Gmail API history.

  • Query Gmail History API for partial sync. Partial sync
  • Call parseHistory function from gmail_history_parser package.
let response = await gapi.client.gmail.users.history.list({userId:"me",startHistoryId:"8284"});
parseHistory(response.result); 
/* 
Result would be in this format:
  // Object in this array represent message change not thread change. 
  // ie. if you change thread that constains 2 messaage then this array object will have two changes.
  history: [{
    message: {
      id: 'Message ID',
      threadId: 'Thread ID',
      labelIds: ['Labels after all changes']
    },
    labelIds: [ 'changed label' ],
    type: 'ChangeType | MessageType',
    id: 'Order id'
  }], 
  historyId: string
*/

Changelog

  • 1.0.0 Application deployed
  • 1.0.1 Return Type changed
  • 1.0.2 Empty History Case Handled
  • 1.1.0 Readme changed. (Upgrade to the latest version.)
  • 1.1.1 Message Types added.
    Message types can be imported using const {MessageTypes} = require('gmail_history_parser')
  • 1.3.0 DownGraded from 1.2.0 to 1.1.1 due to bug in code. readme update new sample files added
  • 1.3.1 compiled dist updated.

Keywords

FAQs

Package last updated on 14 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc