-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
AniListConstants.m
35 lines (33 loc) · 9.79 KB
/
AniListConstants.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// AniListConstants.m
// Shukofukurou
//
// Created by 小鳥遊六花 on 4/2/18.
// Copyright © 2018 MAL Updater OS X Group. All rights reserved.
//
#import "AniListConstants.h"
@implementation AniListConstants
#pragma mark Query
NSString *const kAnilisttoMALId = @"query ($id: Int!, $type: MediaType) {\n Media(id: $id, type: $type) {\n id\n idMal\n }\n}";
NSString *const kMALtoAniListId = @"query ($id: Int!, $type: MediaType) {\n Media(idMal: $id, type: $type) {\n id\n idMal\n }\n}";
NSString *const kAnilistTitleIdInformation = @"query ($id: Int!, $type: MediaType) {\n Media(id: $id, type: $type) {\n id\n idMal\n title {\n romaji\n english\n native\n userPreferred\n }\n startDate {\n year\n month\n day\n }\n endDate {\n year\n month\n day\n }\n coverImage {\n large\n medium\n }\n bannerImage\n format\n type\n status\n episodes\n duration\n chapters\n volumes\n description\n averageScore\n popularity\n genres\n synonyms\n source\n isAdult\n relations {\n edges {\n relationType\n node {\n id\n title {\n romaji\n english\n native\n }\n type\n coverImage {\n large\n }\n }\n }\n }\n tags {\n id\n name\n description\n category\n rank\n isGeneralSpoiler\n isMediaSpoiler\n isAdult\n }\n rankings {\n id\n rank\n type\n format\n year\n season\n allTime\n context\n }\n }\n}\n\n";
NSString *const kAnilistUsernametoUserId = @"query ($name: String) {\n User (name: $name) {\n id\n name\n }\n}";
NSString *const kAnilistCurrentUsernametoUserId = @"{\n Viewer {\n id\n name\n mediaListOptions {\n scoreFormat\n }\n }\n}";
NSString *const kAnilistanimeList = @"query ($id : Int!, $page: Int) {\n AnimeList: Page (page: $page) {\n mediaList(userId: $id, type: ANIME) {\n id :media{id}\n entryid: id\n title: media {title {\n title: userPreferred\n }}\n episodes: media{episodes}\n duration: media{duration}\n image_url: media{coverImage {\n large\n medium\n }}\n type: media{format}\n status: media{status}\n score: score(format: POINT_100)\n watched_episodes: progress\n watched_status: status\n rewatch_count: repeat\n private\n notes\n watching_start: startedAt {\n year\n month\n day\n }\n watching_end: completedAt {\n year\n month\n day\n }\n }\n pageInfo {\n total\n currentPage\n lastPage\n hasNextPage\n perPage\n }\n }\n}";
NSString *const kAnilisttitlesearch = @"query ($query: String, $type: MediaType) {\n Page(perPage: 50) {\n media(search: $query, type: $type) {\n id\n title {\n userPreferred\n english\n romaji\n }\n synonyms\n coverImage {\n medium\n large\n }\n format\n type\n description\n status\n episodes\n chapters\n volumes\n isAdult\n }\n }\n}\n\n";
NSString *const kAnilistpersonbyid = @"query ($name: String) {\n User (name: $name) {\n id\n name\n mediaListOptions {\n scoreFormat\n }\n }\n}";
NSString *const kAnilistUserProfileByUsername = @"query ($name: String) {\n User (name: $name) {\n id\n name\n about # (asHtml: true)\n donatorTier\n isFollowing\n mediaListOptions {\n scoreFormat\n }\n avatar {\n large\n medium\n }\n updatedAt\n }\n}";
#pragma mark mutations
NSString *const kAnilistUpdateAnimeListEntrySimple = @"mutation ($mediaid : Int, $progress : Int, $status : MediaListStatus) {\n SaveMediaListEntry(mediaId: $mediaid, progress: $progress, status: $status) {\n id\n progress\n status\n score(format: POINT_100)\n }\n}";
NSString *const kAnilistUpdateAnimeListEntryAdvanced = @"mutation ($mediaid : Int, $progress : Int, $status : MediaListStatus, $score : Int, $notes : String, $private : Boolean, $repeat : Int) {\n SaveMediaListEntry(mediaId: $mediaid, progress: $progress, status: $status, scoreRaw: $score, notes: $notes, private: $private, repeat: $repeat) {\n id\n progress\n status\n score(format: POINT_100)\n notes\n private\n startedAt {\n year\n month\n day\n }\n completedAt {\n year\n month\n day\n }\n }\n}";
NSString *const kAnilistUpdateAnimeListEntryAdvancedStartDate = @"mutation ($mediaid : Int, $progress : Int, $status : MediaListStatus, $score : Int, $notes : String, $private : Boolean, $startedAt : FuzzyDateInput, $repeat : Int) {\n SaveMediaListEntry(mediaId: $mediaid, progress: $progress, status: $status, scoreRaw: $score, notes: $notes, private: $private, startedAt: $startedAt, repeat: $repeat) {\n id\n progress\n status\n score(format: POINT_100)\n notes\n private\n startedAt {\n year\n month\n day\n }\n completedAt {\n year\n month\n day\n }\n }\n}";
NSString *const kAnilistUpdateAnimeListEntryAdvancedEndDate = @"mutation ($mediaid : Int, $progress : Int, $status : MediaListStatus, $score : Int, $notes : String, $private : Boolean, $completedAt : FuzzyDateInput, $repeat : Int) {\n SaveMediaListEntry(mediaId: $mediaid, progress: $progress, status: $status, scoreRaw: $score, notes: $notes, private: $private, completedAt: $completedAt, repeat: $repeat) {\n id\n progress\n status\n score(format: POINT_100)\n notes\n private\n startedAt {\n year\n month\n day\n }\n completedAt {\n year\n month\n day\n }\n }\n}";
NSString *const kAnilistUpdateAnimeListEntryAdvancedBothDate = @"mutation ($mediaid : Int, $progress : Int, $status : MediaListStatus, $score : Int, $notes : String, $private : Boolean, $startedAt : FuzzyDateInput, $completedAt : FuzzyDateInput, $repeat : Int) {\n SaveMediaListEntry(mediaId: $mediaid, progress: $progress, status: $status, scoreRaw: $score, notes: $notes, private: $private, startedAt: $startedAt, completedAt: $completedAt, repeat: $repeat) {\n id\n progress\n status\n score(format: POINT_100)\n notes\n private\n startedAt {\n year\n month\n day\n }\n completedAt {\n year\n month\n day\n }\n }\n}";
NSString *const kAnilistDeleteListEntry = @"mutation ($id : Int) {\n DeleteMediaListEntry (id: $id) {\n deleted\n }\n}";
NSString *const kAnilistAnimeSingleEntry = @"query ($id: Int!, $mediaid: Int) {\n AnimeList: Page (page: 1) {\n mediaList(userId: $id, type: ANIME, mediaId:$mediaid) {\n entryid: id\n score: score(format: POINT_100)\n watched_episodes: progress\n watched_status: status\n rewatch_count: repeat\n private\n notes\n watching_start: startedAt {\n year\n month\n day\n }\n watching_end: completedAt {\n year\n month\n day\n }\n }\n }\n}\n\n";
NSString *const kAnilistExUpdateAnimeListEntrySimple = @"mutation ($id : Int, $progress : Int, $status : MediaListStatus) {\n SaveMediaListEntry(id: $id, progress: $progress, status: $status) {\n id\n progress\n status\n score(format: POINT_100)\n }\n}";
NSString *const kAnilistExUpdateAnimeListEntryAdvanced = @"mutation ($id : Int, $progress : Int, $status : MediaListStatus, $score : Int, $notes : String, $private : Boolean, $repeat : Int) {\n SaveMediaListEntry(id: $id, progress: $progress, status: $status, scoreRaw: $score, notes: $notes, private: $private, repeat: $repeat) {\n id\n progress\n status\n score(format: POINT_100)\n notes\n private\n startedAt {\n year\n month\n day\n }\n completedAt {\n year\n month\n day\n }\n }\n}";
NSString *const kAnilistExUpdateAnimeListEntryAdvancedStartDate = @"mutation ($id : Int, $progress : Int, $status : MediaListStatus, $score : Int, $notes : String, $private : Boolean, $startedAt : FuzzyDateInput, $repeat : Int) {\n SaveMediaListEntry(id: $id, progress: $progress, status: $status, scoreRaw: $score, notes: $notes, private: $private, startedAt: $startedAt, repeat: $repeat) {\n id\n progress\n status\n score(format: POINT_100)\n notes\n private\n startedAt {\n year\n month\n day\n }\n completedAt {\n year\n month\n day\n }\n }\n}";
NSString *const kAnilistExUpdateAnimeListEntryAdvancedEndDate = @"mutation ($id : Int, $progress : Int, $status : MediaListStatus, $score : Int, $notes : String, $private : Boolean, $completedAt : FuzzyDateInput, $repeat : Int) {\n SaveMediaListEntry(id: $id, progress: $progress, status: $status, scoreRaw: $score, notes: $notes, private: $private, completedAt: $completedAt, repeat: $repeat) {\n id\n progress\n status\n score(format: POINT_100)\n notes\n private\n startedAt {\n year\n month\n day\n }\n completedAt {\n year\n month\n day\n }\n }\n}";
NSString *const kAnilistExUpdateAnimeListEntryAdvancedBothDate = @"mutation ($id : Int, $progress : Int, $status : MediaListStatus, $score : Int, $notes : String, $private : Boolean, $startedAt : FuzzyDateInput, $completedAt : FuzzyDateInput, $repeat : Int) {\n SaveMediaListEntry(id: $id, progress: $progress, status: $status, scoreRaw: $score, notes: $notes, private: $private, startedAt: $startedAt, completedAt: $completedAt, repeat: $repeat) {\n id\n progress\n status\n score(format: POINT_100)\n notes\n private\n startedAt {\n year\n month\n day\n }\n completedAt {\n year\n month\n day\n }\n }\n}";
@end