tvdb

package module
v0.0.0-...-6a40b90 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2023 License: MIT Imports: 10 Imported by: 0

README

tvdb

TheTVDB API v4

https://api4.thetvdb.com/swagger

How to use

    client := tvdb.NewClient("")
    _, err := client.Login(&tvdb.AuthenticationRequest{
        ApiKey:   os.Getenv("TVDB_API_KEY"),
        Pin:  os.Getenv("TVDB_USER_PIN"),
    })
    
    if err != nil {
        return
    }
    
    data, err = client.Search(&tvdb.SearchRequest{
        Name: "<name_of_series>",
    })

More examples

Refer to example/example.go or any _test.go file to see how the client is used.

Documentation

Index

Constants

View Source
const (
	Artwork         = "/artwork/:id"
	ArtworkExtended = "/artwork/:id/extended"
	ArtworkStatuses = "/artwork/statuses"
	ArtworkTypes    = "/artwork/types"
)
View Source
const (
	Awards                       = "/awards"
	AwardsByID                   = "/awards/:id"
	AwardsByIDExtended           = "/awards/:id/extended"
	AwardsCategoriesByID         = "/awards/categories/:id"
	AwardsCategoriesByIDExtended = "/awards/categories/:id/extended"
)
View Source
const (
	Companies    = "/companies"
	CompaniesID  = "/companies/:id"
	CompanyTypes = "/companies/types"
)
View Source
const (
	MoviesByID         = "/movies/:id"
	MoviesByIDExtended = "/movies/:id/extended"
)
View Source
const (
	SeriesByID         = "/series/:id"
	SeriesByIDArtworks = "/series/:id/artworks"
	SeriesByIDExtended = "/series/:id/extended"
)
View Source
const ApplicationJson = "application/json"
View Source
const AuthenticationLogin string = "/login"
View Source
const BaseURL string = "https://api4.thetvdb.com/v4"
View Source
const (
	Characters = "/characters/:id"
)
View Source
const DefaultLanguage = "en" // English
View Source
const Search string = "/search"

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtworkExtendedResponse

type ArtworkExtendedResponse struct {
	Status string `json:"status"`
	Data   struct {
		Id              int    `json:"id"`
		Image           string `json:"image"`
		Thumbnail       string `json:"thumbnail"`
		Language        string `json:"language"`
		Type            int    `json:"type"`
		Score           int    `json:"score"`
		Width           int    `json:"width"`
		Height          int    `json:"height"`
		ThumbnailWidth  int    `json:"thumbnailWidth"`
		ThumbnailHeight int    `json:"thumbnailHeight"`
		UpdatedAt       int    `json:"updatedAt"`
		SeriesId        int    `json:"seriesId"`
		Status          struct {
			Id   int         `json:"id"`
			Name interface{} `json:"name"`
		} `json:"status"`
		TagOptions []interface{} `json:"tagOptions"`
	} `json:"data"`
}

type ArtworkResponse

type ArtworkResponse struct {
	Status string `json:"status"`
	Data   struct {
		Id        int    `json:"id"`
		Image     string `json:"image"`
		Thumbnail string `json:"thumbnail"`
		Language  string `json:"language"`
		Type      int    `json:"type"`
		Score     int    `json:"score"`
		Width     int    `json:"width"`
		Height    int    `json:"height"`
	} `json:"data"`
}

type ArtworkStatusesResponse

type ArtworkStatusesResponse struct {
	Status string `json:"status"`
	Data   []struct {
		Id   int    `json:"id"`
		Name string `json:"name"`
	} `json:"data"`
}

type ArtworkTypesResponse

type ArtworkTypesResponse struct {
	Status string `json:"status"`
	Data   []struct {
		Id          int    `json:"id"`
		Name        string `json:"name"`
		RecordType  string `json:"recordType"`
		Slug        string `json:"slug"`
		ImageFormat string `json:"imageFormat"`
		Width       int    `json:"width"`
		Height      int    `json:"height"`
		ThumbWidth  int    `json:"thumbWidth"`
		ThumbHeight int    `json:"thumbHeight"`
	} `json:"data"`
}

type AuthenticationRequest

type AuthenticationRequest struct {
	ApiKey string `json:"apikey"`
	Pin    string `json:"pin"`
}

type AuthenticationResponse

type AuthenticationResponse struct {
	Data struct {
		Token string `json:"token"`
	} `json:"data"`
	Status string `json:"status"`
}

Authentication struct store all data of a summary.

type AwardsByIDExtendedResponse

type AwardsByIDExtendedResponse struct {
	Status string `json:"status"`
	Data   struct {
		Id         int    `json:"id"`
		Name       string `json:"name"`
		Categories []struct {
			Id              int    `json:"id"`
			Name            string `json:"name"`
			AllowCoNominees bool   `json:"allowCoNominees"`
			ForSeries       bool   `json:"forSeries"`
			ForMovies       bool   `json:"forMovies"`
			Award           struct {
				Id   int    `json:"id"`
				Name string `json:"name"`
			} `json:"award"`
		} `json:"categories"`
		Score int `json:"score"`
	} `json:"data"`
}

type AwardsByIDResponse

type AwardsByIDResponse struct {
	Status string `json:"status"`
	Data   struct {
		Id   int    `json:"id"`
		Name string `json:"name"`
	} `json:"data"`
}

