Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fc5570/beat-api.js
A wrapper for https://beat-api.herokuapp.com/
https://github.com/fc5570/beat-api.js
api javascript js wrapper
Last synced: about 2 months ago
JSON representation
A wrapper for https://beat-api.herokuapp.com/
- Host: GitHub
- URL: https://github.com/fc5570/beat-api.js
- Owner: FC5570
- License: mit
- Created: 2021-03-13T17:05:01.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-25T21:24:06.000Z (over 2 years ago)
- Last Synced: 2024-08-09T23:04:55.727Z (5 months ago)
- Topics: api, javascript, js, wrapper
- Language: JavaScript
- Homepage: https://beat-api.herokuapp.com/
- Size: 6.84 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# beat-api.js
A wrapper for https://beat-api.herokuapp.com/
### Installation
NPM -
```
npm i beat-api.js
```Yarn -
```
yarn add beat-api.js
```### Basic Usage
```
const API = require("beat-api.js")
const api = new API()
```### Functions
| Functions | Paramters | Description |
| ------------- | --------- | ------------------------------------------------------------------------------------------------ |
| `emergency()` | text | Generates an emergency meeting image. Text is the text you want. Example: https://prnt.sc/zeqasq |
| `weather()` | city | Get the weather for a city. |
| `shorten()` | url | Shorten a url. |
| `cat()` | none | Get a random cat image or gif. |
| `dog()` | none | Get a random dog image |
| `roast()` | none | Get a random roast |### Examples
Cat endpoint:
```
const API = require("beat-api.js")
const api = new API()api.cat().then(m => console.log(m)) // {url: 'https://cdn2.thecatapi.com/images/8oufxfuHp.png'}
```### All functions return a promise, make sure to resolve them. If you need any help, contact Beatzoid#8010 or FC#5104 on Discord.