https://github.com/2bad/rozetka
Unofficial REST API client for rozetka.com.ua
https://github.com/2bad/rozetka
api api-client client nodejs rest rozetka typescript
Last synced: 24 days ago
JSON representation
Unofficial REST API client for rozetka.com.ua
- Host: GitHub
- URL: https://github.com/2bad/rozetka
- Owner: 2BAD
- License: mit
- Created: 2021-11-13T02:19:55.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-05T02:37:09.000Z (over 2 years ago)
- Last Synced: 2023-12-05T03:33:28.217Z (over 2 years ago)
- Topics: api, api-client, client, nodejs, rest, rozetka, typescript
- Language: TypeScript
- Homepage:
- Size: 1.3 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rozetka API Client
Node.js client for unpublished Rozetka API
[](https://www.npmjs.com/package/@2bad/rozetka)
[](https://github.com/2BAD/rozetka/actions/workflows/build.yml)
[](https://github.com/2BAD/rozetka/actions/workflows/integration.yml)
[](https://codecov.io/gh/2BAD/rozetka)
[](https://www.npmjs.com/package/@2bad/rozetka)
[](https://github.com/2BAD/rozetka/search?l=typescript)
## Features
- 🔥 No bullshit
- ✨ Expressive API
- 💪 Strongly typed methods and requests results with TypeScript
- 🚀 Handles records batching and rate limiting for you
- ❤️ Promise-based
## Getting Started
```console
npm install @2bad/rozetka
```
## Usage
```typescript
import { product } from '@2bad/rozetka'
// Get product details
const data = await product.details(6802844)
// Get product description
const data = await product.description(6802844)
// Get current prices for multiple products
const data = await product.price([6802844, 9906369])
```
### Tests
Running tests requires `--experimental-vm-modules` flag, example: `NODE_OPTIONS=--experimental-vm-modules npm run test`
### Note
- Sometimes catalog categories may have wrong **category_id** and **top_category_id** (e.g. 80025), first is mitigated by extracting correct **category_id** from the link, second one should not be relied upon and replaced with warning message `NOT_RELIABLE_SEE_README`.
- **docket** and **gift** properties of product details (`product.details()`)can sometimes return **null** instead of correct value
## License
This project is licensed under the [MIT License](https://github.com/2BAD/rozetka/blob/main/LICENSE)
## Get Help
Open an [issue on GitHub](https://github.com/2bad/rozetka/issues/new)