Skip to content

Commit a2afb8b

Browse files
authored
feat: api docs (#22)
* chore: gitignore .idea/ * feat: ✨ api docs * feat: ✨ more ts-integration stuff * feat: ✨ set up fumadocs-twoslash * chore: 🔧 get husky to stop yelling at me * feat: ✨ fix twoslash, finish ts-integration * chore: 🔧 remove callout import * chore: 🔧 move to anteaterapi.com/reference
1 parent 9008e59 commit a2afb8b

15 files changed

+517
-559
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,7 @@ yarn-error.log*
2828
next-env.d.ts
2929

3030
.worker-next
31-
.wrangler
31+
.wrangler
32+
33+
# jetbrains
34+
.idea/

.husky/commit-msg

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
#!/usr/bin/env bash
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
41
npx --no -- commitlint --edit
52
npx --no -- devmoji --edit --config devmoji.config.cjs

.husky/pre-commit

-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/usr/bin/env bash
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
41
npx --no -- lint-staged

app/docs/[[...slug]]/page.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import defaultMdxComponents from "fumadocs-ui/mdx";
22
import { DocsPage, DocsBody, DocsDescription, DocsTitle } from "fumadocs-ui/page";
3+
import { Popup, PopupContent, PopupTrigger } from "fumadocs-twoslash/ui";
34
import { notFound } from "next/navigation";
45

56
import { source } from "@/app/source";
@@ -24,6 +25,9 @@ export default async function Page({
2425
<MDX
2526
components={{
2627
...defaultMdxComponents,
28+
Popup,
29+
PopupContent,
30+
PopupTrigger,
2731
}}
2832
/>
2933
</DocsBody>

app/layout.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import "fumadocs-twoslash/twoslash.css";
12
import "./global.css";
23
import { RootProvider } from "fumadocs-ui/provider";
34
import { Inter } from "next/font/google";

content/docs/developer/anteaterapi/attribution-policy.mdx

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
title: Attribution Policy
33
---
44

5-
This attribution policy applies to you if you use our hosted instance of Anteater API or use data from our API. If you opt to host your own instance of Anteater API, please see the [LICENSE](https://github.com/icssc/anteater-api?tab=AGPL-3.0-1-ov-file#readme) for requirements that may apply to you.
5+
Thank you for considering Anteater API for your next project! We're glad to be able to help you in your endeavors.
6+
7+
This attribution policy applies to you if you use data from the instance of Anteater API we host at https://anteaterapi.com. If you opt to host your own instance of Anteater API, please see the [LICENSE](https://github.com/icssc/anteater-api?tab=AGPL-3.0-1-ov-file#readme) for requirements that may apply to you.
68

79
## Applications
810

9-
If you use Anteater API for an application, please include the following attribution in a prominent location in relevant contexts. This includes areas where a user is prompted to enter a query that leads to API provided data, and areas where data from Anteater API is displayed. Whenever possible, link to https://anteaterapi.com/attribution when referencing Anteater API.
11+
If you use Anteater API in an application, please include the following attribution in a prominent location in relevant contexts. This includes areas where a user is prompted to enter a query that leads to data provided by the API, and areas where data from Anteater API is displayed. Whenever possible, link to https://anteaterapi.com/attribution when referencing Anteater API.
1012

1113
### Search Bar
1214

content/docs/developer/anteaterapi/fair-use-policy.mdx content/docs/developer/anteaterapi/best-practices.mdx

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
---
2-
title: Fair Use Policy
2+
title: Best Practices
33
---
44

55
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
66

7-
Thank you for considering Anteater API for your next project! We're glad to be able to help you in your endeavors.
8-
9-
Before proceeding, please read through this page in its entirety. By sending a request to the API, it means that you have done so and accept all of its terms.
10-
117
## Rate Limits
128

13-
Rate limits for Anteater API are enforced on a per key, per IP basis. However, our goal with these rate limit is to support almost all applications while preventing abuse. We understand that student projects, especially those made for a hackathon, may experience sudden traffic spikes, and have ensured our rate limits are much higher than what is necessary for almost all applications. If your application requires a higher rate limit, we will evaluate your use case and may choose to increase your rate limit.
9+
You may use most features of Anteater API without requesting an API key. Requests made without keys are subject to a per-IP basis and also draws from a global quota that is replenished on an hourly basis. If the global quota is exhausted, only requests with valid API keys will be accepted, so we recommend that you request an API key [here](https://dashboard.anteaterapi.com).
10+
11+
Rate limits for Anteater API are enforced on a per-key basis otherwise. However, our goal with these rate limits is to support almost all applications while preventing abuse. We understand that student projects, especially those made for a hackathon, may experience sudden traffic spikes, and have ensured our rate limits are much higher than what is necessary for almost all applications. If your application requires a higher rate limit, we will evaluate your use case and may choose to increase your rate limit.
1412

1513
With that being said, we ask that all developers refrain from purposefully sending large amounts of requests in a short interval, or making malicious requests with the intent to exploit vulnerabilities in the API. We reserve the right to blacklist IP addresses making such requests.
1614

17-
If you do believe you have discovered a security vulnerability in Anteater API, please open an issue [here](https://github.com/icssc/anteater-api). Since we do not serve sensitive data, there is no need to report such issues confidentially, nor is there an email address for such purposes.
15+
If you do believe you have discovered a security vulnerability in Anteater API, please open an issue [here](https://github.com/icssc/anteater-api/issues). Since we do not serve sensitive data, there is no need to report such issues confidentially, nor is there an email address for such purposes.
1816

1917
## Setting the `Referer` header
2018

content/docs/developer/anteaterapi/index.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Anteater API
44

55
import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
66

7-
Anteater API is an API maintained by ICSSC Projects that provides various UCI related data. All the data served through Anteater API is publicly accessible, or derived from historically publicly accessible data. If you use our hosted API in your project, or use data obtained though Anteater API, please give us credit in accordance to our [Attribution Policy](/docs/developer/anteaterapi/attribution-policy).
7+
Anteater API is an API maintained by ICSSC Projects that provides various UCI related data. All the data served through Anteater API is publicly accessible, or derived from historically publicly accessible data. If you use data obtained though Anteater API in your project, please give us credit in accordance to our [Attribution Policy](/docs/developer/anteaterapi/attribution-policy).
88

99
You are currently reading the **Developer Docs** for Anteater API. This part of the documentation covers how to properly integrate Anteater API into your own projects. If you're a developer who's interested in helping to improve Anteater API, please refer to the Anteater API [Contributor Docs](/docs/contributor/anteaterapi/getting-started-contributor).
1010

@@ -26,7 +26,7 @@ You are currently reading the **Developer Docs** for Anteater API. This part of
2626

2727
</Accordion>
2828
<Accordion title="How do I start using Anteater API?">
29-
Unlike some other Web APIs, Anteater API does not require API keys or authentication, so you can start using this API immediately. However, in order to ensure a good experience for all users of the API, we ask that you read and abide by the [Fair Use Policy](fair-use-policy).
29+
Unlike some other Web APIs, Anteater API does not require API keys or authentication, so you can start using this API immediately. However, in order to ensure a good experience for all users of the API, we ask that you read and abide by the [Attribution Policy](attribution-policy).
3030

3131
</Accordion>
3232
</Accordions>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"title": "Anteater API",
33
"icon": "Workflow",
4-
"pages": ["fair-use-policy", "attribution-policy", "api-versioning", "rest-api", "graphql-api"]
4+
"pages": ["attribution-policy", "best-practices", "api-versioning", "rest-api", "graphql-api"]
55
}

content/docs/developer/anteaterapi/rest-api/guides/typescript-integration.md

-64
This file was deleted.

0 commit comments

Comments
 (0)