Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docs.waifu.it",
"version": "2.0.1",
"version": "2.0.2",
"description": "The new and improved documentation for Waifu.it",
"scripts": {
"dev": "next dev",
Expand All @@ -9,13 +9,13 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/WaifuAPI/docs.waifu.it.git"
"url": "git+https://github.com/WaifuAPI/Documentation.git"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/WaifuAPI/docs.waifu.it/issues"
"url": "https://github.com/WaifuAPI/Documentation/issues"
},
"homepage": "https://github.com/WaifuAPI/docs.waifu.it/#readme",
"homepage": "https://github.com/WaifuAPI/Documentation/#readme",
"dependencies": {
"next": "^13.0.6",
"nextra": "2.0.1",
Expand Down
2 changes: 1 addition & 1 deletion pages/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": {
"title": "License 📝",
"type": "page",
"href": "https://raw.githubusercontent.com/WaifuAPI/docs.waifu.it/master/LICENSE",
"href": "https://raw.githubusercontent.com/WaifuAPI/Waifu.it/production/LICENCE.md",
"newWindow": true
},
"contact": {
Expand Down
2 changes: 1 addition & 1 deletion pages/libraries/Javascript/_meta.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"animefact": {
"title": "anime-fact",
"title": "anime-facts",
"theme": { "collapsed": true }
}
}
3 changes: 2 additions & 1 deletion pages/libraries/Javascript/animefact/_meta.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"search": "Search"
"getstarted": "Get Started",
"generatefact": "Generate Fact"
}
47 changes: 47 additions & 0 deletions pages/libraries/Javascript/animefact/generatefact.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: anime-facts | Generate Fact
---

import { Tab, Tabs } from "nextra-theme-docs";

# Generate Fact

Generate random anime facts from a huge database.


## Functions

| Function | Type | Description | Required? |
| :------: | :------: | ---------------------------------------------------- | :-------: |
| getFact | function | The search function to generate a random anime fact. | Yes |

## Request Samples

<Tabs items={["Node.js"]}>
<Tab>
<>
```js
import AnimeFact from "anime-facts";

// Replace <TOKEN> with your API Token
const api = new AnimeFact("<TOKEN>");
api.getFact().then((res) => console.log(res));
```
</>

</Tab>
</Tabs>

## Response Schema

<Tabs items={["200 OK"]}>
<Tab>
**Content Type:** `application/json`
```json copy=false
{
"id": 5,
"fact": "TEZUKA Osamu is the most famous manga artist in Japan.",
}
```
</Tab>
</Tabs>
27 changes: 27 additions & 0 deletions pages/libraries/Javascript/animefact/getstarted.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { Tab, Tabs } from "nextra-theme-docs";

# Get Started

The "anime-facts" library, is for the `api/facts` endpoint which only serves with that endpoint. It is maintained by the developers
of the Waifu.it API.

## Installation

Instructions for installing the library can be found below.

{/* NOTE: do NOT run a formatter for the time being; it breaks the code blocks below. */}

