npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

chrome-web-store-item-property

1.1.2 • Public • Published

chrome-web-store-item-property

NPM version Travis-CI Status Appveyor Status Daviddm Status

Gather meta information from chrome web store.

For example: version, count of downloads and rating.

See chrome-web-store-item-property-cli for the command-line version.

Install

$ npm install --save chrome-web-store-item-property

Usage

var chromeWebStoreItemProperty = require('chrome-web-store-item-property');
// or
<script src="build/chrome-web-store-item-property.js"></script>
 
chromeWebStoreItemProperty('nimelepbpejjlbmoobocpfnjhihnpked')
  .then(function (value) {
    console.log(value);
    // =>
    //{
    //  name: 'Do Not Merge WIP for GitHub',
    //  url: 'https://chrome.google.com/webstore/detail/do-not-merge-wip-for-gith/nimelepbpejjlbmoobocpfnjhihnpked',
    //  image: 'https://ssl.gstatic.com/chrome/webstore/images/thumb.png',
    //  version: '1.0.6',
    //  price: '$0',
    //  priceCurrency: 'USD',
    //  interactionCount: {
    //    UserDownloads: 418
    //  },
    //  operatingSystems: 'Chrome',
    //  ratingValue: 4.5,
    //  ratingCount: 2,
    //  id: 'nimelepbpejjlbmoobocpfnjhihnpked'
    //};
  });

API

chromeWebStoreItemProperty(identifier[, config]) -> Promise

identifier

Required
Type: string

ID for Chrome Web Store.

config

Pass request's available options

var defaultConfig = {
  headers: {
    'User-Agent': 'https://github.com/pandawing/node-chrome-web-store-item-property'
  },
  qs: {
    hl: 'en',
    gl: 'US'
  }
};

chromeWebStoreItemProperty.get(identifier[, config]) -> Promise

identifier

Required
Type: string

ID for Chrome Web Store.

config

Pass request's available options

var defaultConfig = {
  headers: {
    'User-Agent': 'https://github.com/pandawing/node-chrome-web-store-item-property'
  },
  qs: {
    hl: 'en',
    gl: 'US'
  }
};

chromeWebStoreItemProperty.convert(detailHtml) -> Promise

Errors

chromeWebStoreItemProperty.HTTPError

chromeWebStoreItemProperty.InvalidFormatError

Changelog

changelog.md.

License

MIT © sanemat

install

npm i chrome-web-store-item-property

Downloadsweekly downloads

2,448

version

1.1.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability