https://github.com/redleague/node-weeby
Wrapper for Weeby API (https://weebyapi.xyz/)
https://github.com/redleague/node-weeby
node-weeby red-league weeby-api wrapper
Last synced: about 2 months ago
JSON representation
Wrapper for Weeby API (https://weebyapi.xyz/)
- Host: GitHub
- URL: https://github.com/redleague/node-weeby
- Owner: redleague
- License: mit
- Created: 2021-02-22T03:32:31.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-27T16:13:38.000Z (almost 4 years ago)
- Last Synced: 2024-04-23T14:41:49.153Z (about 1 year ago)
- Topics: node-weeby, red-league, weeby-api, wrapper
- Language: TypeScript
- Homepage:
- Size: 29.3 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-weeby
Node.js wrapper for [Weeby API](https://weebyapi.ntmnathan.com/), developed by [Red League](https://github.com/redleague) on behalf of NTM Development.[](https://nodei.co/npm/node-weeby/)
## Getting Started
Installing with NPM.
```js
npm install node-weeby --save
```## Support
Found an issue while using this wrapper or have suggestions? Feel free to join the [Red League](https://discord.gg/HCjEmNpp8t) Discord Server, send a bug report or a pull request.## Authentication
`node-weeby` requires an authorization token which will have to be obtained on the [NTM Discord](https://weebyapi.xyz/discord) Server by messaging the Weeby API Bot. Please read more about this on the [Weeby API Website](https://weebyapi.xyz/).### Example Usage
Typescript:
```ts
import { WeebyAPI } from 'node-weeby';const client: WeebyAPI = new WeebyAPI({ token: 'YOUR_TOKEN' });
/* without promise */
(async () => {
const pat = await client.gif('pat');
console.log(pat)
})();/* with promise */
client.gif('akko').then(i => console.log(i));
```Javascript:
```js
const { WeebyAPI } = require('node-weeby')const client = new WeebyAPI({ token: 'YOUR_TOKEN' });
/* without promise */
(async () => {
const pat = await client.gif('pat');
console.log(pat)
})();/* with promise */
client.gif('akko').then(i => console.log(i));
```## Functions
### GIF
```js
client.gif('type');
```### Word
```js
client.word('type');
```