<Tabs items={["npm", "yarn"]}>
<Tab>
```bash
npm i anime-facts
```
View package at [npmjs.com](https://www.npmjs.com/package/anime-facts)
</Tab>
<Tab>
```bash
yarn add anime-facts
```
View package at [yarnpkg.com](https://yarnpkg.com/package/anime-facts)
</Tab>
</Tabs>
10 changes: 9 additions & 1 deletion pages/libraries/start.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import { Tab, Tabs } from "nextra-theme-docs";

# Get Started
ok i will write

[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
categories of each programming languages.


## Installation

Instructions for installing the library can be found below.

17 changes: 13 additions & 4 deletions pages/list-of-endpoints.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,25 @@ Waifu.it supports a wealth of endpoints, which can be categorized into the follo

## Actions

[Angry:](http://localhost:3000/rest-api/Actions/Angry/search) This endpoint returns a random anime GIF with the angry reaction.
[Angry:](https://docs.waifu.it/rest-api/Actions/Angry/search) This endpoint returns a random anime GIF with the angry reaction.

[Baka:](https://example.com) This endpoint returns a random anime GIF with the baka or idiot reaction.
[Baka:](https://docs.waifu.it/rest-api/Actions/Baka/search) This endpoint returns a random anime GIF with the baka or idiot reaction.


## Emotes

[Blush:](https://example.com) This endpoint returns a random anime GIF with Blush.
[Blush:](https://docs.waifu.it/rest-api/Emotes/Blush/search) This endpoint returns a random anime GIF with Blush.

## Images

[Waifu:](https://docs.waifu.it/rest-api/Images/Waifu/search) Serves with a random anime waifu image with some of it's information.

## Texts

[Fact:](https://example.com) Serves with a random anime fact.
[Fact:](https://docs.waifu.it/rest-api/Texts/Fact/search) Serves with a random anime fact.

[Password:](https://docs.waifu.it/rest-api/Texts/Password/search) Generate's a random `base64` string.

[Quote:](https://docs.waifu.it/rest-api/Texts/Quote/search) Serves with a random anime quote.

[Tags:](https://docs.waifu.it/rest-api/Texts/Tags/search) Response with the available tags for query in certain endpoints.
3 changes: 3 additions & 0 deletions pages/rest-api/Emotes/Blush/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"search": "Search"
}
6 changes: 6 additions & 0 deletions pages/rest-api/Emotes/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"Blush": {
"title": "Blush",
"theme": { "collapsed": true }
}
}
3 changes: 3 additions & 0 deletions pages/rest-api/Images/Waifu/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"search": "Search"
}
1 change: 1 addition & 0 deletions pages/rest-api/Images/Waifu/search.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
owo WIP
6 changes: 6 additions & 0 deletions pages/rest-api/Images/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"Waifu": {
"title": "Waifu",
"theme": { "collapsed": true }
}
}
3 changes: 3 additions & 0 deletions pages/rest-api/Texts/Fact/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"search": "Search"
}
1 change: 1 addition & 0 deletions pages/rest-api/Texts/Fact/search.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
owo WIP
3 changes: 3 additions & 0 deletions pages/rest-api/Texts/Password/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"search": "Search"
}
1 change: 1 addition & 0 deletions pages/rest-api/Texts/Password/search.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
owo WIP
3 changes: 3 additions & 0 deletions pages/rest-api/Texts/Quote/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"search": "Search"
}
1 change: 1 addition & 0 deletions pages/rest-api/Texts/Quote/search.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
owo WIP
3 changes: 3 additions & 0 deletions pages/rest-api/Texts/Tags/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"search": "Search"
}
1 change: 1 addition & 0 deletions pages/rest-api/Texts/Tags/search.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
owo WIP
18 changes: 18 additions & 0 deletions pages/rest-api/Texts/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"Fact": {
"title": "Fact",
"theme": { "collapsed": true }
},
"Password": {
"title": "Password",
"theme": { "collapsed": true }
},
"Quote": {
"title": "Quote",
"theme": { "collapsed": true }
},
"Tags": {
"title": "Tags",
"theme": { "collapsed": true }
}
}
6 changes: 4 additions & 2 deletions pages/rest-api/_meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"start": "Get Started",

"Actions": { "title": "Actions", "theme": { "collapsed": true } }
"Actions": { "title": "Actions", "theme": { "collapsed": true } },
"Emotes": { "title": "Emotes", "theme": { "collapsed": true } },
"Images": { "title": "Images", "theme": { "collapsed": true } },
"Texts": { "title": "Texts", "theme": { "collapsed": true } }
}
8 changes: 4 additions & 4 deletions pages/rest-api/start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The base URL for the Waifu.it REST API is: [`https://waifu.it/api/:endpoint`](ht

- Use the API token that you generate to authenticate each request made to the API.

> If you don't have an API token, then just head over to https://docs.waifu.it/#frequently-asked-questions-faqs, then read and get one for free.
> If you don't have an API token, then just head over to https://docs.waifu.it/faq, then read and get one for free.

**Request Header**
>
Expand Down Expand Up @@ -69,20 +69,20 @@ The base URL for the Waifu.it REST API is: [`https://waifu.it/api/:endpoint`](ht

<Tabs items={["200 OK", "404 Not Found", "500 Internal Server Error"]}>
<Tab>
**MIME Type:** `application/json`
**Content Type:** `application/json`
```json copy=false
"status": 200,
"message": {}
```
</Tab>
<Tab>
**MIME Type:** `application/json`
**Content Type:** `application/json`
```json copy=false
"message": {}
```
</Tab>
<Tab>
**MIME Type:** `application/json`
**Content Type:** `application/json`
```json copy=false
"message": {}
```
Expand Down
8 changes: 4 additions & 4 deletions theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const config: DocsThemeConfig = {
},
faviconGlyph: "🚧",
banner: {
text: "🚧 The Waifu.it documentation is undergoing reconstruction. Please be patient for it to be fully-documented. 🚧",
text: "🚧 Documentation is undergoing reconstruction 🚧",
},
logo: <span>Documentation</span>,
navbar: {
Expand Down Expand Up @@ -48,12 +48,12 @@ const config: DocsThemeConfig = {
},
},
project: {
link: "https://github.com/",
link: "https://github.com/WaifuAPI",
},
chat: {
link: "https://discord.gg/",
link: "https://discord.gg/yyW389c",
},
docsRepositoryBase: "https://github.com/Waifu.it/docs.Waifu.it.org",
docsRepositoryBase: "https://github.com/WaifuAPI/Documentation/tree/production",
footer: {
text: "© 2021-2023 Waifu.it",
},
Expand Down