type AwardsCategoriesByIDExtendedResponse

type AwardsCategoriesByIDExtendedResponse struct {
	Status string `json:"status"`
	Data   struct {
		Id              int    `json:"id"`
		Name            string `json:"name"`
		AllowCoNominees bool   `json:"allowCoNominees"`
		ForSeries       bool   `json:"forSeries"`
		ForMovies       bool   `json:"forMovies"`
		Award           struct {
			Id   int    `json:"id"`
			Name string `json:"name"`
		} `json:"award"`
		Nominees []struct {
			Id       int         `json:"id"`
			Year     string      `json:"year"`
			Details  *string     `json:"details"`
			IsWinner bool        `json:"isWinner"`
			Category interface{} `json:"category"`
			Name     interface{} `json:"name"`
			Series   interface{} `json:"series"`
			Movie    struct {
				Id                   int      `json:"id"`
				Name                 string   `json:"name"`
				Slug                 string   `json:"slug"`
				Image                string   `json:"image"`
				NameTranslations     []string `json:"nameTranslations"`
				OverviewTranslations []string `json:"overviewTranslations"`
				Aliases              []struct {
					Language string `json:"language"`
					Name     string `json:"name"`
				} `json:"aliases"`
				Score   int `json:"score"`
				Runtime int `json:"runtime"`
				Status  struct {
					Id          int    `json:"id"`
					Name        string `json:"name"`
					RecordType  string `json:"recordType"`
					KeepUpdated bool   `json:"keepUpdated"`
				} `json:"status"`
				LastUpdated string `json:"lastUpdated"`
				Year        string `json:"year"`
			} `json:"movie"`
			Episode   interface{} `json:"episode"`
			Character interface{} `json:"character"`
		} `json:"nominees"`
	} `json:"data"`
}

type AwardsCategoriesByIDResponse

type AwardsCategoriesByIDResponse struct {
	Status string `json:"status"`
	Data   struct {
		Id              int    `json:"id"`
		Name            string `json:"name"`
		AllowCoNominees bool   `json:"allowCoNominees"`
		ForSeries       bool   `json:"forSeries"`
		ForMovies       bool   `json:"forMovies"`
		Award           struct {
			Id   int    `json:"id"`
			Name string `json:"name"`
		} `json:"award"`
	} `json:"data"`
}

type AwardsResponse

type AwardsResponse struct {
	Status string `json:"status"`
	Data   []struct {
		Id   int    `json:"id"`
		Name string `json:"name"`
	} `json:"data"`
}

type CharactersResponse

type CharactersResponse struct {
	Status string `json:"status"`
	Data   struct {
		Id       int    `json:"id"`
		Name     string `json:"name"`
		PeopleId int    `json:"peopleId"`
		SeriesId int    `json:"seriesId"`
		Series   struct {
			Name  string `json:"name"`
			Image string `json:"image"`
			Year  string `json:"year"`
		} `json:"series"`
		Movie                interface{}   `json:"movie"`
		MovieId              interface{}   `json:"movieId"`
		EpisodeId            interface{}   `json:"episodeId"`
		Type                 int           `json:"type"`
		Image                string        `json:"image"`
		Sort                 int           `json:"sort"`
		IsFeatured           bool          `json:"isFeatured"`
		Url                  string        `json:"url"`
		NameTranslations     []interface{} `json:"nameTranslations"`
		OverviewTranslations []interface{} `json:"overviewTranslations"`
		Aliases              []interface{} `json:"aliases"`
		PeopleType           string        `json:"peopleType"`
		PersonName           string        `json:"personName"`
		TagOptions           []struct {
			Id       int         `json:"id"`
			Tag      int         `json:"tag"`
			TagName  string      `json:"tagName"`
			Name     string      `json:"name"`
			HelpText interface{} `json:"helpText"`
		} `json:"tagOptions"`
		PersonImgURL string `json:"personImgURL"`
	} `json:"data"`
}

type Client

type Client struct {
	Client   *http.Client
	Language string
	Token    string
}

func NewClient

func NewClient(language string) (client *Client)

func (*Client) Artwork

func (c *Client) Artwork(id int) (data *ArtworkResponse, err error)

func (*Client) ArtworkExtended

func (c *Client) ArtworkExtended(id int) (data *ArtworkExtendedResponse, err error)

func (*Client) ArtworkStatuses

func (c *Client) ArtworkStatuses() (data *ArtworkStatusesResponse, err error)

func (*Client) ArtworkTypes

func (c *Client) ArtworkTypes() (data *ArtworkTypesResponse, err error)

func (*Client) Awards

func (c *Client) Awards() (data *AwardsResponse, err error)

func (*Client) AwardsByID

func (c *Client) AwardsByID(id int) (data *AwardsByIDResponse, err error)

func (*Client) AwardsByIDExtended

func (c *Client) AwardsByIDExtended(id int) (data *AwardsByIDExtendedResponse, err error)

func (*Client) AwardsCategoriesByID

func (c *Client) AwardsCategoriesByID(id int) (data *AwardsCategoriesByIDResponse, err error)

func (*Client) AwardsCategoriesByIDExtended

func (c *Client) AwardsCategoriesByIDExtended(id int) (data *AwardsCategoriesByIDExtendedResponse, err error)

func (*Client) Characters

