Re-run the Wails binding generator so the frontend reflects the browse Go types that were added in earlier commits (AniListBrowse plus the Media / MediaList model refinements): - App.d.ts / App.js: expose the new AniListBrowse() method - models.ts: add the Media model, the anonymous tags element type, and type MediaList.media as Media instead of a generic object
829 lines
27 KiB
TypeScript
Executable File
829 lines
27 KiB
TypeScript
Executable File
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 CompletedAt {
|
|
year: number;
|
|
month: number;
|
|
day: number;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new CompletedAt(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.year = source["year"];
|
|
this.month = source["month"];
|
|
this.day = source["day"];
|
|
}
|
|
}
|
|
export class StartedAt {
|
|
year: number;
|
|
month: number;
|
|
day: number;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new StartedAt(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.year = source["year"];
|
|
this.month = source["month"];
|
|
this.day = source["day"];
|
|
}
|
|
}
|
|
export class AniListUpdateVariables {
|
|
mediaId: number;
|
|
progress: number;
|
|
status: string;
|
|
score: number;
|
|
repeat: number;
|
|
notes: string;
|
|
startedAt: StartedAt;
|
|
completedAt: CompletedAt;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new AniListUpdateVariables(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.mediaId = source["mediaId"];
|
|
this.progress = source["progress"];
|
|
this.status = source["status"];
|
|
this.score = source["score"];
|
|
this.repeat = source["repeat"];
|
|
this.notes = source["notes"];
|
|
this.startedAt = this.convertValues(source["startedAt"], StartedAt);
|
|
this.completedAt = this.convertValues(source["completedAt"], CompletedAt);
|
|
}
|
|
|
|
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 DeleteAniListReturn {
|
|
// Go type: struct { DeleteMediaListEntry struct { Deleted bool "json:\"deleted\"" } "json:\"DeleteMediaListEntry\"" }
|
|
data: any;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new DeleteAniListReturn(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 MALAnime {
|
|
id: id;
|
|
title: title;
|
|
main_picture: mainPicture;
|
|
alternative_titles: alternativeTitles;
|
|
start_date: startDate;
|
|
end_date: endDate;
|
|
synopsis: synopsis;
|
|
mean: mean;
|
|
rank: rank;
|
|
popularity: popularity;
|
|
num_list_users: numListUsers;
|
|
num_scoring_users: numScoringUsers;
|
|
nsfw: nsfw;
|
|
genres: genres;
|
|
created_at: createdAt;
|
|
updated_at: updatedAt;
|
|
media_type: mediaType;
|
|
status: status;
|
|
my_list_status: MalListStatus;
|
|
num_episodes: numEpisodes;
|
|
start_season: startSeason;
|
|
broadcast: broadcast;
|
|
source: source;
|
|
average_episode_duration: averageEpisodeDuration;
|
|
rating: rating;
|
|
studios: studios;
|
|
pictures: pictures;
|
|
background: background;
|
|
related_anime: relatedAnime;
|
|
recommendations: recommendations;
|
|
Statistics: struct { NumListUsers int "json:\"num_list_users\" ts_type:\"numListUsers\""; Status struct { Watching main.;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new MALAnime(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.title = source["title"];
|
|
this.main_picture = source["main_picture"];
|
|
this.alternative_titles = source["alternative_titles"];
|
|
this.start_date = source["start_date"];
|
|
this.end_date = source["end_date"];
|
|
this.synopsis = source["synopsis"];
|
|
this.mean = source["mean"];
|
|
this.rank = source["rank"];
|
|
this.popularity = source["popularity"];
|
|
this.num_list_users = source["num_list_users"];
|
|
this.num_scoring_users = source["num_scoring_users"];
|
|
this.nsfw = source["nsfw"];
|
|
this.genres = source["genres"];
|
|
this.created_at = source["created_at"];
|
|
this.updated_at = source["updated_at"];
|
|
this.media_type = source["media_type"];
|
|
this.status = source["status"];
|
|
this.my_list_status = source["my_list_status"];
|
|
this.num_episodes = source["num_episodes"];
|
|
this.start_season = source["start_season"];
|
|
this.broadcast = source["broadcast"];
|
|
this.source = source["source"];
|
|
this.average_episode_duration = source["average_episode_duration"];
|
|
this.rating = source["rating"];
|
|
this.studios = source["studios"];
|
|
this.pictures = source["pictures"];
|
|
this.background = source["background"];
|
|
this.related_anime = source["related_anime"];
|
|
this.recommendations = source["recommendations"];
|
|
this.Statistics = this.convertValues(source["Statistics"], 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 MALUploadStatus {
|
|
status: string;
|
|
is_rewatching: boolean;
|
|
score: number;
|
|
num_watched_episodes: number;
|
|
num_times_rewatched: number;
|
|
comments: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new MALUploadStatus(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.status = source["status"];
|
|
this.is_rewatching = source["is_rewatching"];
|
|
this.score = source["score"];
|
|
this.num_watched_episodes = source["num_watched_episodes"];
|
|
this.num_times_rewatched = source["num_times_rewatched"];
|
|
this.comments = source["comments"];
|
|
}
|
|
}
|
|
export class MALWatchlist {
|
|
data: data;
|
|
paging: paging;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new MALWatchlist(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.data = source["data"];
|
|
this.paging = source["paging"];
|
|
}
|
|
}
|
|
export class MalListStatus {
|
|
status: status;
|
|
score: score;
|
|
num_episodes_watched: numEpisodesWatched;
|
|
is_rewatching: isRewatching;
|
|
start_date: startDate;
|
|
finish_date: finishDate;
|
|
priority: priority;
|
|
num_times_rewatched: numTimesRewatched;
|
|
rewatch_value: rewatchValue;
|
|
tags: tags;
|
|
comments: comments;
|
|
updated_at: updatedAt;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new MalListStatus(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.start_date = source["start_date"];
|
|
this.finish_date = source["finish_date"];
|
|
this.priority = source["priority"];
|
|
this.num_times_rewatched = source["num_times_rewatched"];
|
|
this.rewatch_value = source["rewatch_value"];
|
|
this.tags = source["tags"];
|
|
this.comments = source["comments"];
|
|
this.updated_at = source["updated_at"];
|
|
}
|
|
}
|
|
export class {
|
|
id: number;
|
|
name: string;
|
|
description: string;
|
|
rank: number;
|
|
isMediaSpoiler: boolean;
|
|
isAdult: boolean;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new (source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.name = source["name"];
|
|
this.description = source["description"];
|
|
this.rank = source["rank"];
|
|
this.isMediaSpoiler = source["isMediaSpoiler"];
|
|
this.isAdult = source["isAdult"];
|
|
}
|
|
}
|
|
export class Media {
|
|
id: number;
|
|
idMal: number;
|
|
// Go type: struct { UserPreferred string "json:\"userPreferred\""; Romaji string "json:\"romaji\""; English string "json:\"english\""; Native string "json:\"native\"" }
|
|
title: any;
|
|
description: string;
|
|
// Go type: struct { ExtraLarge string; Large string "json:\"large\""; Medium string; Color string }
|
|
coverImage: any;
|
|
BannerImage: string;
|
|
Format: string;
|
|
season: string;
|
|
seasonYear: number;
|
|
status: string;
|
|
episodes: number;
|
|
Duration: number;
|
|
CountryOfOrigin: string;
|
|
Source: string;
|
|
Synonyms: string[];
|
|
AverageScore: number;
|
|
MeanScore: number;
|
|
Popularity: number;
|
|
Trending: number;
|
|
Favourites: number;
|
|
// Go type: struct { nodes struct { id int; Title struct { UserPreferred string "json:\"userPreferred\""; Romaji string "json:\"romaji\""; English string "json:\"english\""; Native string "json:\"native\"" } "json:\"title\"" } }
|
|
Relations: any;
|
|
// Go type: struct { Year int; Month int; Day int }
|
|
StartDate: any;
|
|
// Go type: struct { Year int; Month int; Day int }
|
|
EndDate: any;
|
|
// Go type: struct { AiringAt int "json:\"airingAt\""; TimeUntilAiring int "json:\"timeUntilAiring\""; Episode int "json:\"episode\"" }
|
|
nextAiringEpisode: any;
|
|
// Go type: struct { Nodes struct { Id int; AiringAt int; TimeUntilAiring int; Episode int; MediaId int } }
|
|
AiringSchedule: any;
|
|
genres: string[];
|
|
tags: [];
|
|
isAdult: boolean;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new Media(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.idMal = source["idMal"];
|
|
this.title = this.convertValues(source["title"], Object);
|
|
this.description = source["description"];
|
|
this.coverImage = this.convertValues(source["coverImage"], Object);
|
|
this.BannerImage = source["BannerImage"];
|
|
this.Format = source["Format"];
|
|
this.season = source["season"];
|
|
this.seasonYear = source["seasonYear"];
|
|
this.status = source["status"];
|
|
this.episodes = source["episodes"];
|
|
this.Duration = source["Duration"];
|
|
this.CountryOfOrigin = source["CountryOfOrigin"];
|
|
this.Source = source["Source"];
|
|
this.Synonyms = source["Synonyms"];
|
|
this.AverageScore = source["AverageScore"];
|
|
this.MeanScore = source["MeanScore"];
|
|
this.Popularity = source["Popularity"];
|
|
this.Trending = source["Trending"];
|
|
this.Favourites = source["Favourites"];
|
|
this.Relations = this.convertValues(source["Relations"], Object);
|
|
this.StartDate = this.convertValues(source["StartDate"], Object);
|
|
this.EndDate = this.convertValues(source["EndDate"], Object);
|
|
this.nextAiringEpisode = this.convertValues(source["nextAiringEpisode"], Object);
|
|
this.AiringSchedule = this.convertValues(source["AiringSchedule"], Object);
|
|
this.genres = source["genres"];
|
|
this.tags = this.convertValues(source["tags"], );
|
|
this.isAdult = source["isAdult"];
|
|
}
|
|
|
|
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;
|
|
status: string;
|
|
media: Media;
|
|
// 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.status = source["status"];
|
|
this.media = this.convertValues(source["media"], Media);
|
|
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 SimklAnime {
|
|
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 SimklAnime(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 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 SimklWatchListType {
|
|
anime: anime;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new SimklWatchListType(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 main {
|
|
|
|
export class {
|
|
node: node;
|
|
num_recommendations: numRecommendations;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new (source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.node = source["node"];
|
|
this.num_recommendations = source["num_recommendations"];
|
|
}
|
|
}
|
|
export class {
|
|
node: node;
|
|
relation_type: relationType;
|
|
relation_type_formatted: relationTypeFormatted;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new (source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.node = source["node"];
|
|
this.relation_type = source["relation_type"];
|
|
this.relation_type_formatted = source["relation_type_formatted"];
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
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\" ts_type:\"medium\""; Large string "json:\"large\" ts_type:\"large\"" } "json:\"main_picture\" ts_type:\"mainPicture\"" } "json:\"node\" ts_type:\"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 {
|
|
node: node;
|
|
list_status: listStatus;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new (source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.node = source["node"];
|
|
this.list_status = source["list_status"];
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
export namespace struct { NumListUsers int "json:\"num_list_users\" ts_type:\"numListUsers\""; Status struct { Watching main {
|
|
|
|
export class {
|
|
num_list_users: numListUsers;
|
|
Status: struct { Watching main.;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new (source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.num_list_users = source["num_list_users"];
|
|
this.Status = this.convertValues(source["Status"], 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 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"];
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
export namespace struct { Watching main {
|
|
|
|
export class {
|
|
watching: string;
|
|
completed: string;
|
|
on_hold: string;
|
|
dropped: string;
|
|
plan_to_watch: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new (source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.watching = source["watching"];
|
|
this.completed = source["completed"];
|
|
this.on_hold = source["on_hold"];
|
|
this.dropped = source["dropped"];
|
|
this.plan_to_watch = source["plan_to_watch"];
|
|
}
|
|
}
|
|
|
|
}
|
|
|