Skip to content

Commit

Permalink
Consolidate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rocktimsaikia committed Aug 30, 2024
1 parent 9f79b92 commit 98ab696
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 228 deletions.
2 changes: 1 addition & 1 deletion client/components/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function Navbar() {
</div>

<Flex gapX="4" align="center" justify="end">
<Link href="/docs-new">
<Link href="/docs">
<Button variant="ghost">
<Text weight="medium" size="3">
{windowSize.width <= 500 ? "Docs" : "Documentation"}
Expand Down
223 changes: 0 additions & 223 deletions client/pages/docs.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion client/pages/_meta.json → client/pages/docs/_meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"docs-new": "Overview",
"index": "Overview",
"auth": "Authentication"
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ It accepts a valid anime ID or name as path parameter in the endpoint and return
/api/v1/anime/<anime_name>
```

> Event tho both of the above approaches work. Quering a anime information via anime ID is generally recommended for more accurate and faster response. Using anime name can lead to inaccuate results if the name does not match properly.
> Event tho both of the above approaches work. Quering an anime information via anime ID is generally recommended for more accurate and faster response. Using anime name can lead to inaccuate results if the name does not match properly.
### Return
It will return the following JSON object:
Expand All @@ -33,5 +33,8 @@ It will return the following JSON object:
```js
const response = await fetch(`/api/v1/anime/${animeId}`)
// or
const response = await fetch(`/api/v1/anime/${animeName}`)

const quote = await response.json()
```
File renamed without changes.
14 changes: 12 additions & 2 deletions client/pages/docs-new.mdx → client/pages/docs/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { InfoCircledIcon, RocketIcon } from "@radix-ui/react-icons";
import { Callout, Text } from "@radix-ui/themes";
import { InfoCircledIcon, RocketIcon, ThickArrowRightIcon, LockClosedIcon } from "@radix-ui/react-icons";
import { Badge, Callout, Text } from "@radix-ui/themes";
import Link from "next/link";
import { Button } from "@radix-ui/themes";

# Animechan API docs

Expand All @@ -25,3 +27,11 @@ import { Callout, Text } from "@radix-ui/themes";
</div>

Here you will find all the currently available resources and API endpoints from Animechan. The API project is still under active development so expect to see new changes and features every week.

Some of the API endpoints are protected and requires a secrect API key to access them. You can learn more about how to get premium API key clicking the button below:<br/>

<Link href="/get-premium">
<Button size="3">
<span>Get Premium API</span> <RocketIcon />
</Button>
</Link>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 98ab696

Please sign in to comment.