From 3c7ca1537631c794c3b2df1b72d9dffeac1dd05d Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Thu, 15 Aug 2024 21:27:53 -0400 Subject: [PATCH] added getting MAL watchlist --- bruno/AniTrack/MAL/Get AnimeList.bru | 25 ++++++++++++++++++++++++ bruno/AniTrack/MAL/Get Authorization.bru | 24 +++++++++++++++++++++++ bruno/AniTrack/MAL/MAL Oauth Page.bru | 18 +++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 bruno/AniTrack/MAL/Get AnimeList.bru create mode 100644 bruno/AniTrack/MAL/Get Authorization.bru create mode 100644 bruno/AniTrack/MAL/MAL Oauth Page.bru diff --git a/bruno/AniTrack/MAL/Get AnimeList.bru b/bruno/AniTrack/MAL/Get AnimeList.bru new file mode 100644 index 0000000..4a26e11 --- /dev/null +++ b/bruno/AniTrack/MAL/Get AnimeList.bru @@ -0,0 +1,25 @@ +meta { + name: Get AnimeList + type: http + seq: 3 +} + +get { + url: https://api.myanimelist.net/v2/users/{{MAL_USER}}/animelist?fields=list_status&status=watching&limit=1000 + body: formUrlEncoded + auth: bearer +} + +params:query { + fields: list_status + status: watching + limit: 1000 +} + +headers { + : +} + +auth:bearer { + token: {{MAL_ACCESS_TOKEN}} +} diff --git a/bruno/AniTrack/MAL/Get Authorization.bru b/bruno/AniTrack/MAL/Get Authorization.bru new file mode 100644 index 0000000..373a36a --- /dev/null +++ b/bruno/AniTrack/MAL/Get Authorization.bru @@ -0,0 +1,24 @@ +meta { + name: Get Authorization + type: http + seq: 2 +} + +post { + url: https://myanimelist.net/v1/oauth2/token + body: formUrlEncoded + auth: none +} + +headers { + Content-Type: application/x-www-form-urlencoded +} + +body:form-urlencoded { + grant_type: authorization_code + client_id: {{MAL_CLIENT_ID}} + client_secret: {{MAL_CLIENT_SECRET}} + redirect_uri: {{MAL_CALLBACK_URI}} + code: {{MAL_CODE}} + code_verifier: {{MAL_VERIFIER}} +} diff --git a/bruno/AniTrack/MAL/MAL Oauth Page.bru b/bruno/AniTrack/MAL/MAL Oauth Page.bru new file mode 100644 index 0000000..7696f02 --- /dev/null +++ b/bruno/AniTrack/MAL/MAL Oauth Page.bru @@ -0,0 +1,18 @@ +meta { + name: MAL Oauth Page + type: http + seq: 1 +} + +get { + url: https://myanimelist.net/v1/oauth2/authorize?response_type=code&client_id={{MAL_CLIENT_ID}}&redirect_uri={{MAL_CALLBACK_URI}} + body: none + auth: none +} + +params:query { + response_type: code + client_id: {{MAL_CLIENT_ID}} + redirect_uri: {{MAL_CALLBACK_URI}} + : +}