export namespace main { export class AniListCurrentUserWatchList { data: struct { Page struct { PageInfo struct { Total int "json:\"total\""; PerPage int "json:\"perPage\""; CurrentPage int "json:\"currentPage\""; LastPage int "json:\"lastPage\""; HasNextPage bool "json:\"hasNextPage\"" } "json:\"pageInfo\""; MediaList []main.; static createFrom(source: any = {}) { return new AniListCurrentUserWatchList(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.data = this.convertValues(source["data"], Object); } convertValues(a: any, classs: any, asMap: boolean = false): any { if (!a) { return a; } if (a.slice && a.map) { return (a as any[]).map(elem => this.convertValues(elem, classs)); } else if ("object" === typeof a) { if (asMap) { for (const key of Object.keys(a)) { a[key] = new classs(a[key]); } return a; } return new classs(a); } return a; } } export class AniListGetSingleAnime { data: struct { MediaList main.; static createFrom(source: any = {}) { return new AniListGetSingleAnime(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.data = this.convertValues(source["data"], Object); } convertValues(a: any, classs: any, asMap: boolean = false): any { if (!a) { return a; } if (a.slice && a.map) { return (a as any[]).map(elem => this.convertValues(elem, classs)); } else if ("object" === typeof a) { if (asMap) { for (const key of Object.keys(a)) { a[key] = new classs(a[key]); } return a; } return new classs(a); } return a; } } export class AniListUser { // Go type: struct { Viewer struct { ID int "json:\"id\""; Name string "json:\"name\""; Avatar struct { Large string "json:\"large\""; Medium string "json:\"medium\"" } "json:\"avatar\""; BannerImage string "json:\"bannerImage\""; SiteUrl string "json:\"siteUrl\"" } "json:\"Viewer\"" } data: any; static createFrom(source: any = {}) { return new AniListUser(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.data = this.convertValues(source["data"], Object); } convertValues(a: any, classs: any, asMap: boolean = false): any { if (!a) { return a; } if (a.slice && a.map) { return (a as any[]).map(elem => this.convertValues(elem, classs)); } else if ("object" === typeof a) { if (asMap) { for (const key of Object.keys(a)) { a[key] = new classs(a[key]); } return a; } return new classs(a); } return a; } } export class Anime { last_watched_at: last_watched_at; status: status; user_rating: user_rating; last_watched: last_watched; next_to_watch: next_to_watch; watched_episodes_count: watched_episodes_count; total_episodes_count: total_episodes_count; not_aired_episodes_count: not_aired_episodes_count; show: show; anime_type: anime_type; static createFrom(source: any = {}) { return new Anime(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.last_watched_at = source["last_watched_at"]; this.status = source["status"]; this.user_rating = source["user_rating"]; this.last_watched = source["last_watched"]; this.next_to_watch = source["next_to_watch"]; this.watched_episodes_count = source["watched_episodes_count"]; this.total_episodes_count = source["total_episodes_count"]; this.not_aired_episodes_count = source["not_aired_episodes_count"]; this.show = source["show"]; this.anime_type = source["anime_type"]; } } export class MALWatchlist { data: struct { Node struct { Id int "json:\"id\" ts_type:\"id\""; Title string "json:\"title\" ts_type:\"title\""; MainPicture struct { Medium string "json:\"medium\" json:\"medium\""; Large string "json:\"large\" json:\"large\"" } "json:\"main_picture\" json:\"mainPicture\"" } "json:\"node\" json:\"node\""; ListStatus struct { Status string "json:\"status\" ts_type:\"status\""; Score int "json:\"score\" ts_type:\"score\""; NumEpisodesWatched int "json:\"num_episodes_watched\" ts_type:\"numEpisodesWatched\""; IsRewatching bool "json:\"is_rewatching\" ts_type:\"isRewatching\""; UpdatedAt time.Time "json:\"updated_at\" ts_type:\"updatedAt\""; StartDate string "json:\"start_date\" ts_type:\"startDate\""; FinishDate string "json:\"finish_date\" ts_type:\"finishDate\"" } "json:\"list_status\" ts_type:\"listStatus\"" }[]; paging: paging; static createFrom(source: any = {}) { return new MALWatchlist(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.data = this.convertValues(source["data"], struct { Node struct { Id int "json:\"id\" ts_type:\"id\""; Title string "json:\"title\" ts_type:\"title\""; MainPicture struct { Medium string "json:\"medium\" json:\"medium\""; Large string "json:\"large\" json:\"large\"" } "json:\"main_picture\" json:\"mainPicture\"" } "json:\"node\" json:\"node\""; ListStatus struct { Status string "json:\"status\" ts_type:\"status\""; Score int "json:\"score\" ts_type:\"score\""; NumEpisodesWatched int "json:\"num_episodes_watched\" ts_type:\"numEpisodesWatched\""; IsRewatching bool "json:\"is_rewatching\" ts_type:\"isRewatching\""; UpdatedAt time.Time "json:\"updated_at\" ts_type:\"updatedAt\""; StartDate string "json:\"start_date\" ts_type:\"startDate\""; FinishDate string "json:\"finish_date\" ts_type:\"finishDate\"" } "json:\"list_status\" ts_type:\"listStatus\"" }); this.paging = source["paging"]; } convertValues(a: any, classs: any, asMap: boolean = false): any { if (!a) { return a; } if (a.slice && a.map) { return (a as any[]).map(elem => this.convertValues(elem, classs)); } else if ("object" === typeof a) { if (asMap) { for (const key of Object.keys(a)) { a[key] = new classs(a[key]); } return a; } return new classs(a); } return a; } } export class MediaList { id: number; mediaId: number; userId: number; // Go type: struct { ID int "json:\"id\""; IDMal int "json:\"idMal\""; Title struct { Romaji string "json:\"romaji\""; English string "json:\"english\""; Native string "json:\"native\"" } "json:\"title\""; Description string "json:\"description\""; CoverImage struct { Large string "json:\"large\"" } "json:\"coverImage\""; Season string "json:\"season\""; SeasonYear int "json:\"seasonYear\""; Status string "json:\"status\""; Episodes int "json:\"episodes\""; NextAiringEpisode struct { AiringAt int "json:\"airingAt\""; TimeUntilAiring int "json:\"timeUntilAiring\""; Episode int "json:\"episode\"" } "json:\"nextAiringEpisode\""; Tags []struct { Id int "json:\"id\""; Name string "json:\"name\""; Description string "json:\"description\""; Rank int "json:\"rank\""; IsMediaSpoiler bool "json:\"isMediaSpoiler\""; IsAdult bool "json:\"isAdult\"" } "json:\"tags\""; IsAdult bool "json:\"isAdult\"" } media: any; status: string; // Go type: struct { Year int "json:\"year\""; Month int "json:\"month\""; Day int "json:\"day\"" } startedAt: any; // Go type: struct { Year int "json:\"year\""; Month int "json:\"month\""; Day int "json:\"day\"" } completedAt: any; notes: string; progress: number; score: number; repeat: number; // Go type: struct { ID int "json:\"id\""; Name string "json:\"name\""; Avatar struct { Large string "json:\"large\""; Medium string "json:\"medium\"" } "json:\"avatar\""; Statistics struct { Anime struct { Count int "json:\"count\""; Statuses []struct { Status string "json:\"status\""; Count int "json:\"count\"" } "json:\"statuses\"" } "json:\"anime\"" } "json:\"statistics\"" } user: any; static createFrom(source: any = {}) { return new MediaList(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.id = source["id"]; this.mediaId = source["mediaId"]; this.userId = source["userId"]; this.media = this.convertValues(source["media"], Object); this.status = source["status"]; this.startedAt = this.convertValues(source["startedAt"], Object); this.completedAt = this.convertValues(source["completedAt"], Object); this.notes = source["notes"]; this.progress = source["progress"]; this.score = source["score"]; this.repeat = source["repeat"]; this.user = this.convertValues(source["user"], Object); } convertValues(a: any, classs: any, asMap: boolean = false): any { if (!a) { return a; } if (a.slice && a.map) { return (a as any[]).map(elem => this.convertValues(elem, classs)); } else if ("object" === typeof a) { if (asMap) { for (const key of Object.keys(a)) { a[key] = new classs(a[key]); } return a; } return new classs(a); } return a; } } export class MyAnimeListUser { id: id; name: name; picture: picture; gender: gender; birthday: birthday; location: location; joined_at: joinedAt; num_items_watching: numItemsWatching; num_items_completed: numItemsCompleted; num_items_on_hold: numItemsOnHold; num_items_dropped: numItemsDropped; num_items_plan_to_watch: numItemsPlanToWatch; num_items: numItems; num_days_watched: numDaysWatched; num_days_watching: numDaysWatching; num_days_completed: numDaysCompleted; num_days_on_hold: numDaysOnHold; num_days_dropped: numDaysDropped; num_days: numDays; num_episodes: numEpisodes; num_times_rewatched: numTimesRewatched; mean_score: meanScore; time_zone: timeZone; is_supporter: isSupporter; static createFrom(source: any = {}) { return new MyAnimeListUser(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.id = source["id"]; this.name = source["name"]; this.picture = source["picture"]; this.gender = source["gender"]; this.birthday = source["birthday"]; this.location = source["location"]; this.joined_at = source["joined_at"]; this.num_items_watching = source["num_items_watching"]; this.num_items_completed = source["num_items_completed"]; this.num_items_on_hold = source["num_items_on_hold"]; this.num_items_dropped = source["num_items_dropped"]; this.num_items_plan_to_watch = source["num_items_plan_to_watch"]; this.num_items = source["num_items"]; this.num_days_watched = source["num_days_watched"]; this.num_days_watching = source["num_days_watching"]; this.num_days_completed = source["num_days_completed"]; this.num_days_on_hold = source["num_days_on_hold"]; this.num_days_dropped = source["num_days_dropped"]; this.num_days = source["num_days"]; this.num_episodes = source["num_episodes"]; this.num_times_rewatched = source["num_times_rewatched"]; this.mean_score = source["mean_score"]; this.time_zone = source["time_zone"]; this.is_supporter = source["is_supporter"]; } } export class SimklUser { user: user; account: account; connections: connections; static createFrom(source: any = {}) { return new SimklUser(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.user = source["user"]; this.account = source["account"]; this.connections = source["connections"]; } } export class SimklWatchList { anime: anime; static createFrom(source: any = {}) { return new SimklWatchList(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.anime = source["anime"]; } } } export namespace struct { MediaList main { export class { MediaList: main.MediaList; static createFrom(source: any = {}) { return new (source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.MediaList = this.convertValues(source["MediaList"], main.MediaList); } convertValues(a: any, classs: any, asMap: boolean = false): any { if (!a) { return a; } if (a.slice && a.map) { return (a as any[]).map(elem => this.convertValues(elem, classs)); } else if ("object" === typeof a) { if (asMap) { for (const key of Object.keys(a)) { a[key] = new classs(a[key]); } return a; } return new classs(a); } return a; } } } export namespace struct { Node struct { Id int "json:\"id\" ts_type:\"id\""; Title string "json:\"title\" ts_type:\"title\""; MainPicture struct { Medium string "json:\"medium\" json:\"medium\""; Large string "json:\"large\" json:\"large\"" } "json:\"main_picture\" json:\"mainPicture\"" } "json:\"node\" json:\"node\""; ListStatus struct { Status string "json:\"status\" ts_type:\"status\""; Score int "json:\"score\" ts_type:\"score\""; NumEpisodesWatched int "json:\"num_episodes_watched\" ts_type:\"numEpisodesWatched\""; IsRewatching bool "json:\"is_rewatching\" ts_type:\"isRewatching\""; UpdatedAt time { export class { // Go type: struct { Id int "json:\"id\" ts_type:\"id\""; Title string "json:\"title\" ts_type:\"title\""; MainPicture struct { Medium string "json:\"medium\" json:\"medium\""; Large string "json:\"large\" json:\"large\"" } "json:\"main_picture\" json:\"mainPicture\"" } node: any; list_status: listStatus; static createFrom(source: any = {}) { return new (source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.node = this.convertValues(source["node"], Object); this.list_status = source["list_status"]; } convertValues(a: any, classs: any, asMap: boolean = false): any { if (!a) { return a; } if (a.slice && a.map) { return (a as any[]).map(elem => this.convertValues(elem, classs)); } else if ("object" === typeof a) { if (asMap) { for (const key of Object.keys(a)) { a[key] = new classs(a[key]); } return a; } return new classs(a); } return a; } } } export namespace struct { Status string "json:\"status\" ts_type:\"status\""; Score int "json:\"score\" ts_type:\"score\""; NumEpisodesWatched int "json:\"num_episodes_watched\" ts_type:\"numEpisodesWatched\""; IsRewatching bool "json:\"is_rewatching\" ts_type:\"isRewatching\""; UpdatedAt time { export class { status: status; score: score; num_episodes_watched: numEpisodesWatched; is_rewatching: isRewatching; updated_at: updatedAt; start_date: startDate; finish_date: finishDate; static createFrom(source: any = {}) { return new (source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.status = source["status"]; this.score = source["score"]; this.num_episodes_watched = source["num_episodes_watched"]; this.is_rewatching = source["is_rewatching"]; this.updated_at = source["updated_at"]; this.start_date = source["start_date"]; this.finish_date = source["finish_date"]; } } }