Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/naokikimura/chrome-web-store-api
- Owner: naokikimura
- License: mit
- Created: 2020-01-23T13:48:24.000Z (almost 5 years ago)
- Default Branch: develop
- Last Pushed: 2022-12-30T19:31:36.000Z (about 2 years ago)
- Last Synced: 2024-08-09T00:20:10.949Z (5 months ago)
- Topics: chrome-web-store
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/chrome-web-store-api
- Size: 258 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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).