func (c *Client) Characters(id int) (data *CharactersResponse, err error)

func (*Client) Companies

func (c *Client) Companies(params *CompaniesParams) (data *CompaniesResponse, err error)

func (*Client) CompaniesID

func (c *Client) CompaniesID(id int) (data *CompaniesIDResponse, err error)

func (*Client) CompanyTypes

func (c *Client) CompanyTypes() (data *CompanyTypesResponse, err error)

func (*Client) Login

func (c *Client) Login(requestParams *AuthenticationRequest) (data *AuthenticationResponse, err error)

func (*Client) MovieByID

func (c *Client) MovieByID(id int) (data *MoviesByIDData, err error)

func (*Client) MoviesByIDExtended

func (c *Client) MoviesByIDExtended(id int) (data *MoviesByIDExtendedData, err error)

func (*Client) Search

func (c *Client) Search(params *SearchRequest) (data *SearchResponse, err error)

func (*Client) SeriesByID

func (c *Client) SeriesByID(id int) (data *SeriesByIDData, err error)

func (*Client) SeriesByIDArtworks

func (c *Client) SeriesByIDArtworks(id int) (data *SeriesByIDArtworksData, err error)

func (*Client) SeriesByIDExtended

func (c *Client) SeriesByIDExtended(id int) (data *SeriesByIDExtendedData, err error)

type CompaniesIDResponse

type CompaniesIDResponse struct {
	Status string `json:"status"`
	Data   struct {
		Id                   int           `json:"id"`
		Name                 string        `json:"name"`
		Slug                 string        `json:"slug"`
		NameTranslations     []string      `json:"nameTranslations"`
		OverviewTranslations []interface{} `json:"overviewTranslations"`
		Aliases              []struct {
			Language string `json:"language"`
			Name     string `json:"name"`
		} `json:"aliases"`
		Country            string      `json:"country"`
		PrimaryCompanyType int         `json:"primaryCompanyType"`
		ActiveDate         interface{} `json:"activeDate"`
		InactiveDate       interface{} `json:"inactiveDate"`
		CompanyType        struct {
			CompanyTypeId   int    `json:"companyTypeId"`
			CompanyTypeName string `json:"companyTypeName"`
		} `json:"companyType"`
		ParentCompany struct {
			Id       interface{} `json:"id"`
			Name     interface{} `json:"name"`
			Relation struct {
				Id       interface{} `json:"id"`
				TypeName interface{} `json:"typeName"`
			} `json:"relation"`
		} `json:"parentCompany"`
		TagOptions []struct {
			Id       int    `json:"id"`
			Tag      int    `json:"tag"`
			TagName  string `json:"tagName"`
			Name     string `json:"name"`
			HelpText string `json:"helpText"`
		} `json:"tagOptions"`
	} `json:"data"`
}

type CompaniesParams

type CompaniesParams struct {
	Page int `url:"page,omitempty"`
}

type CompaniesResponse

type CompaniesResponse struct {
	Status string `json:"status"`
	Data   []struct {
		Id                   int      `json:"id"`
		Name                 string   `json:"name"`
		Slug                 string   `json:"slug"`
		NameTranslations     []string `json:"nameTranslations"`
		OverviewTranslations []string `json:"overviewTranslations"`
		Aliases              []struct {
			Language string `json:"language"`
			Name     string `json:"name"`
		} `json:"aliases"`
		Country            string  `json:"country"`
		PrimaryCompanyType int     `json:"primaryCompanyType"`
		ActiveDate         *string `json:"activeDate"`
		InactiveDate       *string `json:"inactiveDate"`
		CompanyType        struct {
			CompanyTypeId   int    `json:"companyTypeId"`
			CompanyTypeName string `json:"companyTypeName"`
		} `json:"companyType"`
		ParentCompany struct {
			Id       *int    `json:"id"`
			Name     *string `json:"name"`
			Relation struct {
				Id       *int    `json:"id"`
				TypeName *string `json:"typeName"`
			} `json:"relation"`
		} `json:"parentCompany"`
		TagOptions interface{} `json:"tagOptions"`
	} `json:"data"`
	Links struct {
		Prev       interface{} `json:"prev"`
		Self       string      `json:"self"`
		Next       string      `json:"next"`
		TotalItems int         `json:"total_items"`
		PageSize   int         `json:"page_size"`
	} `json:"links"`
}

type CompanyTypesResponse

type CompanyTypesResponse struct {
	Status string `json:"status"`
	Data   []struct {
		CompanyTypeId   int    `json:"companyTypeId"`
		CompanyTypeName string `json:"companyTypeName"`
	} `json:"data"`
}

type Errors

type Errors struct {
	InvalidFilters     []string `json:"invalidFilters"`
	InvalidLanguage    string   `json:"invalidLanguage"`
	InvalidQueryParams []string `json:"invalidQueryParams"`
}
type Links struct {
	First    int `json:"first"`
	Last     int `json:"last"`
	Next     int `json:"next"`
	Previous int `json:"previous"`
}

type MoviesByIDData

