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)
|
2 | A 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 | ```
|
8 | npm i alexflipnote.js
|
9 | ```
|
10 |
|
11 | ## Recent Updates
|
12 | Since 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
|
37 | I 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
|
42 | const client = require('alexflipnote.js');
|
43 | const alexclient = new client();
|
44 | let link = await alexclient.image.cats();
|
45 | message.channel.send({files: [{ attachment: link.file }]});
|
46 |
|
47 | ```
|
48 |
|
49 | ### Color Example
|
50 | ```js
|
51 | const client = require('alexflipnote.js');
|
52 | const alexclient = new client();
|
53 | let body = await alexclient.others.color('00ffd9');
|
54 | message.channel.send(body);
|
55 |
|
56 | ```
|
57 | returns:
|
58 | ```cmd
|
59 | {
|
60 | "blackorwhite_text": "#ffffff",
|
61 | "brightness": 157,
|
62 | "hex": "#00ffd9",
|
63 | "image": "https://api.alexflipnote.dev/color/image/00ffd9",
|
64 | "image_gradient": "https://api.alexflipnote.dev/color/image/gradient/00ffd9",
|
65 | "int": 65497,
|
66 | "name": "Bright Teal",
|
67 | "rgb": "rgb(0, 255, 217)",
|
68 | "rgb_values": {"r": 0, "g": 255, "b": 217},
|
69 | "shade": ["00ffd9", "00e5c3", "00ccad", "00b297", "009982", "007f6c", "006556", "004c41", "00322b", "001915", "000000"],
|
70 | "tint": ["00ffd9", "19ffdc", "33ffe0", "4cffe4", "66ffe8", "7fffec", "99ffef", "b2fff3", "ccfff7", "e5fffb", "FFFFFF"]
|
71 | }
|
72 | ```
|
73 |
|
74 | # Made By
|
75 | This wrapper is made by HarutoHiroki#4000 on Discord.
|
76 |
|
77 | For questions and bug reports you can join [my server](https://discord.gg/sjtcnRb) or [AlexFlipnote's server](https://discord.gg/alexflipnote)
|
78 |
|
79 | Suggestions are welcomed!
|