From daa9c3c40a17dc2272dfaf25b78993c412092d8e Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Sat, 20 Jul 2024 00:03:52 -0400 Subject: [PATCH] added some Bruno AniList Requests for AniTrack --- bruno/AniTrack/AniList Item.bru | 52 ++++++++++++++++++++++ bruno/AniTrack/Load AniList Oauth Page.bru | 17 +++++++ bruno/AniTrack/bruno.json | 9 ++++ bruno/AniTrack/environments/Dev.bru | 3 ++ 4 files changed, 81 insertions(+) create mode 100644 bruno/AniTrack/AniList Item.bru create mode 100644 bruno/AniTrack/Load AniList Oauth Page.bru create mode 100644 bruno/AniTrack/bruno.json create mode 100644 bruno/AniTrack/environments/Dev.bru diff --git a/bruno/AniTrack/AniList Item.bru b/bruno/AniTrack/AniList Item.bru new file mode 100644 index 0000000..8f39336 --- /dev/null +++ b/bruno/AniTrack/AniList Item.bru @@ -0,0 +1,52 @@ +meta { + name: AniList Item + type: graphql + seq: 2 +} + +post { + url: https://graphql.anilist.co + body: graphql + auth: none +} + +headers { + Content-Type: "application/json" + Accept: "application/json" +} + +body:graphql { + query ($id: Int, $listType: MediaType) { + Media(id: $id, type: $listType) { + id + idMal + title { + romaji + english + native + } + description + coverImage { + large + } + tags { + id + name + description + category + rank + isGeneralSpoiler + isMediaSpoiler + isAdult + } + } + } + +} + +body:graphql:vars { + { + "id": 157371, + "listType": "ANIME" + } +} diff --git a/bruno/AniTrack/Load AniList Oauth Page.bru b/bruno/AniTrack/Load AniList Oauth Page.bru new file mode 100644 index 0000000..49f10c7 --- /dev/null +++ b/bruno/AniTrack/Load AniList Oauth Page.bru @@ -0,0 +1,17 @@ +meta { + name: Load AniList Oauth Page + type: http + seq: 3 +} + +get { + url: https://anilist.co/api/v2/oauth/authorize?client_id={{ANILIST_APP_ID}}&redirect_uri=http://localhost:6734/callback&response_type=code + body: none + auth: none +} + +params:query { + client_id: {{ANILIST_APP_ID}} + redirect_uri: http://localhost:6734/callback + response_type: code +} diff --git a/bruno/AniTrack/bruno.json b/bruno/AniTrack/bruno.json new file mode 100644 index 0000000..fd08d2d --- /dev/null +++ b/bruno/AniTrack/bruno.json @@ -0,0 +1,9 @@ +{ + "version": "1", + "name": "AniTrack", + "type": "collection", + "ignore": [ + "node_modules", + ".git" + ] +} \ No newline at end of file diff --git a/bruno/AniTrack/environments/Dev.bru b/bruno/AniTrack/environments/Dev.bru new file mode 100644 index 0000000..9665716 --- /dev/null +++ b/bruno/AniTrack/environments/Dev.bru @@ -0,0 +1,3 @@ +vars { + ANILIST_APP_ID: {{process.env.ANILIST_APP_ID}} +}