Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seven-io/js-client
Official JavaScript API Client for seven.io
https://github.com/seven-io/js-client
api-client cnam hlr mnp rcs sdk sms text2speech tts
Last synced: about 1 month ago
JSON representation
Official JavaScript API Client for seven.io
- Host: GitHub
- URL: https://github.com/seven-io/js-client
- Owner: seven-io
- License: mit
- Created: 2020-01-15T12:56:59.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-11-05T12:57:13.000Z (about 2 months ago)
- Last Synced: 2024-11-07T01:08:20.844Z (about 2 months ago)
- Topics: api-client, cnam, hlr, mnp, rcs, sdk, sms, text2speech, tts
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@seven.io/client
- Size: 1.73 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Official JavaScript API Client for [seven](https://www.seven.io)
## Installation
**This library relies on the global fetch API. To use this library with
Node.js < 18, [node-fetch](https://github.com/node-fetch/node-fetch) is required.**For compatibility with Node.js versions < 12, please also install
the [globalThis polyfill](https://github.com/es-shims/globalThis).### Via NPM
```bash
npm install @seven.io/client
```### Via Yarn
```bash
yarn add @seven.io/client
```### Browser
```html
```
## Example
```javascript
// const globalThis = require('globalthis')(); // uncomment if NodeJS < NodeJS versions < 12
// globalThis.fetch = require('node-fetch').default; // uncomment in NodeJS environments
// const {BalanceResource, Client} = require('@seven.io/client'); // uncomment in NodeJS environmentsimport {BalanceResource, Client} from '@seven.io/client'
const client = new Client({apiKey: 'MY_SUPER_SECRET_SEVEN_IO_API_KEY!'})
const balanceResource = new BalanceResource(client)
balanceResource.get()
.then(console.log)
.catch(console.error);
```## Tests
1. `git clone https://github.com/seven-io/js-client seven-client`
2. `cd seven-client && npm install`
3. `SEVEN_API_KEY= SEVEN_SIGNING_SECRET= npm run test`Set `SEVEN_DEBUG=1` for details printed to `stdout`.
### Support
Need help? Feel free to [contact us](https://www.seven.io/en/company/contact/).
[![MIT](https://img.shields.io/badge/License-MIT-teal.svg)](LICENSE)