Skip to content

Commit 1d1c505

Browse files
committed
Added docs for node library and some endpoints
1 parent bf458ac commit 1d1c505

File tree

22 files changed

+147
-9
lines changed

22 files changed

+147
-9
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"animefact": {
3-
"title": "anime-fact",
3+
"title": "anime-facts",
44
"theme": { "collapsed": true }
55
}
66
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"search": "Search"
2+
"getstarted": "Get Started",
3+
"generatefact": "Generate Fact"
34
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: anime-facts | Generate Fact
3+
---
4+
5+
import { Tab, Tabs } from "nextra-theme-docs";
6+
7+
# Generate Fact
8+
9+
Generate random anime facts from a huge database.
10+
11+
12+
## Functions
13+
14+
| Function | Type | Description | Required? |
15+
| :------: | :------: | ---------------------------------------------------- | :-------: |
16+
| getFact | function | The search function to generate a random anime fact. | Yes |
17+
18+
## Request Samples
19+
20+
<Tabs items={["Node.js"]}>
21+
<Tab>
22+
<>
23+
```js
24+
import AnimeFact from "anime-facts";
25+
26+
// Replace <TOKEN> with your API Token
27+
const api = new AnimeFact("<TOKEN>");
28+
api.getFact().then((res) => console.log(res));
29+
```
30+
</>
31+
32+
</Tab>
33+
</Tabs>
34+
35+
## Response Schema
36+
37+
<Tabs items={["200 OK"]}>
38+
<Tab>
39+
**Content Type:** `application/json`
40+
```json copy=false
41+
{
42+
"id": 5,
43+
"fact": "TEZUKA Osamu is the most famous manga artist in Japan.",
44+
}
45+
```
46+
</Tab>
47+
</Tabs>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { Tab, Tabs } from "nextra-theme-docs";
2+
3+
# Get Started
4+
5+
The "anime-facts" library, is for the `api/facts` endpoint which only serves with that endpoint. It is maintained by the developers
6+
of the Waifu.it API.
7+
8+
## Installation
9+
10+
Instructions for installing the library can be found below.
11+
12+
{/* NOTE: do NOT run a formatter for the time being; it breaks the code blocks below. */}
13+
14+
<Tabs items={["npm", "yarn"]}>
15+
<Tab>
16+
```bash
17+
npm i anime-facts
18+
```
19+
View package at [npmjs.com](https://www.npmjs.com/package/anime-facts)
20+
</Tab>
21+
<Tab>
22+
```bash
23+
yarn add anime-facts
24+
```
25+
View package at [yarnpkg.com](https://yarnpkg.com/package/anime-facts)
26+
</Tab>
27+
</Tabs>

pages/libraries/start.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1+
import { Tab, Tabs } from "nextra-theme-docs";
12

23
# Get Started
3-
ok i will write
4+
5+
[Waifu.it](https://waifu.it) community has also made many awesome libraries for the api. Everything that is made by the community and the developer team are featured in
6+
categories of each programming languages.
7+
8+
9+
## Installation
10+
11+
Instructions for installing the library can be found below.
412

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"search": "Search"
3+
}
File renamed without changes.

pages/rest-api/Emotes/_meta.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"Blush": {
3+
"title": "Blush",
4+
"theme": { "collapsed": true }
5+
}
6+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"search": "Search"
3+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
owo WIP

0 commit comments

Comments
 (0)