Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leopiccionia/numista-sdk
Unofficial JavaScript/TypeScript SDK for Numista
https://github.com/leopiccionia/numista-sdk
numismatics numista
Last synced: 10 days ago
JSON representation
Unofficial JavaScript/TypeScript SDK for Numista
- Host: GitHub
- URL: https://github.com/leopiccionia/numista-sdk
- Owner: leopiccionia
- License: mit
- Created: 2022-03-17T02:57:57.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-26T14:59:16.000Z (over 1 year ago)
- Last Synced: 2024-12-31T01:34:33.241Z (18 days ago)
- Topics: numismatics, numista
- Language: TypeScript
- Homepage: https://leopiccionia.github.io/numista-sdk/
- Size: 294 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# @leopiccionia/numista-sdk
This is an unofficial JavaScript/TypeScript SDK for [Numista](https://en.numista.com/). It can run in both browsers and servers.
## Installing
```bash
npm install @leopiccionia/numista-sdk
```## Getting started
Before starting, you'll need a Numista API key ([get one here](https://en.numista.com/api/doc/index.php)).
```ts
import { NumistaConnector } from '@leopiccionia/numista-sdk'const numista = new NumistaConnector(YOUR_API_KEY, YOUR_CLIENT_ID, { defaultLanguage: 'en' })
// Get the Morgan Dollar
const morganDollar = await numista.type(1492)// Get the Peace Dollar
const peaceDollar = await numista.code('KM', '150', { issuer: 'united-states' })// Get all American coins depicting a buffalo
const buffalos = await numista.searchCoins('buffalo', { issuer: 'united-states' })
```## Features
- Great type-safety and IntelliSense support
- `Promise`-based APIs, designed for `async`/`await`
- Proper error handling:
- The connector returns `RequestError` if the connection with the server failed
- The connector returns `ResponseError` if the server responded with an error message## Learn more
- [See full documentation](https://leopiccionia.github.io/numista-sdk/modules.html)
- See demos:
- [OAuth authorization code with Vue](https://github.com/leopiccionia/numista-sdk/tree/main/demos/oauth)