2024-07-24 09:18:45 -04:00
export namespace main {
export class AniListCurrentUserWatchList {
2024-07-25 09:18:46 -04:00
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 . ;
2024-07-24 09:18:45 -04:00
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 ;
}
}
2024-07-25 09:18:46 -04:00
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 ;
}
}
2024-08-16 15:07:06 -04:00
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 ;
}
}
2024-07-24 09:18:45 -04:00
export class AniListUser {
2024-07-30 20:41:18 -04:00
// 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\"" }
2024-07-24 09:18:45 -04:00
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 ;
}
}
2024-08-11 12:20:26 -04:00
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" ] ;
}
}
2024-08-16 15:07:06 -04:00
export class MALAnime {
id : id ;
title : title ;
// Go type: struct { Large string "json:\"large\" json:\"large\""; Medium string "json:\"medium\" json:\"medium\"" }
main_picture : any ;
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 : myListStatus ;
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 ;
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 = this . convertValues ( source [ "main_picture" ] , Object ) ;
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" ] ;
}
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 ;
}
}
2024-08-15 21:27:31 -04:00
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 ;
}
}
2024-07-25 09:18:46 -04:00
export class MediaList {
id : number ;
mediaId : number ;
userId : number ;
2024-08-09 15:11:20 -04:00
// 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\"" }
2024-07-25 09:18:46 -04:00
media : any ;
status : string ;
2024-07-27 21:18:03 -04:00
// 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 ;
2024-07-25 09:18:46 -04:00
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" ] ;
2024-07-27 21:18:03 -04:00
this . startedAt = this . convertValues ( source [ "startedAt" ] , Object ) ;
this . completedAt = this . convertValues ( source [ "completedAt" ] , Object ) ;
2024-07-25 09:18:46 -04:00
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 ] ) ;
2024-07-30 12:59:06 -04:00
}
return a ;
}
return new classs ( a ) ;
}
return a ;
}
}
2024-08-13 18:54:27 -04:00
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" ] ;
}
}
2024-08-16 15:07:06 -04:00
export class MyListStatus {
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 MyListStatus ( 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" ] ;
}
}
2024-07-30 12:59:06 -04:00
export class SimklUser {
2024-07-30 20:41:18 -04:00
user : user ;
account : account ;
connections : connections ;
2024-07-30 12:59:06 -04:00
static createFrom ( source : any = { } ) {
return new SimklUser ( source ) ;
}
constructor ( source : any = { } ) {
if ( 'string' === typeof source ) source = JSON . parse ( source ) ;
2024-07-30 20:41:18 -04:00
this . user = source [ "user" ] ;
this . account = source [ "account" ] ;
this . connections = source [ "connections" ] ;
2024-07-30 12:59:06 -04:00
}
2024-07-30 20:41:18 -04:00
}
export class SimklWatchList {
anime : anime ;
2024-07-30 12:59:06 -04:00
2024-07-30 20:41:18 -04:00
static createFrom ( source : any = { } ) {
return new SimklWatchList ( source ) ;
}
constructor ( source : any = { } ) {
if ( 'string' === typeof source ) source = JSON . parse ( source ) ;
this . anime = source [ "anime" ] ;
}
2024-07-25 09:18:46 -04:00
}
}
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 ;
}
}
2024-07-24 09:18:45 -04:00
}
2024-08-16 15:07:06 -04:00
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" ] ;
}
}
}
2024-08-15 21:27:31 -04:00
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" ] ;
}
}
}