Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samsoft00/sendstack
🚀 JavaScript API Client for the sendstack.africa delivery
https://github.com/samsoft00/sendstack
javascript nodejs sendstack typescript
Last synced: 8 days ago
JSON representation
🚀 JavaScript API Client for the sendstack.africa delivery
- Host: GitHub
- URL: https://github.com/samsoft00/sendstack
- Owner: samsoft00
- License: mit
- Created: 2022-06-29T20:07:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-04T07:36:30.000Z (over 2 years ago)
- Last Synced: 2023-08-03T08:22:16.299Z (over 1 year ago)
- Topics: javascript, nodejs, sendstack, typescript
- Language: TypeScript
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![](https://github.com/samsoft00/sendstack/blob/main/logo.svg "Sendstack Logo")
# JavaScript API Client for [Sendstack Africa](https://www.sendstack.africa)
## Installation
**This library relies on the global fetch API. To use this library with
Node.js, [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 sendstack
```### Via Yarn
```bash
yarn add sendstack
```### 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 SendstackClient = require('sendstack-client'); // uncomment in NodeJS environmentsnew SendstackClient(", "")
.walletBalance()
.then(balance => console.log(`Current balance: ${balance}`))
.catch(console.error);
```## Tests
1. `git clone https://github.com/samsoft00/sendstack`
2. `cd sendstack && npm install`
3. `SENDSTACK_API_KEY= SENDSTACK_APP_ID= npm run test`Set `SENDSTACK_LIVE_TEST=1` for live tests performing actual HTTP requests.
Set `SENDSTACK_DEBUG=1` for details printed to `stdout`.
### Support
Need help? Feel free to [contact us](https://www.sendstack.africa/).
[![MIT](https://img.shields.io/badge/License-MIT-teal.svg)](LICENSE)