gotaseries

package module
v0.0.0-...-c6468c6 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	ID      string  `json:"id"`
	Date    string  `json:"date"`
	Excerpt *string `json:"excerpt"`
	Content string  `json:"content"`
	Title   string  `json:"title"`
	Slug    string  `json:"slug"`
	Image   string  `json:"image"`
	Sticky  string  `json:"sticky"`
}

type ArticlesResponse

type ArticlesResponse struct {
	Articles []Article `json:"articles"`
	Locale   string    `json:"locale"`
	Errors   `json:"errors"`
}

type Available

type Available struct {
	Last int `json:"last"`
}

type Character

type Character struct {
	ID          int     `json:"id"`
	ShowID      int     `json:"show_id"`
	Name        string  `json:"name"`
	Role        string  `json:"role"`
	Actor       string  `json:"actor"`
	Picture     *string `json:"picture"`
	Description *string `json:"description"`
}

type CharactersResponse

type CharactersResponse struct {
	Characters []Character `json:"characters"`
	Errors     `json:"errors"`
}

type Client

type Client struct {
	ApiKey string
	Token  *string

	Show *ShowService
	// contains filtered or unexported fields
}

Client manage communication with the Betaseries API.

func NewClient

func NewClient(apiKey string, token *string) *Client

NewClient returns a new Betaseries API client. To use API methods which require authentication, use token parameter otherwise set it to nil

type Episode

type Episode struct {
	ID          int      `json:"id"`
	ThetvdbID   int      `json:"thetvdb_id"`
	YoutubeID   *string  `json:"youtube_id"`
	Title       string   `json:"title"`
	Season      int      `json:"season"`
	Episode     int      `json:"episode"`
	Code        string   `json:"code"`
	Global      int      `json:"global"`
	Description string   `json:"description"`
	Director    string   `json:"director"`
	Writers     []string `json:"writers"`
	Special     int      `json:"special"`
	Comments    string   `json:"comments"`
	ResourceURL string   `json:"resource_url"`
	Note        Note     `json:"note"`
	User        struct {
		Seen       bool `json:"seen"`
		Hidden     bool `json:"hidden"`
		Downloaded bool `json:"downloaded"`
	} `json:"user"`
	Date         string        `json:"date"`
	WatchedBy    []WatchedBy   `json:"watched_by"`
	SeenTotal    int           `json:"seen_total"`
	ReleasesSvod []interface{} `json:"releasesSvod"`
	Show         struct {
		ID        int    `json:"id"`
		ThetvdbID int    `json:"thetvdb_id"`
		Title     string `json:"title"`
		InAccount bool   `json:"in_account"`
	} `json:"show"`
	Subtitles *[]Subtitle `json:"subtitles"`
}

type EpisodesResponse

type EpisodesResponse struct {
	Episodes []Episode `json:"episodes"`
	Errors   `json:"errors"`
}

type Error

type Error struct {
	Code    int    `json:"code"`
	Message string `json:"text"`
}

type Errors

type Errors []Error

func (Errors) Err

func (errs Errors) Err() error

type FriendsWatching

type FriendsWatching struct {
	ID     int         `json:"id"`
	Login  string      `json:"login"`
	Note   interface{} `json:"note"`
	Avatar string      `json:"avatar"`
}

type Images

type Images struct {
	Show   string `json:"show"`
	Banner string `json:"banner"`
	Box    string `json:"box"`
	Poster string `json:"poster"`
}

type Next

type Next struct {
	ID    interface{} `json:"id"`
	Code  string      `json:"code"`
	Date  interface{} `json:"date"`
	Title interface{} `json:"title"`
	Image interface{} `json:"image"`
}

type Note

type Note struct {
	Total   int     `json:"total"`
	Mean    float64 `json:"mean"`
	User    int     `json:"user"`
	Moyenne float64 `json:"moyenne"`
}

type Notes

type Notes struct {
	Total int     `json:"total"`
	Mean  float64 `json:"mean"`
	User  int     `json:"user"`
}

type Platforms

type Platforms struct {
	Svods []Svod `json:"svods"`
}

type SeasonsDetail

type SeasonsDetail struct {
	Number   int `json:"number"`
	Episodes int `json:"episodes"`
}

type Show

type Show struct {
	ID             int                `json:"id"`
	ThetvdbID      int                `json:"thetvdb_id"`
	ImdbID         string             `json:"imdb_id"`
	Title          string             `json:"title"`
	OriginalTitle  *string            `json:"original_title"`
	Description    *string            `json:"description"`
	Seasons        string             `json:"seasons"`
	SeasonsDetails *[]SeasonsDetail   `json:"seasons_details"`
	Episodes       string             `json:"episodes"`
	Followers      string             `json:"followers"`
	Comments       *string            `json:"comments"`
	Similars       *string            `json:"similars"`
	Characters     *string            `json:"characters"`
	Creation       string             `json:"creation"`
	Showrunner     *Showrunner        `json:"showrunner"`
	Genres         *map[string]string `json:"genres"`
	Length         *string            `json:"length"`
	Network        *string            `json:"network"`
	Country        *interface{}       `json:"country"`
	Rating         *string            `json:"rating"`
	Status         *string            `json:"status"`
	Language       *string            `json:"language"`
	Notes          *Notes             `json:"notes"`
	InAccount      *bool              `json:"in_account"`
	Images         *Images            `json:"images"`
	Aliases        *map[int]string    `json:"aliases"`
	SocialLinks    *[]interface{}     `json:"social_links"`
	User           *User              `json:"user"`
	NextTrailer    *string            `json:"next_trailer"`
	ResourceURL    *string            `json:"resource_url"`
	Platforms      *Platforms         `json:"platforms"`
}

