Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/boywithkeyboard-archive/gatewayapi
JavaScript SDK for 📬 gatewayapi
https://github.com/boywithkeyboard-archive/gatewayapi
automation cloudflare-workers deno gatewayapi javascript js nodejs sdk sms sms-api sms-gateway sms-service
Last synced: 12 days ago
JSON representation
JavaScript SDK for 📬 gatewayapi
- Host: GitHub
- URL: https://github.com/boywithkeyboard-archive/gatewayapi
- Owner: boywithkeyboard-archive
- License: apache-2.0
- Created: 2024-02-17T20:02:12.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-16T13:49:42.000Z (2 months ago)
- Last Synced: 2024-09-27T20:37:41.267Z (about 2 months ago)
- Topics: automation, cloudflare-workers, deno, gatewayapi, javascript, js, nodejs, sdk, sms, sms-api, sms-gateway, sms-service
- Language: TypeScript
- Homepage: https://npmjs.com/gatewayapi
- Size: 65.4 KB
- Stars: 3
- Watchers: 0
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- License: license
Awesome Lists containing this project
README
## gatewayapi(.js)
### Setup
> [!IMPORTANT]
> You need to open a [gatewayapi](https://gatewayapi.com) account first to use this module. After you have signed up, you can create a new API token [here](https://gatewayapi.com/app/settings/api-oauth/).#### Deno
```ts
import { Client } from 'https://esm.sh/gatewayapi'
```#### Node.js
```bash
npm i gatewayapi
``````ts
import { Client } from 'gatewayapi'
```### Usage
The SDK is fully typed, so getting started shouldn't be much of a challenge.
```ts
const gatewayapi = new Client({
token: '...'
})
```#### `getAccountBalance()`
```ts
const { data, error } = await gatewayapi.getAccountBalance()
```#### `getPrices()`
```ts
const { data, error } = await gatewayapi.getPrices({
format: 'json'
})
```#### `sendMessage()`
```ts
const { data, error } = await gatewayapi.sendMessage({
sender: 'You',
message: '123456 is your verification code.',
to: 4566118311 // +45 66118311
})
```