type MoviesByIDData struct {
	Status string `json:"status"`
	Data   struct {
		Id                   int           `json:"id"`
		Name                 string        `json:"name"`
		Slug                 string        `json:"slug"`
		Image                string        `json:"image"`
		NameTranslations     []string      `json:"nameTranslations"`
		OverviewTranslations []string      `json:"overviewTranslations"`
		Aliases              []interface{} `json:"aliases"`
		Score                int           `json:"score"`
		Runtime              int           `json:"runtime"`
		Status               struct {
			Id          int    `json:"id"`
			Name        string `json:"name"`
			RecordType  string `json:"recordType"`
			KeepUpdated bool   `json:"keepUpdated"`
		} `json:"status"`
		LastUpdated string `json:"lastUpdated"`
		Year        string `json:"year"`
	} `json:"data"`
}

type MoviesByIDExtendedData

type MoviesByIDExtendedData struct {
	Status string `json:"status"`
	Data   struct {
		Id                   int      `json:"id"`
		Name                 string   `json:"name"`
		Slug                 string   `json:"slug"`
		Image                string   `json:"image"`
		NameTranslations     []string `json:"nameTranslations"`
		OverviewTranslations []string `json:"overviewTranslations"`
		Aliases              []struct {
			Language string `json:"language"`
			Name     string `json:"name"`
		} `json:"aliases"`
		Score   int `json:"score"`
		Runtime int `json:"runtime"`
		Status  struct {
			Id          int    `json:"id"`
			Name        string `json:"name"`
			RecordType  string `json:"recordType"`
			KeepUpdated bool   `json:"keepUpdated"`
		} `json:"status"`
		LastUpdated string `json:"lastUpdated"`
		Year        string `json:"year"`
		Trailers    []struct {
			Id       int    `json:"id"`
			Name     string `json:"name"`
			Url      string `json:"url"`
			Language string `json:"language"`
			Runtime  int    `json:"runtime"`
		} `json:"trailers"`
		Genres []struct {
			Id   int    `json:"id"`
			Name string `json:"name"`
			Slug string `json:"slug"`
		} `json:"genres"`
		Releases []struct {
			Country string      `json:"country"`
			Date    string      `json:"date"`
			Detail  interface{} `json:"detail"`
		} `json:"releases"`
		Artworks []struct {
			Id        int     `json:"id"`
			Image     string  `json:"image"`
			Thumbnail string  `json:"thumbnail"`
			Language  *string `json:"language"`
			Type      int     `json:"type"`
			Score     int     `json:"score"`
			Width     int     `json:"width"`
			Height    int     `json:"height"`
		} `json:"artworks"`
		RemoteIds []struct {
			Id         string `json:"id"`
			Type       int    `json:"type"`
			SourceName string `json:"sourceName"`
		} `json:"remoteIds"`
		Characters []struct {
			Id                   int         `json:"id"`
			Name                 *string     `json:"name"`
			PeopleId             int         `json:"peopleId"`
			SeriesId             interface{} `json:"seriesId"`
			Series               interface{} `json:"series"`
			Movie                interface{} `json:"movie"`
			MovieId              int         `json:"movieId"`
			EpisodeId            interface{} `json:"episodeId"`
			Type                 int         `json:"type"`
			Image                string      `json:"image"`
			Sort                 int         `json:"sort"`
			IsFeatured           bool        `json:"isFeatured"`
			Url                  string      `json:"url"`
			NameTranslations     interface{} `json:"nameTranslations"`
			OverviewTranslations interface{} `json:"overviewTranslations"`
			Aliases              interface{} `json:"aliases"`
			PeopleType           string      `json:"peopleType"`
			PersonName           string      `json:"personName"`
			TagOptions           interface{} `json:"tagOptions"`
			PersonImgURL         string      `json:"personImgURL"`
		} `json:"characters"`
		Budget            string      `json:"budget"`
		BoxOffice         string      `json:"boxOffice"`
		BoxOfficeUS       string      `json:"boxOfficeUS"`
		OriginalCountry   string      `json:"originalCountry"`
		OriginalLanguage  string      `json:"originalLanguage"`
		AudioLanguages    interface{} `json:"audioLanguages"`
		SubtitleLanguages interface{} `json:"subtitleLanguages"`
		Studios           []struct {
			Id           int         `json:"id"`
			Name         string      `json:"name"`
			ParentStudio interface{} `json:"parentStudio"`
		} `json:"studios"`
		Awards     interface{} `json:"awards"`
		TagOptions []struct {
			Id       int         `json:"id"`
			Tag      int         `json:"tag"`
			TagName  string      `json:"tagName"`
			Name     string      `json:"name"`
			HelpText interface{} `json:"helpText"`
		} `json:"tagOptions"`
		Lists []struct {
			Id                   int      `json:"id"`
			Name                 string   `json:"name"`
			Overview             string   `json:"overview"`
			Url                  string   `json:"url"`
			IsOfficial           bool     `json:"isOfficial"`
			NameTranslations     []string `json:"nameTranslations"`
			OverviewTranslations []string `json:"overviewTranslations"`
			Aliases              []struct {
				Language string `json:"language"`
				Name     string `json:"name"`
			} `json:"aliases"`
			Score           int         `json:"score"`
			Image           string      `json:"image"`
			ImageIsFallback bool        `json:"imageIsFallback"`
			RemoteIds       interface{} `json:"remoteIds"`
			Tags            interface{} `json:"tags"`
		} `json:"lists"`
		ContentRatings []struct {
			Id          int    `json:"id"`
			Name        string `json:"name"`
			Country     string `json:"country"`
			Description string `json:"description"`
			ContentType string `json:"contentType"`
			Order       int    `json:"order"`
			Fullname    string `json:"fullname"`
		} `json:"contentRatings"`
		Companies struct {
			Studio []struct {
				Id                   int         `json:"id"`
				Name                 string      `json:"name"`
				Slug                 string      `json:"slug"`
				NameTranslations     interface{} `json:"nameTranslations"`
				OverviewTranslations interface{} `json:"overviewTranslations"`
				Aliases              interface{} `json:"aliases"`
				Country              interface{} `json:"country"`
				PrimaryCompanyType   int         `json:"primaryCompanyType"`
				ActiveDate           interface{} `json:"activeDate"`
				InactiveDate         interface{} `json:"inactiveDate"`
				CompanyType          struct {
					CompanyTypeId   int    `json:"companyTypeId"`
					CompanyTypeName string `json:"companyTypeName"`
				} `json:"companyType"`
				ParentCompany struct {
					Id       interface{} `json:"id"`
					Name     interface{} `json:"name"`
					Relation struct {
						Id       interface{} `json:"id"`
						TypeName interface{} `json:"typeName"`
					} `json:"relation"`
				} `json:"parentCompany"`
				TagOptions interface{} `json:"tagOptions"`
			} `json:"studio"`
			Network    []interface{} `json:"network"`
			Production []struct {
				Id                   int         `json:"id"`
				Name                 string      `json:"name"`
				Slug                 string      `json:"slug"`
				NameTranslations     interface{} `json:"nameTranslations"`
				OverviewTranslations interface{} `json:"overviewTranslations"`
				Aliases              interface{} `json:"aliases"`
				Country              interface{} `json:"country"`
				PrimaryCompanyType   int         `json:"primaryCompanyType"`
				ActiveDate           interface{} `json:"activeDate"`
				InactiveDate         interface{} `json:"inactiveDate"`
				CompanyType          struct {
					CompanyTypeId   int    `json:"companyTypeId"`
					CompanyTypeName string `json:"companyTypeName"`
				} `json:"companyType"`
				ParentCompany struct {
					Id       *int    `json:"id"`
					Name     *string `json:"name"`
					Relation struct {
						Id       interface{} `json:"id"`
						TypeName interface{} `json:"typeName"`
					} `json:"relation"`
				} `json:"parentCompany"`
				TagOptions interface{} `json:"tagOptions"`
			} `json:"production"`
			Distributor    []interface{} `json:"distributor"`
			SpecialEffects []interface{} `json:"special_effects"`
		} `json:"companies"`
		ProductionCountries []struct {
			Id      int    `json:"id"`
			Country string `json:"country"`
			Name    string `json:"name"`
		} `json:"production_countries"`
		Inspirations    []interface{} `json:"inspirations"`
		SpokenLanguages []string      `json:"spoken_languages"`
		FirstRelease    struct {
			Country string      `json:"country"`
			Date    string      `json:"date"`
			Detail  interface{} `json:"detail"`
		} `json:"first_release"`
	} `json:"data"`
}

