From 0fbb8326e79d28b4af21dc42a2f7362efc6d0cbe Mon Sep 17 00:00:00 2001 From: Maniload <1999mani@gmail.com> Date: Mon, 28 Jul 2025 20:56:08 +0200 Subject: [PATCH] docs: Added reference index page and adjusted home page --- docs/.vitepress/config.js | 7 +- docs/.vitepress/theme/custom.css | 9 +- docs/index.md | 19 ++- docs/reference.md | 205 +++++++++++++++++++++++++++++++ 4 files changed, 229 insertions(+), 11 deletions(-) create mode 100644 docs/reference.md diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index e744b6c..524ee32 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -519,8 +519,8 @@ export default { lang: 'en-US', lastUpdated: true, title: 'AnimeThemes', - titleTemplate: 'AnimeThemes GraphQL API Documentation', - description: 'AnimeThemes GraphQL API Documentation', + titleTemplate: 'AnimeThemes API Documentation', + description: 'AnimeThemes API Documentation', markdown: { lineNumbers: true }, @@ -556,7 +556,7 @@ export default { }, { text: 'API Reference', - link: '/', + link: '/reference', } ] }, @@ -627,6 +627,7 @@ export default { ] }, ], + '/reference': referenceSidebarItems, '/admin/': referenceSidebarItems, '/auth/': referenceSidebarItems, '/document/': referenceSidebarItems, diff --git a/docs/.vitepress/theme/custom.css b/docs/.vitepress/theme/custom.css index 957b7e4..052e209 100644 --- a/docs/.vitepress/theme/custom.css +++ b/docs/.vitepress/theme/custom.css @@ -1,7 +1,6 @@ :root { - --vp-c-brand: #40b8a6; - --vp-c-brand-light: #75ead4; - --vp-c-brand-lighter: #d1fbf1; - --vp-c-brand-dark: #28766e; - --vp-c-brand-darker: #1e4e4a; + --vp-c-brand-1: #40b8a6; + --vp-c-brand-2: #28766e; + --vp-c-brand-3: #1e4e4a; + --vp-c-brand-soft: rgba(64, 184, 166, 0.16); } \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index d624c04..2ef4922 100644 --- a/docs/index.md +++ b/docs/index.md @@ -3,7 +3,7 @@ layout: home hero: name: AnimeThemes - text: GraphQL API Documentation + text: API Documentation tagline: Access our repository of Anime opening and ending themes for your development needs image: light: /logo.svg @@ -11,15 +11,28 @@ hero: alt: Logo actions: - theme: brand - text: Get Started + text: Get Started with GraphQL link: /graphql/intro/ - theme: alt text: GraphiQL link: https://graphql.animethemes.moe/graphiql + - theme: alt + text: Get Started with JSON:API + link: /intro features: - icon: πŸ” title: Advanced Querying details: Support for randomization, searching and filtering by direct fields and relation fields out of the box link: /graphql/guide/filtering/ - linkText: Example + linkText: GraphQL Example + - icon: πŸ“» + title: Media Links + details: Embed or download audio and video using links provided by resources + link: /wiki/video/show/#response + linkText: JSON:API Example + - icon: πŸ•ΈοΈ + title: External Mappings + details: Find resources based on their mappings to sites like MyAnimeList or AniList + link: /intro/jsonapi/#has-filter + linkText: JSON:API Example --- \ No newline at end of file diff --git a/docs/reference.md b/docs/reference.md new file mode 100644 index 0000000..fc43a09 --- /dev/null +++ b/docs/reference.md @@ -0,0 +1,205 @@ +--- +title: API Reference +--- + +# API Reference + +## Wiki + +--- + +Wiki API resources comprise the repository of anime opening and ending themes and their contextual relations. + +### Resources + +**[Anime](/wiki/anime/)** + +An anime API resource represents a production with at least one opening or ending sequence. + +**[Anime Image](/wiki/animeimage/)** + +An anime image API resource represents the association between an anime and an image. + +**[Anime Resource](/wiki/animeresource/)** + +An anime resource API resource represents the association between an anime and an external resource. + +**[Anime Series](/wiki/animeseries/)** + +An anime series API resource represents the association between an anime and a series. + +**[Anime Studio](/wiki/animestudio/)** + +An anime studio API resource represents the association between an anime and a studio. + +**[Anime Synonym](/wiki/animesynonym/)** + +An anime synonym API resource represents an alternate title or common abbreviation for an anime. + +**[Anime Theme](/wiki/animetheme/)** + +An anime theme API resource represents an OP or ED sequence for an anime. + +**[Anime Theme Entry](/wiki/animethemeentry/)** + +An anime theme entry API resource represents a version of an anime theme. + +**[Anime Theme Entry Video](/wiki/animethemeentryvideo/)** + +An anime theme entry video API resource represents the association between an anime theme entry and a video. + +**[Artist](/wiki/artist/)** + +An artist API resource represents a musical performer of anime sequences. + +**[Artist Image](/wiki/artistimage/)** + +An artist image API resource represents the association between an artist and an image. + +**[Artist Member](/wiki/artistmember/)** + +An artist member API resource represents the association of an artist and a group/unit. + +**[Artist Resource](/wiki/artistresource/)** + +An artist resource API resource represents the association between an artist and an external resource. + +**[Artist Song](/wiki/artistsong/)** + +An artist song API resource represents the association between an artist and a song. + +**[Audio](/wiki/audio/)** + +An audio API resource represents the audio track of a video. + +**[Group](/wiki/group/)** + +A group API resource represents the group that accompanies an AnimeTheme. + +**[Image](/wiki/image/)** + +An image API resource represents a visual component for another resource such as an anime or artist. + +**[Resource](/wiki/resource/)** + +An external API resource represents a site with supplementary information for another resource such as an anime or artist. + +**[Series](/wiki/series/)** + +A series API resource represents a collection of related anime. + +**[Song](/wiki/song/)** + +A song API resource represents the composition that accompanies an AnimeTheme. + +**[Song Resource](/wiki/songresource/)** + +An song resource API resource represents the association between an song and an external resource. + +**[Studio](/wiki/studio/)** + +A studio API resource represents a company that produces anime. + +**[Studio Image](/wiki/studioimage/)** + +A studio image API resource represents the association between a studio and an image. + +**[Studio Resource](/wiki/studioresource/)** + +A studio resource API resource represents the association between a studio and an external resource. + +**[Video](/wiki/video/)** + +A video API resource represents a WebM of an anime theme. + +**[Video Script](/wiki/videoscript/)** + +A video script API resource represents an encoding script used to produce a video. + +## Search + +--- + +**[Global Search Endpoint](/search/)** + +The global search endpoint returns a listing of resources that match a given search term. + +## Admin + +--- + +Admin API resources pertain to the administration of the site by the moderation team. + +### Resources + +**[Announcement](/admin/announcement/)** + +An announcement API resource represents a site-wide message to be broadcasted on the homepage. + +**[Dump](/admin/dump/)** + +A dump API resource represents a database dump of selected tables at a given point in time. + +**[Feature](/admin/feature/)** + +A feature API resource represents a feature flag that enable/disable site functionalities. + +**[Featured Theme](/admin/featuredtheme/)** + +A featured theme API resource represents a video to be featured on the homepage of the site for a specified amount of time. + +## Auth + +--- + +Auth API resources pertain to the authorization of actions on the site. + +### Resources + +**[Me](/auth/user/me/)** + +The "Me" namespace is a collection of endpoints that pertain to the currently authenticated user. + +**[Permission](/auth/permission/)** + +A permission API resource represents an assignable label for users and roles that authorizes a particular action in AnimeThemes. + +**[Role](/auth/role/)** + +A role API resource represents an assignable label for users that provides a configured group of permissions. + +**[User](/auth/user/)** + +A user API resource represents an AnimeThemes account. + +## Document + +--- + +Document API resources pertain to site documentation. + +### Resources + +**[Page](/document/page/)** + +A page API resource represents a static markdown page used for guides and other documentation. + +## List + +--- + +List API resources pertain to user playlists. + +### Resources + +**[Playlist](/list/playlist/)** + +A playlist API resource represents a list of ordered tracks intended for continuous playback. + +**[Playlist Image](/list/playlistimage/)** + +A playlist image API resource represents the association between a playlist and an image. + +**[Playlist Track](/list/playlist/track/)** + +A playlist track API resource represents an entry in a playlist. \ No newline at end of file