Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chrome-webstore

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chrome-webstore - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

client.js

20

package.json
{
"name": "chrome-webstore",
"version": "1.0.0",
"version": "1.1.0",
"description": "Google Chrome Web Store HTTP Client",

@@ -18,16 +18,12 @@ "keywords": [

"dependencies": {
"request-compose": "0.0.19"
"request-compose": "^1.0.0"
},
"devDependencies": {
"coveralls": "^3.0.2",
"istanbul": "^1.1.0-alpha.1",
"mocha": "^5.2.0",
"request-logs": "0.0.5"
},
"bin": {},
"main": "./index.js",
"main": "./client.js",
"files": [
"config/",
"lib/",
"index.js",
"format/",
"client.js",
"LICENSE",

@@ -37,7 +33,3 @@ "README.md",

],
"scripts": {
"test": "npm run test:ci",
"test:ci": "mocha",
"test:cov": "istanbul cover _mocha"
},
"scripts": {},
"engines": {

@@ -44,0 +36,0 @@ "node": ">=8.0.0"

@@ -11,5 +11,4 @@

- **[API](#api)**
- [detail](#detail) / [items](#items)
- **[Items Filter Parameters](#items-filter-parameters)**
- [search](#search) / [category](#category) / [rating](#rating) / [features](#features) / [count](#count) / [offset](#offset)
- **[Arguments](#arguments)**
- [detail](#detail) / [items](#items) / [reviews](#reviews) / [issues](#issues)
- **[Examples](#examples)**

@@ -19,11 +18,9 @@

Method | Arguments | Returns | Description
--- | --- | --- | ---
**detail** | `{id, related, more}` | `{Object}` | Get full details about a Web Store item
**items** | `{search, category, rating, features, count, offset}` | `[Array]` | Get list of Web Store items
Method | Arguments | Returns | Description
--- | --- | --- | ---
**detail** | `{id, related, more}` | `{Object}` | Full details about a Web Store item
**items** | `{search, category, rating, features, count, offset}` | `[Array]` | List Web Store items (subset of the detail data)
**reviews** | `{id, count, offset, locale, sort}` | `[Array]` | List reviews for an item
**issues** | `{id, type, count, page}` | `[Array]` | List issues for an item
## detail
Get details for a Web Store item:
```js

@@ -33,8 +30,11 @@ var webstore = require('chrome-webstore')

;(async () => {
var meta = await webstore.detail({id: 'ckkdlimhmcjmikdlpkmbgfkaikojcbjk'})
console.log(meta)
var items = await webstore.items({search: 'markdown', category: 'extensions'})
var details = await webstore.detail({id: 'ckkdlimhmcjmikdlpkmbgfkaikojcbjk'})
var reviews = await webstore.reviews({id: 'ckkdlimhmcjmikdlpkmbgfkaikojcbjk'})
var issues = await webstore.issues({id: 'ckkdlimhmcjmikdlpkmbgfkaikojcbjk'})
})()
```
Returns all available data for an item:
<details>
<summary><strong>detail</strong></summary>

@@ -55,4 +55,4 @@ ```js

published: 'July 7, 2018',
users: '46,860',
rating: { average: 4.328467153284672, count: 137 },
users: '51,850',
rating: { average: 4.355704697986577, count: 149 },
price: 'Free',

@@ -76,30 +76,8 @@ purchases: null,

Additionally a list of `related` extensions and `more` from the same developer can be included in the result set:
</details>
```js
var webstore = require('chrome-webstore')
<details>
<summary><strong>items</strong></summary>
;(async () => {
var meta = await webstore.detail({id: 'ckkdlimhmcjmikdlpkmbgfkaikojcbjk', related: true, more: true})
console.log(meta)
})()
```
## items
Get a list of items from Chrome Web Store:
```js
var webstore = require('chrome-webstore')
;(async () => {
var meta = await webstore.items({search: 'markdown', category: 'extensions', count: 2})
console.log(meta)
})()
```
Returns a list of items (only a subset of the detail data):
```js
[

@@ -112,4 +90,4 @@ { id: 'elifhakcjgalahccnjkneoccemfahfoa',

author: { name: 'Adam Pritchard', domain: null, url: null },
users: '80,395',
rating: { average: 4.530864197530864, count: 324 },
users: '84,640',
rating: { average: 4.533132530120482, count: 332 },
price: 'Free',

@@ -131,4 +109,4 @@ category: { name: 'Productivity', slug: 'ext/7-productivity' },

author: { name: 'simov.github.io', domain: null, url: null },
users: '46,860',
rating: { average: 4.328467153284672, count: 137 },
users: '51,850',
rating: { average: 4.355704697986577, count: 149 },
price: 'Free',

@@ -147,99 +125,96 @@ category: { name: 'Productivity', slug: 'ext/7-productivity' },

# Items Filter Parameters
</details>
The `items` method supports the following parameters:
<details>
<summary><strong>reviews</strong></summary>
Parameter | Example | Description
--- | :---: | ---
**search** | `'markdown'` | Search term to filter by
**category** | `'extensions'` | Category name to filter by
**rating** | `4` | Filter items by number of stars
**features** | `['free', 'gdrive']` | Filter items by feature set
**count** | `15` | Number of results to return
**offset** | `15` | Return up to results `count` starting from `offset`
## search
Search the store by string:
```js
var webstore = require('chrome-webstore')
;(async () => {
var meta = await webstore.items({search: 'markdown', category: 'extensions'})
console.log(meta)
})()
[
{ rating: 5,
message: 'Awesome extension. \n\nThank you very much :)',
created: 1533732378563,
updated: 1533732655781,
author:
{ id: '0000009cb63b6d30',
name: 'Quan Lao',
avatar: null,
url: 'https://plus.google.com/112697168067713123105' } },
{ rating: 3,
message: 'Useful and effective.\nGood to have a provision to easily include additional codeblock languages as an extension function.',
created: 1531466745894,
updated: 1531466864058,
author:
{ id: '000000ed243a38c0',
name: 'Girisan Ramankutty',
avatar: 'https://lh3.googleusercontent.com/-yXupPr2Oyig/AAAAAAAAAAI/AAAAAAAAAFg/_9tTLqzivCA/s40-c-k/photo.jpg',
url: 'https://plus.google.com/113509128358323131688' } }
]
```
## category
</details>
Filter by category name:
<details>
<summary><strong>issues</strong></summary>
```js
var webstore = require('chrome-webstore')
;(async () => {
var meta = await webstore.items({category: 'collection/new_noteworthy_extensions'})
console.log(meta)
})()
[
{ type: 'suggestion',
status: 'open',
title: 'Is it possible to support previewing sequence diagrams?',
description: 'Is it possible to support previewing sequence diagrams? Such as\n\n````sequence\nAlice->Bob: Hello Bob, how are you?\nNote right of Bob: Bob thinks\nBob-->Alice: I am good thanks!\n````\n',
browser: '5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36',
version: '3.6',
date: 1536911367008 },
{ type: 'problem',
status: 'open',
title: 'Unicode characters not displaying correctly',
description: 'works perfect is the best of i find, butt... \nUnicode characters not displaying correctly',
browser: '5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36',
version: '3.6',
date: 1536360343936 }
]
```
The following category names are available:
</details>
Category | Description
--- | ---
`extensions` | All extensions
`ext/[NAME]` | Specific extension's category
`themes` | All themes
`theme/[NAME]` | Specific theme's category
`collection/[NAME]` | Specific collection
### Extension Categories `ext/[NAME]`
# Arguments
`22-accessibility` | `10-blogging` | `15-by-google` | `11-web-development` | `14-fun` | `6-news` | `28-photos` | `7-productivity` | `38-search-tools` | `12-shopping` | `1-communication` | `13-sports`
## detail
### Extension Collections `collection/[NAME]`
Parameter | Example | Description
--- | :---: | ---
**id** | `'ckkdlimhmcjmikdlpkmbgfkaikojcbjk'` | Item ID
**related** | `true` | Additionally return a list of related extensions
**more** | `true` | Additionally return more items from the same developer
`new_noteworthy_extensions` | `editors_picks_extensions` | `chrome_toolkit` | `screen_capture` | `social` | `personalize_chrome` | `tabs_control` | `artistic_extension` | `calendars_planners` | `chat_with_chrome` | `games_extension` | `everyday_extensions` | `3p_accessibility_extensions` | `customize_your_new_tab_page` | `get_started` | `change_the_way_you_work` | `news_weather` | `pdf_extensions` | `lifehacker` | `blogger_extensions` | `online_tools` | `cyber_monday` | `annotate_the_web` | `music_extensions` | `writing_essentials` | `get_organized` | `pomodoro_extensions` | `save_it_for_later` | `ph` | `job_hunting` | `online_productivity` | `quotes_extensions` | `weather_extensions` | `procrastination_station` | `bad_day` | `relax_extensions`
---
### Extension Top Picks Collections `collection/[NAME]`
## items
`3p_accessibility_extensions` | `top_picks_blogging` | `top_picks_web-development` | `top_picks_fun` | `top_picks_news` | `top_picks_photos` | `top_picks_productivity` | `top_picks_search-tools` | `top_picks_shopping` | `top_picks_communication` | `top_picks_sports`
Parameter | Example | Description
--- | :---: | ---
**search** | `'markdown'` | Filter items by search term
**category** | `'extensions'` | Filter items by category name
**rating** | `5` / `4` / `3` / `2` | Filter items by number of stars
**features** | `['free', 'gdrive']` | Filter items by feature set
**count** | `15` | Number of items to return (defaults to 5)
**offset** | `15` | Start returning items from `offset` (**requires** `category`)
### Theme Categories `theme/[NAME]`
### category
`48-by-artists` | `15-by-google`
> Check out [examples/category.json][example-category] for a full list of available category names.
### Theme Collections `collection/[NAME]`
Category | Description
--- | ---
`extensions` | All extensions
`ext/[NAME]` | Extensions category
`themes` | All themes
`theme/[NAME]` | Themes category
`apps` | All apps
`app/[NAME]` | Apps category
`collection/[NAME]` | Collection
`editors_picks_themes` | `dark_themes` | `space_exploration` | `minimalist_themes` | `enchanting_places` | `heroes_themes` | `pretty_patterns` | `colorful_themes` | `car_themes` | `sunny_themes` | `blue_themes` | `flower_themes`
### features
## rating
Filter by number of stars, one of: `5`, `4`, `3` or `2` stars:
```js
var webstore = require('chrome-webstore')
;(async () => {
var meta = await webstore.items({category: 'extensions', rating: 4})
console.log(meta)
})()
```
## features
Filter by set of features:
```js
var webstore = require('chrome-webstore')
;(async () => {
var meta = await webstore.items({category: 'extensions', features: ['offline', 'gdrive']})
console.log(meta)
})()
```
Pick any number of the following:
Value | Description

@@ -253,40 +228,34 @@ --- | ---

## count
---
Request specific number of records (defaults to 5):
## reviews
```js
var webstore = require('chrome-webstore')
Parameter | Example | Description
--- | :---: | ---
**id** | `'ckkdlimhmcjmikdlpkmbgfkaikojcbjk'` | Item ID
**count** | `10` | Number of reviews to return (defaults to 5)
**offset** | `10` | Start returning items from offset
**locale** | `'en'` | Return reviews only in locale (defaults to all locales)
**sort** | `'helpful'` / `'recent'` | Sort order (defaults to helpful)
;(async () => {
var meta = await webstore.items({search: 'markdown', category: 'extensions', count: 15})
console.log(meta)
})()
```
---
## offset
## issues
Return up to results `count` starting from `offset` (useful for pagination):
Parameter | Example | Description
--- | :---: | ---
**id** | `'ckkdlimhmcjmikdlpkmbgfkaikojcbjk'` | Item ID
**type** | `'problem'` / `'question'` / `'suggestion'` | Filter by issue type (defaults to all)
**count** | `10` | Number of issues to return (defaults to 5)
**page** | `2` | Start returning issues from page (page * count)
```js
var webstore = require('chrome-webstore')
# Examples
;(async () => {
var meta = await webstore.items({
search: 'markdown', category: 'extensions', count: 10, offset: 10
})
console.log(meta)
})()
```
> [detail][example-detail] / [items][example-items] / [reviews][example-reviews] / [issues][example-issues]
> **Requires the `category` parameter!**
## Examples
- [detail](https://github.com/simov/chrome-webstore/blob/master/examples/detail.js)
- [items](https://github.com/simov/chrome-webstore/blob/master/examples/items.js)
```bash
node examples/detail.js [example index]
node examples/items.js [example index]
node examples/reviews.js [example index]
node examples/issues.js [example index]
```

@@ -304,1 +273,7 @@

[codecov]: https://codecov.io/github/simov/chrome-webstore?branch=master
[example-category]: https://github.com/simov/chrome-webstore/blob/master/examples/category.json
[example-detail]: https://github.com/simov/chrome-webstore/blob/master/examples/detail.js
[example-items]: https://github.com/simov/chrome-webstore/blob/master/examples/items.js
[example-reviews]: https://github.com/simov/chrome-webstore/blob/master/examples/reviews.js
[example-issues]: https://github.com/simov/chrome-webstore/blob/master/examples/issues.js
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