Skip to content

Commit

Permalink
Merge pull request #48 from WaifuAPI/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
kyrea authored Jan 10, 2024
2 parents 0ee5f34 + 249fa73 commit d38876d
Show file tree
Hide file tree
Showing 74 changed files with 188 additions and 152 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docs.waifu.it",
"version": "3.0.5",
"version": "3.0.6",
"description": "The new and improved documentation for Waifu.it",
"scripts": {
"dev": "next dev",
Expand Down
2 changes: 1 addition & 1 deletion pages/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<br />

### How do I get the API token?
- To get your API token, join this [discord server](https://discord.gg/yyW389c), then type `-claim` in [#bot-commands](https://discord.com/channels/479300008118714388/800784815908454452), fill the questions asked by `@Kohai` in DM, and receive your token.
- To get your API token, just login to [dashboard](https://waifu.it/dashboard)

{/* ### CORS causing trouble?
Expand Down
13 changes: 11 additions & 2 deletions pages/rest-api/Images/Waifu/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ The request to the `/waifu` endpoint should be a JSON object with the following
| --------------- | ------- | ---------------------------------------------------- | -------- |
| `Authorization` | string | The unique identifier of the user sending the request. | True |

### Parameters

The request parameters for the `/waifu?{parameter}={value}` endpoint.

| Parameter | Type | Description | Required |
| ----------| ------ | ----------------------------------------------------- | -------- |
| `name` | string | (Optional) The desired character name for the query. If not provided, a random waifu will be generated. | False |
| `anime` | string | (Optional) The desired anime name for the query. If not provided, a random waifu will be selected. | False |

### Example Request
Here's example of how to make a request to the `/waifu` endpoint.

Expand All @@ -44,7 +53,7 @@ Here's example of how to make a request to the `/waifu` endpoint.
/*
Replace "YOUR_ACCESS_TOKEN" with the token you got from the Kohai Bot and the endpoint.
*/
const url = "https://waifu.it/api/waifu";
const url = "https://waifu.it/api/v4/waifu";
const data = async () => {
try {
const { data } = await axios.get(url, { headers: {
Expand All @@ -66,7 +75,7 @@ Here's example of how to make a request to the `/waifu` endpoint.
"""
Replace "YOUR_ACCESS_TOKEN" with the token you got from the Kohai Bot and the endpoint.
"""
url = "https://waifu.it/api/waifu"
url = "https://waifu.it/api/v4/waifu"
response = requests.get(url, headers={
"Authorization": "YOUR_ACCESS_TOKEN",
})
Expand Down
4 changes: 2 additions & 2 deletions pages/rest-api/Interactions/Angry/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The request to the `/angry` endpoint should be a JSON object with the following
/*
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
*/
const url = "https://waifu.it/api/angry";
const url = "https://waifu.it/api/v4/angry";
const data = async () => {
try {
const { data } = await axios.get(url, { headers: {
Expand All @@ -52,7 +52,7 @@ The request to the `/angry` endpoint should be a JSON object with the following
"""
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
"""
url = "https://waifu.it/api/angry"
url = "https://waifu.it/api/v4/angry"
response = requests.get(url, headers={
"Authorization": "Your-API-Token",
})
Expand Down
4 changes: 2 additions & 2 deletions pages/rest-api/Interactions/Baka/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The request to the `/baka` endpoint should be a JSON object with the following h
/*
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
*/
const url = "https://waifu.it/api/baka";
const url = "https://waifu.it/api/v4/baka";
const data = async () => {
try {
const { data } = await axios.get(url, { headers: {
Expand All @@ -52,7 +52,7 @@ The request to the `/baka` endpoint should be a JSON object with the following h
"""
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
"""
url = "https://waifu.it/api/baka"
url = "https://waifu.it/api/v4/baka"
response = requests.get(url, headers={
"Authorization": "Your-API-Token",
})
Expand Down
4 changes: 2 additions & 2 deletions pages/rest-api/Interactions/Bite/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The request to the `/bite` endpoint should be a JSON object with the following h
/*
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
*/
const url = "https://waifu.it/api/bite";
const url = "https://waifu.it/api/v4/bite";
const data = async () => {
try {
const { data } = await axios.get(url, { headers: {
Expand All @@ -52,7 +52,7 @@ The request to the `/bite` endpoint should be a JSON object with the following h
"""
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
"""
url = "https://waifu.it/api/bite"
url = "https://waifu.it/api/v4/bite"
response = requests.get(url, headers={
"Authorization": "Your-API-Token",
})
Expand Down
4 changes: 2 additions & 2 deletions pages/rest-api/Interactions/Blush/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The request to the `/blush` endpoint should be a JSON object with the following
/*
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
*/
const url = "https://waifu.it/api/blush";
const url = "https://waifu.it/api/v4/blush";
const data = async () => {
try {
const { data } = await axios.get(url, { headers: {
Expand All @@ -52,7 +52,7 @@ The request to the `/blush` endpoint should be a JSON object with the following
"""
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
"""
url = "https://waifu.it/api/blush"
url = "https://waifu.it/api/v4/blush"
response = requests.get(url, headers={
"Authorization": "Your-API-Token",
})
Expand Down
4 changes: 2 additions & 2 deletions pages/rest-api/Interactions/Bonk/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The request to the `/bonk` endpoint should be a JSON object with the following h
/*
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
*/
const url = "https://waifu.it/api/bonk";
const url = "https://waifu.it/api/v4/bonk";
const data = async () => {
try {
const { data } = await axios.get(url, { headers: {
Expand All @@ -52,7 +52,7 @@ The request to the `/bonk` endpoint should be a JSON object with the following h
"""
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
"""
url = "https://waifu.it/api/bonk"
url = "https://waifu.it/api/v4/bonk"
response = requests.get(url, headers={
"Authorization": "Your-API-Token",
})
Expand Down
4 changes: 2 additions & 2 deletions pages/rest-api/Interactions/Bored/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The request to the `/bored` endpoint should be a JSON object with the following
/*
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
*/
const url = "https://waifu.it/api/bored";
const url = "https://waifu.it/api/v4/bored";
const data = async () => {
try {
const { data } = await axios.get(url, { headers: {
Expand All @@ -52,7 +52,7 @@ The request to the `/bored` endpoint should be a JSON object with the following
"""
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
"""
url = "https://waifu.it/api/bored"
url = "https://waifu.it/api/v4/bored"
response = requests.get(url, headers={
"Authorization": "Your-API-Token",
})
Expand Down
4 changes: 2 additions & 2 deletions pages/rest-api/Interactions/Bully/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The request to the `/bully` endpoint should be a JSON object with the following
/*
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
*/
const url = "https://waifu.it/api/bully";
const url = "https://waifu.it/api/v4/bully";
const data = async () => {
try {
const { data } = await axios.get(url, { headers: {
Expand All @@ -52,7 +52,7 @@ The request to the `/bully` endpoint should be a JSON object with the following
"""
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
"""
url = "https://waifu.it/api/bully"
url = "https://waifu.it/api/v4/bully"
response = requests.get(url, headers={
"Authorization": "Your-API-Token",
})
Expand Down
4 changes: 2 additions & 2 deletions pages/rest-api/Interactions/Bye/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The request to the `/bye` endpoint should be a JSON object with the following he
/*
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
*/
const url = "https://waifu.it/api/bye";
const url = "https://waifu.it/api/v4/bye";
const data = async () => {
try {
const { data } = await axios.get(url, { headers: {
Expand All @@ -52,7 +52,7 @@ The request to the `/bye` endpoint should be a JSON object with the following he
"""
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
"""
url = "https://waifu.it/api/bye"
url = "https://waifu.it/api/v4/bye"
response = requests.get(url, headers={
"Authorization": "Your-API-Token",
})
Expand Down
4 changes: 2 additions & 2 deletions pages/rest-api/Interactions/Chase/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The request to the `/chase` endpoint should be a JSON object with the following
/*
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
*/
const url = "https://waifu.it/api/chase";
const url = "https://waifu.it/api/v4/chase";
const data = async () => {
try {
const { data } = await axios.get(url, { headers: {
Expand All @@ -52,7 +52,7 @@ The request to the `/chase` endpoint should be a JSON object with the following
"""
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
"""
url = "https://waifu.it/api/chase"
url = "https://waifu.it/api/v4/chase"
response = requests.get(url, headers={
"Authorization": "Your-API-Token",
})
Expand Down
4 changes: 2 additions & 2 deletions pages/rest-api/Interactions/Cheer/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The request to the `/cheer` endpoint should be a JSON object with the following
/*
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
*/
const url = "https://waifu.it/api/cheer";
const url = "https://waifu.it/api/v4/cheer";
const data = async () => {
try {
const { data } = await axios.get(url, { headers: {
Expand All @@ -52,7 +52,7 @@ The request to the `/cheer` endpoint should be a JSON object with the following
"""
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
"""
url = "https://waifu.it/api/cheer"
url = "https://waifu.it/api/v4/cheer"
response = requests.get(url, headers={
"Authorization": "Your-API-Token",
})
Expand Down
4 changes: 2 additions & 2 deletions pages/rest-api/Interactions/Cringe/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The request to the `/cringe` endpoint should be a JSON object with the following
/*
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
*/
const url = "https://waifu.it/api/cringe";
const url = "https://waifu.it/api/v4/cringe";
const data = async () => {
try {
const { data } = await axios.get(url, { headers: {
Expand All @@ -52,7 +52,7 @@ The request to the `/cringe` endpoint should be a JSON object with the following
"""
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
"""
url = "https://waifu.it/api/cringe"
url = "https://waifu.it/api/v4/cringe"
response = requests.get(url, headers={
"Authorization": "Your-API-Token",
})
Expand Down
4 changes: 2 additions & 2 deletions pages/rest-api/Interactions/Cry/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The request to the `/cry` endpoint should be a JSON object with the following he
/*
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
*/
const url = "https://waifu.it/api/cry";
const url = "https://waifu.it/api/v4/cry";
const data = async () => {
try {
const { data } = await axios.get(url, { headers: {
Expand All @@ -52,7 +52,7 @@ The request to the `/cry` endpoint should be a JSON object with the following he
"""
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
"""
url = "https://waifu.it/api/cry"
url = "https://waifu.it/api/v4/cry"
response = requests.get(url, headers={
"Authorization": "Your-API-Token",
})
Expand Down
4 changes: 2 additions & 2 deletions pages/rest-api/Interactions/Cuddle/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The request to the `/cuddle` endpoint should be a JSON object with the following
/*
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
*/
const url = "https://waifu.it/api/cuddle";
const url = "https://waifu.it/api/v4/cuddle";
const data = async () => {
try {
const { data } = await axios.get(url, { headers: {
Expand All @@ -52,7 +52,7 @@ The request to the `/cuddle` endpoint should be a JSON object with the following
"""
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
"""
url = "https://waifu.it/api/cuddle"
url = "https://waifu.it/api/v4/cuddle"
response = requests.get(url, headers={
"Authorization": "Your-API-Token",
})
Expand Down
4 changes: 2 additions & 2 deletions pages/rest-api/Interactions/Dab/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The request to the `/dab` endpoint should be a JSON object with the following he
/*
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
*/
const url = "https://waifu.it/api/dab";
const url = "https://waifu.it/api/v4/dab";
const data = async () => {
try {
const { data } = await axios.get(url, { headers: {
Expand All @@ -52,7 +52,7 @@ The request to the `/dab` endpoint should be a JSON object with the following he
"""
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
"""
url = "https://waifu.it/api/dab"
url = "https://waifu.it/api/v4/dab"
response = requests.get(url, headers={
"Authorization": "Your-API-Token",
})
Expand Down
4 changes: 2 additions & 2 deletions pages/rest-api/Interactions/Dance/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The request to the `/dance` endpoint should be a JSON object with the following
/*
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
*/
const url = "https://waifu.it/api/dance";
const url = "https://waifu.it/api/v4/dance";
const data = async () => {
try {
const { data } = await axios.get(url, { headers: {
Expand All @@ -52,7 +52,7 @@ The request to the `/dance` endpoint should be a JSON object with the following
"""
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
"""
url = "https://waifu.it/api/dance"
url = "https://waifu.it/api/v4/dance"
response = requests.get(url, headers={
"Authorization": "Your-API-Token",
})
Expand Down
4 changes: 2 additions & 2 deletions pages/rest-api/Interactions/Die/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The request to the `/die` endpoint should be a JSON object with the following he
/*
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
*/
const url = "https://waifu.it/api/die";
const url = "https://waifu.it/api/v4/die";
const data = async () => {
try {
const { data } = await axios.get(url, { headers: {
Expand All @@ -52,7 +52,7 @@ The request to the `/die` endpoint should be a JSON object with the following he
"""
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
"""
url = "https://waifu.it/api/die"
url = "https://waifu.it/api/v4/die"
response = requests.get(url, headers={
"Authorization": "Your-API-Token",
})
Expand Down
4 changes: 2 additions & 2 deletions pages/rest-api/Interactions/Disgust/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The request to the `/disgust` endpoint should be a JSON object with the followin
/*
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
*/
const url = "https://waifu.it/api/disgust";
const url = "https://waifu.it/api/v4/disgust";
const data = async () => {
try {
const { data } = await axios.get(url, { headers: {
Expand All @@ -52,7 +52,7 @@ The request to the `/disgust` endpoint should be a JSON object with the followin
"""
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
"""
url = "https://waifu.it/api/disgust"
url = "https://waifu.it/api/v4/disgust"
response = requests.get(url, headers={
"Authorization": "Your-API-Token",
})
Expand Down
4 changes: 2 additions & 2 deletions pages/rest-api/Interactions/Facepalm/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The request to the `/facepalm` endpoint should be a JSON object with the followi
/*
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
*/
const url = "https://waifu.it/api/facepalm";
const url = "https://waifu.it/api/v4/facepalm";
const data = async () => {
try {
const { data } = await axios.get(url, { headers: {
Expand All @@ -52,7 +52,7 @@ The request to the `/facepalm` endpoint should be a JSON object with the followi
"""
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
"""
url = "https://waifu.it/api/facepalm"
url = "https://waifu.it/api/v4/facepalm"
response = requests.get(url, headers={
"Authorization": "Your-API-Token",
})
Expand Down
4 changes: 2 additions & 2 deletions pages/rest-api/Interactions/Feed/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The request to the `/feed` endpoint should be a JSON object with the following h
/*
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
*/
const url = "https://waifu.it/api/feed";
const url = "https://waifu.it/api/v4/feed";
const data = async () => {
try {
const { data } = await axios.get(url, { headers: {
Expand All @@ -52,7 +52,7 @@ The request to the `/feed` endpoint should be a JSON object with the following h
"""
Replace "Your-API-Token" with the token you got from the Kohai Bot and the endpoint.
"""
url = "https://waifu.it/api/feed"
url = "https://waifu.it/api/v4/feed"
response = requests.get(url, headers={
"Authorization": "Your-API-Token",
})
Expand Down
Loading

0 comments on commit d38876d

Please sign in to comment.