UNPKG

3.19 kBMarkdownView Raw
1# alexflipnote.js [![npm](https://img.shields.io/npm/v/alexflipnote.js.svg)](https://www.npmjs.com/package/alexflipnote.js) [![npm](https://img.shields.io/npm/dt/alexflipnote.js.svg?maxAge=3600)](https://www.npmjs.com/package/alexflipnote.js) [![install size](https://packagephobia.now.sh/badge?p=alexflipnote.js)](https://packagephobia.now.sh/result?p=alexflipnote.js)
2A simple AlexFlipnote API Wrapper
3
4[![NPM](https://nodei.co/npm/alexflipnote.js.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/alexflipnote.js/)
5
6## Installation
7```
8npm i alexflipnote.js
9```
10
11## Recent Updates
12Since December 12th 2021, AlexFlipnote's API will no longer be providing image generation endpoints and will only keep random images endpoints.
13![Screenshot](https://cdn.discordapp.com/attachments/757283952141664336/919599803560788050/unknown.png)
14
15## Endpoints
16
17### Image
18| Function | Params | Description | Type |
19| -------- | ------ | ----------- | ---- |
20| `birb()` | none | Sends a random birb image | JSON |
21| `cats()` | none | Sends a random cat image | JSON |
22| `dogs()` | none | Sends a random dog image | JSON |
23| `sadcat()` | none | Sends a random sad cat image | JSON |
24| `coffee()` | none | Sends a random Coffee image | JSON |
25
26### Others
27| Function | Params | Description | Type |
28| -------- | ------ | ----------- | ---- |
29| `color()` | `hex` | Searches a color from hex code and provide more info | JSON |
30
31`birb/cats/dogs/sadcat/coffee` will return a JSON `{file: "https://api.alexflipnote.dev/cats/zDm8l4maVQg_cats.png"}`
32
33`color` will return a JSON (example: [Color](https://github.com/HarutoHiroki/alexflipnote.js/blob/master/README.md#Color-Example))
34
35
36## Typings
37I added a typings file and will be working to perfect it. This allows editors like VSC to use intellisense/autocomplete to suggest functions and help out with parameters and to see what you'll be receiving as a result of function calls.
38
39## Examples
40### Cats Example
41```js
42const client = require('alexflipnote.js');
43
44let link = await alexclient.image.cats();
45message.channel.send({files: [{ attachment: link.file }]});
46
47```
48
49### Color Example
50```js
51const client = require('alexflipnote.js');
52let body = await alexclient.others.color('00ffd9');
53message.channel.send(body);
54
55```
56returns:
57```cmd
58{
59 "blackorwhite_text": "#ffffff",
60 "brightness": 157,
61 "hex": "#00ffd9",
62 "image": "https://api.alexflipnote.dev/color/image/00ffd9",
63 "image_gradient": "https://api.alexflipnote.dev/color/image/gradient/00ffd9",
64 "int": 65497,
65 "name": "Bright Teal",
66 "rgb": "rgb(0, 255, 217)",
67 "rgb_values": {"r": 0, "g": 255, "b": 217},
68 "shade": ["00ffd9", "00e5c3", "00ccad", "00b297", "009982", "007f6c", "006556", "004c41", "00322b", "001915", "000000"],
69 "tint": ["00ffd9", "19ffdc", "33ffe0", "4cffe4", "66ffe8", "7fffec", "99ffef", "b2fff3", "ccfff7", "e5fffb", "FFFFFF"]
70}
71```
72
73# Made By
74This wrapper is made by HarutoHiroki#4000 on Discord.
75
76For questions and bug reports you can join [my server](https://discord.gg/sjtcnRb) or [AlexFlipnote's server](https://discord.gg/alexflipnote)
77
78Suggestions are welcomed!