type ShowResponse

type ShowResponse struct {
	Show   Show `json:"show"`
	Errors `json:"errors"`
}

type ShowService

type ShowService service

func (*ShowService) Articles

func (s *ShowService) Articles(opts ShowsArticlesOptions) ([]Article, error)

func (*ShowService) Characters

func (s *ShowService) Characters(opts *ShowsCharactersOptions) ([]Character, error)

func (*ShowService) Discover

func (s *ShowService) Discover(opts *ShowsDiscoverOptions) ([]Show, error)

func (*ShowService) DiscoverPlatforms

func (s *ShowService) DiscoverPlatforms(opts *ShowsDiscoverPlatformsOptions) ([]Show, error)

func (*ShowService) Display

func (s *ShowService) Display(opts ShowsDisplayOptions) (*Show, error)

func (*ShowService) Episodes

func (s *ShowService) Episodes(opts ShowsEpisodesOptions) ([]Episode, error)

func (*ShowService) Favorites

func (s *ShowService) Favorites(opts *ShowsFavoritesOptions) ([]Show, error)

type Showrunner

type Showrunner struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	Picture string `json:"picture"`
}

type ShowsArticlesOptions

type ShowsArticlesOptions struct {
	ID int `url:"id"`
}

type ShowsCharactersOptions

type ShowsCharactersOptions struct {
	ID        int `url:"id,omitempty"`
	ThetvdbID int `url:"thetvdb_id,omitempty"`
}

type ShowsDiscoverOptions

type ShowsDiscoverOptions struct {
	Limit   int  `url:"limit,omitempty"`
	Offset  int  `url:"offset,omitempty"`
	Summary bool `url:"summary,omitempty"`
}

type ShowsDiscoverPlatformsOptions

type ShowsDiscoverPlatformsOptions struct {
	Summary bool `url:"summary,omitempty"`
}

type ShowsDisplayOptions

type ShowsDisplayOptions struct {
	ID        int `url:"id,omitempty"`
	ThetvdbID int `url:"thetvdb_id,omitempty"`
	ImdbID    int `url:"imdb_id,omitempty"`
}

type ShowsEpisodesOptions

type ShowsEpisodesOptions struct {
	ID        int  `url:"id,omitempty"`
	ThetvdbID int  `url:"thetvdb_id,omitempty"`
	Season    int  `url:"season,omitempty"`
	Episode   int  `url:"episode,omitempty"`
	Subtitles bool `url:"subtitles,omitempty"`
}

type ShowsFavoritesOptions

type ShowsFavoritesOptions struct {
	ID      int    `url:"id,omitempty"`
	Order   string `url:"order,omitempty"`
	Limit   int    `url:"limit,omitempty"`
	Offset  int    `url:"offset,omitempty"`
	Status  string `url:"offset,omitempty"`
	Summary bool   `url:"summary,omitempty"`
}

type ShowsResponse

type ShowsResponse struct {
	Shows  []Show `json:"shows"`
	Errors `json:"errors"`
}

type Subtitle

type Subtitle struct {
	ID       int           `json:"id"`
	Language string        `json:"language"`
	Source   string        `json:"source"`
	Quality  int           `json:"quality"`
	File     string        `json:"file"`
	Content  []interface{} `json:"content"`
	URL      string        `json:"url"`
	Episode  *struct {
		ShowID    int `json:"show_id"`
		EpisodeID int `json:"episode_id"`
		Season    int `json:"season"`
		Episode   int `json:"episode"`
	} `json:"episode"`
	Date string `json:"date"`
}

type SubtitlesResponse

type SubtitlesResponse struct {
	Subtitles []Subtitle `json:"subtitles"`
	Errors    `json:"errors"`
}

type Svod

type Svod struct {
	ID        interface{} `json:"id"` // https://www.betaseries.com/bugs/api/453
	Name      string      `json:"name"`
	Tag       string      `json:"tag"`
	LinkURL   string      `json:"link_url"`
	Available Available   `json:"available"`
	Partner   bool        `json:"partner"`
}

type User

type User struct {
	Archived        bool               `json:"archived"`
	Favorited       bool               `json:"favorited"`
	Remaining       int                `json:"remaining"`
	Status          int                `json:"status"`
	Last            string             `json:"last"`
	Tags            interface{}        `json:"tags"`
	Next            Next               `json:"next"`
	FriendsWatching *[]FriendsWatching `json:"friends_watching"`
}

type WatchedBy

type WatchedBy struct {
	ID    int      `json:"id"`
	Login string   `json:"login"`
	Note  *float64 `json:"note"`
}

Jump to

Keyboard shortcuts

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