type RequestArgs

type RequestArgs struct {
	Body   interface{}
	Method string
	Params url.Values
	Path   string
}

type SearchData

type SearchData struct {
	ObjectID        string   `json:"objectID"`
	Aliases         []string `json:"aliases"`
	Country         string   `json:"country"`
	Id              string   `json:"id"`
	ImageUrl        string   `json:"image_url"`
	Name            string   `json:"name"`
	FirstAirTime    string   `json:"first_air_time"`
	Overview        string   `json:"overview"`
	PrimaryLanguage string   `json:"primary_language"`
	PrimaryType     string   `json:"primary_type"`
	Status          string   `json:"status"`
	Type            string   `json:"type"`
	TvdbId          string   `json:"tvdb_id"`
	Year            string   `json:"year"`
	Slug            string   `json:"slug"`
	Overviews       struct {
		Deu  string `json:"deu,omitempty"`
		Eng  string `json:"eng"`
		Fra  string `json:"fra"`
		Heb  string `json:"heb,omitempty"`
		Ita  string `json:"ita,omitempty"`
		Jpn  string `json:"jpn,omitempty"`
		Kor  string `json:"kor,omitempty"`
		Por  string `json:"por,omitempty"`
		Rus  string `json:"rus"`
		Spa  string `json:"spa,omitempty"`
		Zho  string `json:"zho,omitempty"`
		Zhtw string `json:"zhtw,omitempty"`
		Swe  string `json:"swe,omitempty"`
	} `json:"overviews"`
	Translations struct {
		Deu  string `json:"deu,omitempty"`
		Eng  string `json:"eng"`
		Fra  string `json:"fra"`
		Heb  string `json:"heb,omitempty"`
		Ita  string `json:"ita,omitempty"`
		Jpn  string `json:"jpn,omitempty"`
		Kor  string `json:"kor,omitempty"`
		Nld  string `json:"nld,omitempty"`
		Pol  string `json:"pol,omitempty"`
		Por  string `json:"por,omitempty"`
		Rus  string `json:"rus"`
		Spa  string `json:"spa,omitempty"`
		Tur  string `json:"tur,omitempty"`
		Zho  string `json:"zho,omitempty"`
		Zhtw string `json:"zhtw,omitempty"`
		Swe  string `json:"swe,omitempty"`
	} `json:"translations"`
	Network   string `json:"network"`
	RemoteIds []struct {
		Id         string `json:"id"`
		Type       int    `json:"type"`
		SourceName string `json:"sourceName"`
	} `json:"remote_ids"`
	Thumbnail string `json:"thumbnail"`
}

