Skip to content

Latest commit

 

History

History
56 lines (37 loc) · 2.09 KB

README.md

File metadata and controls

56 lines (37 loc) · 2.09 KB

Rozetka API Client

Node.js client for unpublished Rozetka API

NPM Version Build Integration Code coverage License Written in 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

npm install @2bad/rozetka

Usage

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

Get Help

Open an issue on GitHub