Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/naokikimura/chrome-web-store-api

Chrome Web Store API client for Node.js
https://github.com/naokikimura/chrome-web-store-api

chrome-web-store

Last synced: 23 days ago
JSON representation

Chrome Web Store API client for Node.js

Awesome Lists containing this project

README

        

# chrome-web-store-api

[![npm version](https://badge.fury.io/js/chrome-web-store-api.svg)](https://badge.fury.io/js/chrome-web-store-api) [![CircleCI](https://circleci.com/gh/naokikimura/chrome-web-store-api.svg?style=svg)](https://circleci.com/gh/naokikimura/chrome-web-store-api) [![Known Vulnerabilities](https://snyk.io/test/github/naokikimura/chrome-web-store-api/badge.svg?targetFile=package.json)](https://snyk.io/test/github/naokikimura/chrome-web-store-api?targetFile=package.json)

[Chrome Web Store API](https://developer.chrome.com/webstore/api_index) client for Node.js

## Installation

```sh
npm install chrome-web-store-api
```

## Configuration

Refer to [this page](https://developer.chrome.com/webstore/using_webstore_api) to get the response of credentials and access token.

Set that value in an environment variable.
- `CHROME_WEB_STORE_API_CREDENTIAL`
- `CHROME_WEB_STORE_API_ACCESS_TOKEN_RESPONSE`

For example:
```sh
export CHROME_WEB_STORE_API_CREDENTIAL=$( cat < {
try {
const item = await (new chromeWebStore.Item(itemId)).fetch();

{
const readStream = fs.createReadStream(packageFile);
const result = await item.upload(readStream);
if (result.uploadState === 'FAILURE') {
const message = (result.itemError || []).map(error => error.error_detail).join('\n');
throw new Error(message);
}
console.log('Upload succeeded.');
}

{
const result = await item.publish();
(result.statusDetail || []).forEach(detail => console.log(detail));
}
} catch (error) {
console.error(error);
}
})();
```

## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/naokikimura/chrome-web-store-api

## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).