GithubHelp home page GithubHelp logo

eartharoid / webextension-store-meta Goto Github PK

View Code? Open in Web Editor NEW

This project forked from awesome-webextension/webextension-store-meta

0.0 0.0 0.0 633 KB

Get browser extension(webextension) item meta from Chrome Web Store and Firefox add-ons.

License: MIT License

JavaScript 100.00%

webextension-store-meta's Introduction

webextension-store-meta logo

webextension-store-meta

npm-version Build Status Coverage Status code style: prettier

Get browser extension(webextension) item meta from Chrome Web Store and Firefox add-ons.

This lib uses many fallback methods to improve stability and performance.

Who Use It

Shields.io Badgen
Quality metadata badges
for open source projects
Fast badge generating service

Installation

npm

npm add webextension-store-meta

yarn

yarn add webextension-store-meta

Usage

All stores share the same api.

const ChromeWebStore = require('webextension-store-meta/lib/chrome-web-store')
const chromeWebStore = await ChromeWebStore.load({
  id: 'xxxxxxx',
  qs: { hl: 'en' },
})
console.log(chromeWebStore.meta())

const Amo = require('webextension-store-meta/lib/amo')
const amo = await Amo.load({ id: 'xxxxxxx' })
console.log(amo.meta())

result = {
  name: expect.any(String),
  description: expect.any(String),
  ratingValue: expect.any(Number),
  ratingCount: expect.any(Number),
  users: expect.any(Number),
  price: expect.any(Number),
  priceCurrency: expect.any(String),
  version: expect.any(String),
  url: expect.any(String),
  image: expect.any(String),
  operatingSystem: expect.any(String),
}

Get individual property:

const Amo = require('webextension-store-meta/lib/amo')
const amo = await Amo.load({ id: 'xxxxxxx' })
console.log(amo.name())
console.log(amo.ratingValue())

Load config:

  • id {string} required - extension id.
  • qs {string|object} optional - querystring.
  • options object optional - node-fetch options.

Development

git clone [email protected]:crimx/webextension-store-meta.git
cd webextension-store-meta
pnpm i

# {--max 5} - max 5 fixtures for each service
# {--proxy http://xxx:xxx} - http proxy
# {--force} - always download fixtures, otherwise skip if fixtures dir not empty
# {--keep} - keep progress result
pnpm fixtures --keep

pnpm test --watch

webextension-store-meta's People

Contributors

crimx avatar eartharoid avatar xmcp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.