type SearchRequest

type SearchRequest struct {
	Query       string `url:"query,omitempty"`
	Type        string `url:"type,omitempty"`
	Year        string `url:"year,omitempty"`
	Company     string `url:"company,omitempty"`
	Country     string `url:"country,omitempty"`
	Director    string `url:"director,omitempty"`
	Language    string `url:"language,omitempty"`
	PrimaryType string `url:"primaryType,omitempty"`
	Network     string `url:"network,omitempty"`
	RemoteID    string `url:"remote_id,omitempty"`
	Offset      string `url:"offset,omitempty"`
	Limit       string `url:"limit,omitempty"`
}

type SearchResponse

type SearchResponse struct {
	Data   []SearchData `json:"data"`
	Status string       `json:"status"`
}

type SeriesByIDArtworksData

type SeriesByIDArtworksData struct {
	Status string `json:"status"`
	Data   struct {
		Id                   int      `json:"id"`
		Name                 string   `json:"name"`
		Slug                 string   `json:"slug"`
		Image                string   `json:"image"`
		NameTranslations     []string `json:"nameTranslations"`
		OverviewTranslations []string `json:"overviewTranslations"`
		Aliases              []struct {
			Language string `json:"language"`
			Name     string `json:"name"`
		} `json:"aliases"`
		FirstAired string `json:"firstAired"`
		LastAired  string `json:"lastAired"`
		NextAired  string `json:"nextAired"`
		Score      int    `json:"score"`
		Status     struct {
			Id          int    `json:"id"`
			Name        string `json:"name"`
			RecordType  string `json:"recordType"`
			KeepUpdated bool   `json:"keepUpdated"`
		} `json:"status"`
		OriginalCountry   string      `json:"originalCountry"`
		OriginalLanguage  string      `json:"originalLanguage"`
		DefaultSeasonType int         `json:"defaultSeasonType"`
		IsOrderRandomized bool        `json:"isOrderRandomized"`
		LastUpdated       string      `json:"lastUpdated"`
		AverageRuntime    int         `json:"averageRuntime"`
		Episodes          interface{} `json:"episodes"`
		Overview          string      `json:"overview"`
		Year              string      `json:"year"`
		Artworks          []struct {
			Id              int     `json:"id"`
			Image           string  `json:"image"`
			Thumbnail       string  `json:"thumbnail"`
			Language        *string `json:"language"`
			Type            int     `json:"type"`
			Score           int     `json:"score"`
			Width           int     `json:"width"`
			Height          int     `json:"height"`
			ThumbnailWidth  int     `json:"thumbnailWidth"`
			ThumbnailHeight int     `json:"thumbnailHeight"`
			UpdatedAt       int     `json:"updatedAt"`
			Status          struct {
				Id   int         `json:"id"`
				Name interface{} `json:"name"`
			} `json:"status"`
			TagOptions interface{} `json:"tagOptions"`
			SeasonId   int         `json:"seasonId,omitempty"`
		} `json:"artworks"`
		Companies  interface{} `json:"companies"`
		Genres     interface{} `json:"genres"`
		Trailers   interface{} `json:"trailers"`
		Lists      interface{} `json:"lists"`
		RemoteIds  interface{} `json:"remoteIds"`
		Characters interface{} `json:"characters"`
		AirsDays   struct {
			Sunday    bool `json:"sunday"`
			Monday    bool `json:"monday"`
			Tuesday   bool `json:"tuesday"`
			Wednesday bool `json:"wednesday"`
			Thursday  bool `json:"thursday"`
			Friday    bool `json:"friday"`
			Saturday  bool `json:"saturday"`
		} `json:"airsDays"`
		AirsTime       interface{} `json:"airsTime"`
		Seasons        interface{} `json:"seasons"`
		Tags           interface{} `json:"tags"`
		ContentRatings interface{} `json:"contentRatings"`
	} `json:"data"`
}

type SeriesByIDData

type SeriesByIDData struct {
	Status string `json:"status"`
	Data   struct {
		Id                   int      `json:"id"`
		Name                 string   `json:"name"`
		Slug                 string   `json:"slug"`
		Image                string   `json:"image"`
		NameTranslations     []string `json:"nameTranslations"`
		OverviewTranslations []string `json:"overviewTranslations"`
		Aliases              []struct {
			Language string `json:"language"`
			Name     string `json:"name"`
		} `json:"aliases"`
		FirstAired string `json:"firstAired"`
		LastAired  string `json:"lastAired"`
		NextAired  string `json:"nextAired"`
		Score      int    `json:"score"`
		Status     struct {
			Id          int    `json:"id"`
			Name        string `json:"name"`
			RecordType  string `json:"recordType"`
			KeepUpdated bool   `json:"keepUpdated"`
		} `json:"status"`
		OriginalCountry   string      `json:"originalCountry"`
		OriginalLanguage  string      `json:"originalLanguage"`
		DefaultSeasonType int         `json:"defaultSeasonType"`
		IsOrderRandomized bool        `json:"isOrderRandomized"`
		LastUpdated       string      `json:"lastUpdated"`
		AverageRuntime    int         `json:"averageRuntime"`
		Episodes          interface{} `json:"episodes"`
		Overview          string      `json:"overview"`
		Year              string      `json:"year"`
	} `json:"data"`
}

