From fd806df0a916b11bb30b6e76e15f36520a7b223e Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Tue, 18 Feb 2025 12:06:58 -0500 Subject: [PATCH] added rest anilist set items --- .../AniList Change Episode Watched.http | 76 +++++++++++++++++++ .../Set Items/AniList Change Status.http | 19 +++++ .../Set Items/Change Episode Count.http | 65 ++++++++++++++++ rest/AniTrack/Set Items/Delete Media.http | 17 +++++ 4 files changed, 177 insertions(+) create mode 100644 rest/AniTrack/Set Items/AniList Change Episode Watched.http create mode 100644 rest/AniTrack/Set Items/AniList Change Status.http create mode 100644 rest/AniTrack/Set Items/Change Episode Count.http create mode 100644 rest/AniTrack/Set Items/Delete Media.http diff --git a/rest/AniTrack/Set Items/AniList Change Episode Watched.http b/rest/AniTrack/Set Items/AniList Change Episode Watched.http new file mode 100644 index 0000000..cc4a74c --- /dev/null +++ b/rest/AniTrack/Set Items/AniList Change Episode Watched.http @@ -0,0 +1,76 @@ +# @name AniList Change Episode Watched + +POST https://graphql.anilist.co +Content-Type: applicaton/json +Accept: applicaton/json +X-REQUEST-TYPE: Graphql +Authorization: Bearer {{ANILIST_ACCESS_TOKEN}} + +mutation($mediaId:Int, $progress:Int, $status:MediaListStatus){ + SaveMediaListEntry(mediaId:$mediaId, progress:$progress, status:$status){ + id + mediaId + userId + media { + id + idMal + title { + romaji + english + native + } + description + coverImage { + large + } + season + seasonYear + status + episodes + nextAiringEpisode { + airingAt + timeUntilAiring + episode + } + isAdult + } + status + startedAt{ + year + month + day + } + completedAt{ + year + month + day + } + notes + progress + score + repeat + user { + id + name + avatar{ + large + medium + } + statistics{ + anime{ + count + statuses{ + status + count + } + } + } + } + } +} + +{ + "mediaId": 169417, + "progress": 12, + "status":"COMPLETED" +} diff --git a/rest/AniTrack/Set Items/AniList Change Status.http b/rest/AniTrack/Set Items/AniList Change Status.http new file mode 100644 index 0000000..d1cc3a0 --- /dev/null +++ b/rest/AniTrack/Set Items/AniList Change Status.http @@ -0,0 +1,19 @@ +# @name AniList Change Status + +POST https://graphql.anilist.co +Content-Type: applicaton/json +Accept: applicaton/json +X-REQUEST-TYPE: Graphql +Authorization: Bearer {{ANILIST_ACCESS_TOKEN}} + +mutation($mediaId:Int, $status:MediaListStatus){ + SaveMediaListEntry(mediaId:$mediaId, status:$status){ + id + status + } +} + +{ + "mediaId": 1, + "status": "CURRENT" +} diff --git a/rest/AniTrack/Set Items/Change Episode Count.http b/rest/AniTrack/Set Items/Change Episode Count.http new file mode 100644 index 0000000..53b88e9 --- /dev/null +++ b/rest/AniTrack/Set Items/Change Episode Count.http @@ -0,0 +1,65 @@ +# @name AniList Change Count + +POST https://graphql.anilist.co +Content-Type: applicaton/json +Accept: applicaton/json +X-REQUEST-TYPE: Graphql +Authorization: Bearer {{ANILIST_ACCESS_TOKEN}} + +mutation ( + $mediaId: Int + $progress: Int + $status: MediaListStatus + $score: Float + $repeat: Int + $notes: String + $startedAt: FuzzyDateInput + $completedAt: FuzzyDateInput +) { + SaveMediaListEntry( + mediaId: $mediaId + progress: $progress + status: $status + score: $score + repeat: $repeat + notes: $notes + startedAt: $startedAt + completedAt: $completedAt + ) { + mediaId + progress + status + score + repeat + notes + startedAt { + year + month + day + } + completedAt { + year + month + day + } + } +} + +{ + "mediaId": 170998, + "progress": 5, + "status": "CURRENT", + "score": 9.0, + "repeat": 0, + "notes": ",malSync::eyJ1IjoiaHR0cHM6Ly93d3cuY3J1bmNoeXJvbGwuY29tL3Nlcmllcy9HVkRIWDg1Wk4vI3NlYXNvbj1HNjNWQzJHUUsiLCJwIjoiIn0=::", + "startedAt": { + "year": 2024, + "month": 7, + "day": 10 + }, + "completedAt": { + "year": 0, + "month": 0, + "day": 0 + } +} diff --git a/rest/AniTrack/Set Items/Delete Media.http b/rest/AniTrack/Set Items/Delete Media.http new file mode 100644 index 0000000..a04aa55 --- /dev/null +++ b/rest/AniTrack/Set Items/Delete Media.http @@ -0,0 +1,17 @@ +# @name AniList Delete Media + +POST https://graphql.anilist.co +Content-Type: applicaton/json +Accept: applicaton/json +X-REQUEST-TYPE: Graphql +Authorization: Bearer {{ANILIST_ACCESS_TOKEN}} + +mutation ($id: Int) { + DeleteMediaListEntry(id: $id) { + deleted + } +} + +{ + "id": 430978266 +}