type SeriesByIDExtendedData

type SeriesByIDExtendedData struct {
	Status string `json:"status"`
	Data   struct {
		Id                   int      `json:"id"`
		Name                 string   `json:"name"`
		Slug                 string   `json:"slug"`
		Image                string   `json:"image"`
		NameTranslations     []string `json:"nameTranslations"`
		OverviewTranslations []string `json:"overviewTranslations"`
		Aliases              []struct {
			Language string `json:"language"`
			Name     string `json:"name"`
		} `json:"aliases"`
		FirstAired string `json:"firstAired"`
		LastAired  string `json:"lastAired"`
		NextAired  string `json:"nextAired"`
		Score      int    `json:"score"`
		Status     struct {
			Id          int    `json:"id"`
			Name        string `json:"name"`
			RecordType  string `json:"recordType"`
			KeepUpdated bool   `json:"keepUpdated"`
		} `json:"status"`
		OriginalCountry   string      `json:"originalCountry"`
		OriginalLanguage  string      `json:"originalLanguage"`
		DefaultSeasonType int         `json:"defaultSeasonType"`
		IsOrderRandomized bool        `json:"isOrderRandomized"`
		LastUpdated       string      `json:"lastUpdated"`
		AverageRuntime    int         `json:"averageRuntime"`
		Episodes          interface{} `json:"episodes"`
		Overview          string      `json:"overview"`
		Year              string      `json:"year"`
		Artworks          []struct {
			Id              int     `json:"id"`
			Image           string  `json:"image"`
			Thumbnail       string  `json:"thumbnail"`
			Language        *string `json:"language"`
			Type            int     `json:"type"`
			Score           int     `json:"score"`
			Width           int     `json:"width"`
			Height          int     `json:"height"`
			ThumbnailWidth  int     `json:"thumbnailWidth"`
			ThumbnailHeight int     `json:"thumbnailHeight"`
			UpdatedAt       int     `json:"updatedAt"`
			Status          struct {
				Id   int         `json:"id"`
				Name interface{} `json:"name"`
			} `json:"status"`
			TagOptions interface{} `json:"tagOptions"`
			SeasonId   int         `json:"seasonId,omitempty"`
		} `json:"artworks"`
		Companies []struct {
			Id                   int      `json:"id"`
			Name                 string   `json:"name"`
			Slug                 string   `json:"slug"`
			NameTranslations     []string `json:"nameTranslations"`
			OverviewTranslations []string `json:"overviewTranslations"`
			Aliases              []struct {
				Language string `json:"language"`
				Name     string `json:"name"`
			} `json:"aliases"`
			Country            string      `json:"country"`
			PrimaryCompanyType int         `json:"primaryCompanyType"`
			ActiveDate         string      `json:"activeDate"`
			InactiveDate       interface{} `json:"inactiveDate"`
			CompanyType        struct {
				CompanyTypeId   int    `json:"companyTypeId"`
				CompanyTypeName string `json:"companyTypeName"`
			} `json:"companyType"`
			ParentCompany struct {
				Id       interface{} `json:"id"`
				Name     interface{} `json:"name"`
				Relation struct {
					Id       interface{} `json:"id"`
					TypeName interface{} `json:"typeName"`
				} `json:"relation"`
			} `json:"parentCompany"`
			TagOptions interface{} `json:"tagOptions"`
		} `json:"companies"`
		OriginalNetwork struct {
			Id                   int      `json:"id"`
			Name                 string   `json:"name"`
			Slug                 string   `json:"slug"`
			NameTranslations     []string `json:"nameTranslations"`
			OverviewTranslations []string `json:"overviewTranslations"`
			Aliases              []struct {
				Language string `json:"language"`
				Name     string `json:"name"`
			} `json:"aliases"`
			Country            string      `json:"country"`
			PrimaryCompanyType int         `json:"primaryCompanyType"`
			ActiveDate         string      `json:"activeDate"`
			InactiveDate       interface{} `json:"inactiveDate"`
			CompanyType        struct {
				CompanyTypeId   int    `json:"companyTypeId"`
				CompanyTypeName string `json:"companyTypeName"`
			} `json:"companyType"`
			ParentCompany struct {
				Id       interface{} `json:"id"`
				Name     interface{} `json:"name"`
				Relation struct {
					Id       interface{} `json:"id"`
					TypeName interface{} `json:"typeName"`
				} `json:"relation"`
			} `json:"parentCompany"`
			TagOptions []struct {
				Id       int    `json:"id"`
				Tag      int    `json:"tag"`
				TagName  string `json:"tagName"`
				Name     string `json:"name"`
				HelpText string `json:"helpText"`
			} `json:"tagOptions"`
		} `json:"originalNetwork"`
		LatestNetwork struct {
			Id                   int      `json:"id"`
			Name                 string   `json:"name"`
			Slug                 string   `json:"slug"`
			NameTranslations     []string `json:"nameTranslations"`
			OverviewTranslations []string `json:"overviewTranslations"`
			Aliases              []struct {
				Language string `json:"language"`
				Name     string `json:"name"`
			} `json:"aliases"`
			Country            string      `json:"country"`
			PrimaryCompanyType int         `json:"primaryCompanyType"`
			ActiveDate         string      `json:"activeDate"`
			InactiveDate       interface{} `json:"inactiveDate"`
			CompanyType        struct {
				CompanyTypeId   int    `json:"companyTypeId"`
				CompanyTypeName string `json:"companyTypeName"`
			} `json:"companyType"`
			ParentCompany struct {
				Id       interface{} `json:"id"`
				Name     interface{} `json:"name"`
				Relation struct {
					Id       interface{} `json:"id"`
					TypeName interface{} `json:"typeName"`
				} `json:"relation"`
			} `json:"parentCompany"`
			TagOptions []struct {
				Id       int    `json:"id"`
				Tag      int    `json:"tag"`
				TagName  string `json:"tagName"`
				Name     string `json:"name"`
				HelpText string `json:"helpText"`
			} `json:"tagOptions"`
		} `json:"latestNetwork"`
		Genres []struct {
			Id   int    `json:"id"`
			Name string `json:"name"`
			Slug string `json:"slug"`
		} `json:"genres"`
		Trailers []interface{} `json:"trailers"`
		Lists    []struct {
			Id                   int      `json:"id"`
			Name                 string   `json:"name"`
			Overview             *string  `json:"overview"`
			Url                  string   `json:"url"`
			IsOfficial           bool     `json:"isOfficial"`
			NameTranslations     []string `json:"nameTranslations"`
			OverviewTranslations []string `json:"overviewTranslations"`
			Aliases              []struct {
				Language string `json:"language"`
				Name     string `json:"name"`
			} `json:"aliases"`
			Score           int         `json:"score"`
			Image           string      `json:"image"`
			ImageIsFallback bool        `json:"imageIsFallback"`
			RemoteIds       interface{} `json:"remoteIds"`
			Tags            interface{} `json:"tags"`
		} `json:"lists"`
		RemoteIds []struct {
			Id         string `json:"id"`
			Type       int    `json:"type"`
			SourceName string `json:"sourceName"`
		} `json:"remoteIds"`
		Characters []struct {
			Id                   int         `json:"id"`
			Name                 string      `json:"name"`
			PeopleId             int         `json:"peopleId"`
			SeriesId             int         `json:"seriesId"`
			Series               interface{} `json:"series"`
			Movie                interface{} `json:"movie"`
			MovieId              interface{} `json:"movieId"`
			EpisodeId            interface{} `json:"episodeId"`
			Type                 int         `json:"type"`
			Image                string      `json:"image"`
			Sort                 int         `json:"sort"`
			IsFeatured           bool        `json:"isFeatured"`
			Url                  string      `json:"url"`
			NameTranslations     interface{} `json:"nameTranslations"`
			OverviewTranslations interface{} `json:"overviewTranslations"`
			Aliases              interface{} `json:"aliases"`
			PeopleType           string      `json:"peopleType"`
			PersonName           string      `json:"personName"`
			TagOptions           interface{} `json:"tagOptions"`
			PersonImgURL         *string     `json:"personImgURL"`
		} `json:"characters"`
		AirsDays struct {
			Sunday    bool `json:"sunday"`
			Monday    bool `json:"monday"`
			Tuesday   bool `json:"tuesday"`
			Wednesday bool `json:"wednesday"`
			Thursday  bool `json:"thursday"`
			Friday    bool `json:"friday"`
			Saturday  bool `json:"saturday"`
		} `json:"airsDays"`
		AirsTime string `json:"airsTime"`
		Seasons  []struct {
			Id       int `json:"id"`
			SeriesId int `json:"seriesId"`
			Type     struct {
				Id            int         `json:"id"`
				Name          string      `json:"name"`
				Type          string      `json:"type"`
				AlternateName interface{} `json:"alternateName"`
			} `json:"type"`
			Number               int      `json:"number"`
			NameTranslations     []string `json:"nameTranslations"`
			OverviewTranslations []string `json:"overviewTranslations"`
			Image                string   `json:"image,omitempty"`
			ImageType            int      `json:"imageType,omitempty"`
			Companies            struct {
				Studio         interface{} `json:"studio"`
				Network        interface{} `json:"network"`
				Production     interface{} `json:"production"`
				Distributor    interface{} `json:"distributor"`
				SpecialEffects interface{} `json:"special_effects"`
			} `json:"companies"`
			LastUpdated string `json:"lastUpdated"`
		} `json:"seasons"`
		Tags []struct {
			Id       int     `json:"id"`
			Tag      int     `json:"tag"`
			TagName  string  `json:"tagName"`
			Name     string  `json:"name"`
			HelpText *string `json:"helpText"`
		} `json:"tags"`
		ContentRatings []struct {
			Id          int         `json:"id"`
			Name        string      `json:"name"`
			Country     string      `json:"country"`
			Description string      `json:"description"`
			ContentType string      `json:"contentType"`
			Order       int         `json:"order"`
			Fullname    interface{} `json:"fullname"`
		} `json:"contentRatings"`
		SeasonTypes []struct {
			Id            int         `json:"id"`
			Name          string      `json:"name"`
			Type          string      `json:"type"`
			AlternateName interface{} `json:"alternateName"`
		} `json:"seasonTypes"`
	} `json:"data"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL