helpers

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	API    = "https://api.mangadex.org"
	ASSETS = "https://uploads.mangadex.org"
)

Variables

This section is empty.

Functions

func GetArticle

func GetArticle(name string, urlString string) ([]byte, error)

Get Markdown version of article from url.

func GetContent

func GetContent(name string, url string, mediaType string) ([]byte, error)

func GetKeys

func GetKeys(key string) (string, error)

Get auth keys from .env file.

func GetMedia

func GetMedia(name string, url string) ([]byte, error)

Get media file from source URL.

func GetYTVid

func GetYTVid(name string, url string) ([]byte, error)

Get YouTube file from url.

func UploadToB2

func UploadToB2(data []byte, name, fileType string) (string, error)

Upload file to B2 bucket. DOCS: https://www.backblaze.com/b2/docs/b2_upload_file.html

Types

type AltTitlesEntity added in v1.4.0

type AltTitlesEntity struct {
	Ja string `json:"ja,omitempty"`
	Zh string `json:"zh,omitempty"`
	Ru string `json:"ru,omitempty"`
	Fa string `json:"fa,omitempty"`
}

type AuthorAttributes added in v1.4.0

type AuthorAttributes struct {
	Name      string `json:"name"`
	ImageURL  string `json:"imageUrl,omitempty"`
	Biography string `json:"biography"`
	Twitter   string `json:"twitter,omitempty"`
	Pixiv     string `json:"pixiv,omitempty"`
	MelonBook string `json:"melonBook,omitempty"`
	FanBox    string `json:"fanBox,omitempty"`
	Booth     string `json:"booth,omitempty"`
	NicoVideo string `json:"nicoVideo,omitempty"`
	Skeb      string `json:"skeb,omitempty"`
	Fantia    string `json:"fantia,omitempty"`
	Tumblr    string `json:"tumblr,omitempty"`
	Youtube   string `json:"youtube,omitempty"`
	Weibo     string `json:"weibo,omitempty"`
	Naver     string `json:"naver,omitempty"`
	Website   string `json:"website,omitempty"`
	CreatedAt string `json:"createdAt"`
	UpdatedAt string `json:"updatedAt"`
	Version   int    `json:"version"`
}

type AuthorData added in v1.4.0

type AuthorData struct {
	ID            string                `json:"id"`
	Type          string                `json:"type"`
	Attributes    AuthorAttributes      `json:"attributes"`
	Relationships []RelationshipsEntity `json:"relationships,omitempty"`
}

type AuthorResponse added in v1.4.0

type AuthorResponse struct {
	Result   string     `json:"result"`
	Response string     `json:"response"`
	Data     AuthorData `json:"data"`
}

type B2AuthResp

type B2AuthResp struct {
	AbsoluteMinimumPartSize int    `json:"absoluteMinimumPartSize"`
	AccountId               string `json:"accountId"`
	Allowed                 struct {
		BucketId     string   `json:"bucketId"`
		BucketName   string   `json:"bucketName"`
		Capabilities []string `json:"capabilities"`
		NamePrefix   string   `json:"namePrefix"`
	} `json:"allowed"`
	ApiUrl              string `json:"apiUrl"`
	AuthorizationToken  string `json:"authorizationToken"`
	DownloadUrl         string `json:"downloadUrl"`
	RecommendedPartSize int    `json:"recommendedPartSize"`
	S3ApiUrl            string `json:"s3ApiUrl"`
}

type B2AuthTokens

type B2AuthTokens struct {
	ApiUrl              string
	AuthorizationToken  string
	DownloadUrl         string
	RecommendedPartSize int
}

func AuthTokens

func AuthTokens() (B2AuthTokens, error)

Authorize B2 bucket for upload. DOCS: https://www.backblaze.com/b2/docs/b2_authorize_account.html

type B2Error

type B2Error struct {
	Status  int    `json:"status"`
	Code    string `json:"code"`
	Message string `json:"message"`
}

type B2UpUrlResp

type B2UpUrlResp struct {
	BucketId           string `json:"bucketId"`
	UploadUrl          string `json:"uploadUrl"`
	AuthorizationToken string `json:"authorizationToken"`
}

type B2UploadResp

type B2UploadResp struct {
	FileId        string `json:"fileId"`
	FileName      string `json:"fileName"`
	AccountId     string `json:"accountId"`
	BucketId      string `json:"bucketId"`
	ContentLength int    `json:"contentLength"`
	ContentSha1   string `json:"contentSha1"`
	ContentType   string `json:"contentType"`
	FileInfo      struct {
		Author string `json:"author"`
	} `json:"fileInfo"`
	ServerSideEncryption struct {
		Algorithm string `json:"algorithm"`
		Mode      string `json:"mode"`
	} `json:"serverSideEncryption"`
}

type B2UploadTokens

type B2UploadTokens struct {
	Endpoint    string
	AuthToken   string
	DownloadUrl string
}

func GetUploadUrl

func GetUploadUrl() (B2UploadTokens, error)

Get B2 endpoint for upload. DOCS: https://www.backblaze.com/b2/docs/b2_get_upload_url.html

type CardFaces added in v1.4.0

type CardFaces struct {
	Object         string    `json:"object"`
	Name           string    `json:"name"`
	ManaCost       string    `json:"mana_cost"`
	TypeLine       string    `json:"type_line"`
	OracleText     string    `json:"oracle_text"`
	FlavorText     string    `json:"flavor_text"`
	Colors         []string  `json:"colors"`
	Power          string    `json:"power"`
	Toughness      string    `json:"toughness"`
	Artist         string    `json:"artist"`
	ArtistID       string    `json:"artist_id"`
	IllustrationID string    `json:"illustration_id"`
	ImageUris      ImageUris `json:"image_uris"`
}

type CleanMTG added in v1.4.0

type CleanMTG struct {
	Name            string
	Colors          *[]string
	Type            string
	Set             string
	SetName         string
	OracleText      *string
	FlavorText      *string
	Rarity          string
	CollectorNumber int
	Artist          string
	ReleasedAt      string
	Image           string
	Back            *string
}

func GetMTGInfo added in v1.4.0

func GetMTGInfo(url string) (CleanMTG, error)

type CleanManga added in v1.4.0

type CleanManga struct {
	Title       string
	Description string
	Author      string
	Year        int
	Status      string
	Cover       string
	Url         string
}

func GetMangaInfo added in v1.4.0

func GetMangaInfo(url string) (CleanManga, error)

type CleanMedia added in v1.4.0

type CleanMedia struct {
	Title   string
	Creator string
	Genre   string
	Year    string
	Type    string
}

func GetMediaInfo added in v1.4.0

func GetMediaInfo(url string) (CleanMedia, error)

type CleanQuestion added in v1.3.0

type CleanQuestion struct {
	Title    string
	Question string
	Answer   string
	Tags     []string
}

type CleanRepo added in v1.2.0

type CleanRepo struct {
	Name        string
	Owner       string
	Description string
	URL         string
	Language    string
}

type CleanYT added in v1.4.0

type CleanYT struct {
	Title   string
	Creator string
	URL     string
	Tags    []string
}

func GetYTInfo added in v1.4.0

func GetYTInfo(url string) (CleanYT, error)

type Credits added in v1.4.0

type Credits struct {
	ID   int `json:"id"`
	Cast []struct {
		Adult              bool    `json:"adult"`
		Gender             int     `json:"gender"`
		ID                 int     `json:"id"`
		KnownForDepartment string  `json:"known_for_department"`
		Name               string  `json:"name"`
		OriginalName       string  `json:"original_name"`
		Popularity         float64 `json:"popularity"`
		ProfilePath        string  `json:"profile_path"`
		CastID             int     `json:"cast_id"`
		Character          string  `json:"character"`
		CreditID           string  `json:"credit_id"`
		Order              int     `json:"order"`
	} `json:"cast"`
	Crew []struct {
		Adult              bool    `json:"adult"`
		Gender             int     `json:"gender"`
		ID                 int     `json:"id"`
		KnownForDepartment string  `json:"known_for_department"`
		Name               string  `json:"name"`
		OriginalName       string  `json:"original_name"`
		Popularity         float64 `json:"popularity"`
		ProfilePath        *string `json:"profile_path"`
		CreditID           string  `json:"credit_id"`
		Department         string  `json:"department"`
		Job                string  `json:"job"`
	} `json:"crew"`
}

type Description added in v1.4.0

type Description struct {
	En   string `json:"en"`
	Ru   string `json:"ru"`
	PtBr string `json:"pt-br"`
}

type ImageUris added in v1.4.0

type ImageUris struct {
	Large      string `json:"large"`
	BorderCrop string `json:"border_crop"`
	Normal     string `json:"normal"`
	ArtCrop    string `json:"art_crop"`
	Small      string `json:"small"`
	Png        string `json:"png"`
}

type Legalities added in v1.4.0

type Legalities struct {
	Gladiator       string `json:"gladiator"`
	Historicbrawl   string `json:"historicbrawl"`
	Explorer        string `json:"explorer"`
	Vintage         string `json:"vintage"`
	Oldschool       string `json:"oldschool"`
	Legacy          string `json:"legacy"`
	Pauper          string `json:"pauper"`
	Standard        string `json:"standard"`
	Modern          string `json:"modern"`
	Penny           string `json:"penny"`
	Brawl           string `json:"brawl"`
	Duel            string `json:"duel"`
	Paupercommander string `json:"paupercommander"`
	Premodern       string `json:"premodern"`
	Alchemy         string `json:"alchemy"`
	Future          string `json:"future"`
	Commander       string `json:"commander"`
	Historic        string `json:"historic"`
	Pioneer         string `json:"pioneer"`
}
type Links struct {
	Al    string `json:"al"`
	Ap    string `json:"ap"`
	Bw    string `json:"bw"`
	Kt    string `json:"kt"`
	Mu    string `json:"mu"`
	Amz   string `json:"amz"`
	Cdj   string `json:"cdj"`
	Ebj   string `json:"ebj"`
	Mal   string `json:"mal"`
	Raw   string `json:"raw"`
	Engtl string `json:"engtl"`
}

type MangaAttributes added in v1.4.0

type MangaAttributes struct {
	Title                          NameOrTitle       `json:"title"`
	AltTitles                      []AltTitlesEntity `json:"altTitles,omitempty"`
	Description                    Description       `json:"description"`
	IsLocked                       bool              `json:"isLocked"`
	Links                          Links             `json:"links"`
	OriginalLanguage               string            `json:"originalLanguage"`
	LastVolume                     string            `json:"lastVolume"`
	LastChapter                    string            `json:"lastChapter"`
	PublicationDemographic         string            `json:"publicationDemographic"`
	Status                         string            `json:"status"`
	Year                           int               `json:"year"`
	ContentRating                  string            `json:"contentRating"`
	Tags                           []TagsEntity      `json:"tags,omitempty"`
	State                          string            `json:"state"`
	ChapterNumbersResetOnNewVolume bool              `json:"chapterNumbersResetOnNewVolume"`
	CreatedAt                      string            `json:"createdAt"`
	UpdatedAt                      string            `json:"updatedAt"`
	Version                        int               `json:"version"`
	AvailableTranslatedLanguages   []string          `json:"availableTranslatedLanguages,omitempty"`
	LatestUploadedChapter          string            `json:"latestUploadedChapter"`
}

type MangaData added in v1.4.0

type MangaData struct {
	ID            string                `json:"id"`
	Type          string                `json:"type"`
	Attributes    MangaAttributes       `json:"attributes"`
	Relationships []RelationshipsEntity `json:"relationships,omitempty"`
}

type MangaResponse added in v1.4.0

type MangaResponse struct {
	Result   string    `json:"result"`
	Response string    `json:"response"`
	Data     MangaData `json:"data"`
}

type Movie added in v1.4.0

type Movie struct {
	Adult               bool   `json:"adult"`
	BackdropPath        string `json:"backdrop_path"`
	BelongsToCollection struct {
		ID           int    `json:"id"`
		Name         string `json:"name"`
		PosterPath   string `json:"poster_path"`
		BackdropPath string `json:"backdrop_path"`
	} `json:"belongs_to_collection"`
	Budget int `json:"budget"`
	Genres []struct {
		ID   int    `json:"id"`
		Name string `json:"name"`
	} `json:"genres"`
	Homepage            string  `json:"homepage"`
	ID                  int     `json:"id"`
	ImdbID              string  `json:"imdb_id"`
	OriginalLanguage    string  `json:"original_language"`
	OriginalTitle       string  `json:"original_title"`
	Overview            string  `json:"overview"`
	Popularity          float64 `json:"popularity"`
	PosterPath          string  `json:"poster_path"`
	ProductionCompanies []struct {
		ID            int    `json:"id"`
		LogoPath      string `json:"logo_path"`
		Name          string `json:"name"`
		OriginCountry string `json:"origin_country"`
	} `json:"production_companies"`
	ProductionCountries []struct {
		Iso31661 string `json:"iso_3166_1"`
		Name     string `json:"name"`
	} `json:"production_countries"`
	ReleaseDate     string `json:"release_date"`
	Revenue         int    `json:"revenue"`
	Runtime         int    `json:"runtime"`
	SpokenLanguages []struct {
		EnglishName string `json:"english_name"`
		Iso6391     string `json:"iso_639_1"`
		Name        string `json:"name"`
	} `json:"spoken_languages"`
	Status      string  `json:"status"`
	Tagline     string  `json:"tagline"`
	Title       string  `json:"title"`
	Video       bool    `json:"video"`
	VoteAverage float64 `json:"vote_average"`
	VoteCount   int     `json:"vote_count"`
}

type NameOrTitle added in v1.4.0

type NameOrTitle struct {
	En string `json:"en"`
}

type Preview added in v1.4.0

type Preview struct {
	Source      string `json:"source"`
	PreviewedAt string `json:"previewed_at"`
	SourceURI   string `json:"source_uri"`
}

type Prices added in v1.4.0

type Prices struct {
	Tix       string `json:"tix"`
	UsdEtched string `json:"usd_etched"`
	Eur       string `json:"eur"`
	EurFoil   string `json:"eur_foil"`
	Usd       string `json:"usd"`
	UsdFoil   string `json:"usd_foil"`
}

type PurchaseUris added in v1.4.0

type PurchaseUris struct {
	Cardhoarder string `json:"cardhoarder"`
	Cardmarket  string `json:"cardmarket"`
	Tcgplayer   string `json:"tcgplayer"`
}

type QuestionItems added in v1.3.0

type QuestionItems struct {
	Tags               []string      `json:"tags"`
	Owner              QuestionOwner `json:"owner"`
	IsAnswered         bool          `json:"is_answered"`
	ViewCount          int           `json:"view_count"`
	ProtectedDate      int           `json:"protected_date"`
	AcceptedAnswerID   int           `json:"accepted_answer_id"`
	AnswerCount        int           `json:"answer_count"`
	CommunityOwnedDate int           `json:"community_owned_date"`
	Score              int           `json:"score"`
	LockedDate         int           `json:"locked_date"`
	LastActivityDate   int           `json:"last_activity_date"`
	CreationDate       int           `json:"creation_date"`
	LastEditDate       int           `json:"last_edit_date"`
	QuestionID         int           `json:"question_id"`
	ContentLicense     string        `json:"content_license"`
	Link               string        `json:"link"`
	Title              string        `json:"title"`
}

type QuestionOwner added in v1.3.0

type QuestionOwner struct {
	AccountID    int    `json:"account_id"`
	Reputation   int    `json:"reputation"`
	UserID       int    `json:"user_id"`
	UserType     string `json:"user_type"`
	AcceptRate   int    `json:"accept_rate"`
	ProfileImage string `json:"profile_image"`
	DisplayName  string `json:"display_name"`
	Link         string `json:"link"`
}

type QuestionResponse added in v1.3.0

type QuestionResponse struct {
	Items          []QuestionItems `json:"items"`
	HasMore        bool            `json:"has_more"`
	QuotaMax       int             `json:"quota_max"`
	QuotaRemaining int             `json:"quota_remaining"`
}

type RelatedUris added in v1.4.0

type RelatedUris struct {
	TcgplayerInfiniteDecks    string `json:"tcgplayer_infinite_decks"`
	Edhrec                    string `json:"edhrec"`
	Gatherer                  string `json:"gatherer"`
	TcgplayerInfiniteArticles string `json:"tcgplayer_infinite_articles"`
}

type RelationshipsAttributes added in v1.4.0

type RelationshipsAttributes struct {
	Description string `json:"description"`
	Volume      string `json:"volume"`
	FileName    string `json:"fileName"`
	Locale      string `json:"locale"`
	CreatedAt   string `json:"createdAt"`
	UpdatedAt   string `json:"updatedAt"`
	Version     int    `json:"version"`
}

type RelationshipsEntity added in v1.4.0

type RelationshipsEntity struct {
	ID         string                   `json:"id"`
	Type       string                   `json:"type"`
	Attributes *RelationshipsAttributes `json:"attributes,omitempty"`
}

type SEResponse added in v1.4.0

type SEResponse struct {
	Data struct {
		Repository struct {
			Name  string `json:"name"`
			Owner struct {
				Login string `json:"login"`
			} `json:"owner"`
			Description     *string `json:"description"`
			PrimaryLanguage struct {
				Name *string `json:"name"`
			} `json:"primaryLanguage"`
		} `json:"repository"`
	} `json:"data"`
}

type ScryfallCardData added in v1.4.0

type ScryfallCardData struct {
	Rarity          string       `json:"rarity"`
	Artist          string       `json:"artist"`
	Frame           string       `json:"frame"`
	Power           string       `json:"power"`
	URI             string       `json:"uri"`
	ID              string       `json:"id"`
	TcgplayerID     int          `json:"tcgplayer_id"`
	Digital         bool         `json:"digital"`
	CMC             int          `json:"cmc"`
	PennyRank       int          `json:"penny_rank"`
	Preview         Preview      `json:"preview"`
	CollectorNumber string       `json:"collector_number"`
	Layout          string       `json:"layout"`
	SetID           string       `json:"set_id"`
	FullArt         bool         `json:"full_art"`
	Nonfoil         bool         `json:"nonfoil"`
	Textless        bool         `json:"textless"`
	BorderColor     string       `json:"border_color"`
	SetURI          string       `json:"set_uri"`
	Finishes        []string     `json:"finishes"`
	SetSearchURI    string       `json:"set_search_uri"`
	Legalities      Legalities   `json:"legalities"`
	IllustrationID  string       `json:"illustration_id"`
	Games           []string     `json:"games"`
	OracleID        string       `json:"oracle_id"`
	OracleText      string       `json:"oracle_text"`
	ImageStatus     string       `json:"image_status"`
	Reserved        bool         `json:"reserved"`
	MtgoID          int          `json:"mtgo_id"`
	ManaCost        string       `json:"mana_cost"`
	PrintsSearchURI string       `json:"prints_search_uri"`
	Colors          []string     `json:"colors"`
	Name            string       `json:"name"`
	CardmarketID    int          `json:"cardmarket_id"`
	RelatedUris     RelatedUris  `json:"related_uris"`
	CardBackID      string       `json:"card_back_id"`
	Oversized       bool         `json:"oversized"`
	ScryfallSetURI  string       `json:"scryfall_set_uri"`
	ColorIdentity   []string     `json:"color_identity"`
	TypeLine        string       `json:"type_line"`
	PurchaseUris    PurchaseUris `json:"purchase_uris"`
	Object          string       `json:"object"`
	ScryfallURI     string       `json:"scryfall_uri"`
	SetName         string       `json:"set_name"`
	EdhrecRank      int          `json:"edhrec_rank"`
	MultiverseIDs   []int        `json:"multiverse_ids"`
	Set             string       `json:"set"`
	Foil            bool         `json:"foil"`
	ReleasedAt      string       `json:"released_at"`
	RulingsURI      string       `json:"rulings_uri"`
	Toughness       string       `json:"toughness"`
	ImageUris       ImageUris    `json:"image_uris"`
	CardFaces       []CardFaces  `json:"card_faces"`
	Promo           bool         `json:"promo"`
	Booster         bool         `json:"booster"`
	StorySpotlight  bool         `json:"story_spotlight"`
	SetType         string       `json:"set_type"`
	Variation       bool         `json:"variation"`
	Keywords        []string     `json:"keywords"`
	ArtistIDs       []string     `json:"artist_ids"`
	FlavorText      string       `json:"flavor_text"`
	Prices          Prices       `json:"prices"`
	HighresImage    bool         `json:"highres_image"`
	Lang            string       `json:"lang"`
	Reprint         bool         `json:"reprint"`
}

type TVShow added in v1.4.0

type TVShow struct {
	Adult        bool   `json:"adult"`
	BackdropPath string `json:"backdrop_path"`
	CreatedBy    []struct {
		ID          int    `json:"id"`
		CreditID    string `json:"credit_id"`
		Name        string `json:"name"`
		Gender      int    `json:"gender"`
		ProfilePath string `json:"profile_path"`
	} `json:"created_by"`
	EpisodeRunTime []int  `json:"episode_run_time"`
	FirstAirDate   string `json:"first_air_date"`
	Genres         []struct {
		ID   int    `json:"id"`
		Name string `json:"name"`
	} `json:"genres"`
	Homepage         string   `json:"homepage"`
	ID               int      `json:"id"`
	InProduction     bool     `json:"in_production"`
	Languages        []string `json:"languages"`
	LastAirDate      string   `json:"last_air_date"`
	LastEpisodeToAir struct {
		ID             int     `json:"id"`
		Name           string  `json:"name"`
		Overview       string  `json:"overview"`
		VoteAverage    float64 `json:"vote_average"`
		VoteCount      int     `json:"vote_count"`
		AirDate        string  `json:"air_date"`
		EpisodeNumber  int     `json:"episode_number"`
		ProductionCode string  `json:"production_code"`
		Runtime        int     `json:"runtime"`
		SeasonNumber   int     `json:"season_number"`
		ShowID         int     `json:"show_id"`
		StillPath      string  `json:"still_path"`
	} `json:"last_episode_to_air"`
	Name     string `json:"name"`
	Networks []struct {
		ID            int    `json:"id"`
		LogoPath      string `json:"logo_path"`
		Name          string `json:"name"`
		OriginCountry string `json:"origin_country"`
	} `json:"networks"`
	NumberOfEpisodes    int      `json:"number_of_episodes"`
	NumberOfSeasons     int      `json:"number_of_seasons"`
	OriginCountry       []string `json:"origin_country"`
	OriginalLanguage    string   `json:"original_language"`
	OriginalName        string   `json:"original_name"`
	Overview            string   `json:"overview"`
	Popularity          float64  `json:"popularity"`
	PosterPath          string   `json:"poster_path"`
	ProductionCompanies []struct {
		ID            int    `json:"id"`
		LogoPath      string `json:"logo_path"`
		Name          string `json:"name"`
		OriginCountry string `json:"origin_country"`
	} `json:"production_companies"`
	ProductionCountries []struct {
		ISO31661 string `json:"iso_3166_1"`
		Name     string `json:"name"`
	} `json:"production_countries"`
	Seasons []struct {
		AirDate      string `json:"air_date"`
		EpisodeCount int    `json:"episode_count"`
		ID           int    `json:"id"`
		Name         string `json:"name"`
		Overview     string `json:"overview"`
		PosterPath   string `json:"poster_path"`
		SeasonNumber int    `json:"season_number"`
	} `json:"seasons"`
	SpokenLanguages []struct {
		EnglishName string `json:"english_name"`
		ISO6391     string `json:"iso_639_1"`
		Name        string `json:"name"`
	} `json:"spoken_languages"`
	Status      string  `json:"status"`
	Tagline     string  `json:"tagline"`
	Type        string  `json:"type"`
	VoteAverage float64 `json:"vote_average"`
	VoteCount   int     `json:"vote_count"`
}

type TagsAttributes added in v1.4.0

type TagsAttributes struct {
	Name        NameOrTitle `json:"name"`
	Description string      `json:"description,omitempty"`
	Group       string      `json:"group"`
	Version     int         `json:"version"`
}

type TagsEntity added in v1.4.0

type TagsEntity struct {
	ID            string         `json:"id"`
	Type          string         `json:"type"`
	Attributes    TagsAttributes `json:"attributes"`
	Relationships []interface{}  `json:"relationships,omitempty"`
}

type TypeData added in v1.4.0

type TypeData struct {
	// contains filtered or unexported fields
}

type YouTubeAPIEndpoint added in v1.4.0

type YouTubeAPIEndpoint struct {
	Endpoint string
	Link     string
}

type YouTubeResponse added in v1.4.0

type YouTubeResponse struct {
	Kind  string `json:"kind"`
	Etag  string `json:"etag"`
	Items []struct {
		Kind    string `json:"kind"`
		Etag    string `json:"etag"`
		ID      string `json:"id"`
		Snippet struct {
			PublishedAt string `json:"publishedAt"`
			ChannelID   string `json:"channelId"`
			Title       string `json:"title"`
			Description string `json:"description"`
			Thumbnails  struct {
				Default struct {
					URL    string `json:"url"`
					Width  int    `json:"width"`
					Height int    `json:"height"`
				} `json:"default"`
				Medium struct {
					URL    string `json:"url"`
					Width  int    `json:"width"`
					Height int    `json:"height"`
				} `json:"medium"`
				High struct {
					URL    string `json:"url"`
					Width  int    `json:"width"`
					Height int    `json:"height"`
				} `json:"high"`
				Standard struct {
					URL    string `json:"url"`
					Width  int    `json:"width"`
					Height int    `json:"height"`
				} `json:"standard"`
				Maxres struct {
					URL    string `json:"url"`
					Width  int    `json:"width"`
					Height int    `json:"height"`
				} `json:"maxres"`
			} `json:"thumbnails"`
			ChannelTitle         string   `json:"channelTitle"`
			Tags                 []string `json:"tags"`
			CategoryID           string   `json:"categoryId"`
			LiveBroadcastContent string   `json:"liveBroadcastContent"`
			DefaultLanguage      string   `json:"defaultLanguage"`
			Localized            struct {
				Title       string `json:"title"`
				Description string `json:"description"`
			} `json:"localized"`
			DefaultAudioLanguage string `json:"defaultAudioLanguage"`
		} `json:"snippet"`
	} `json:"items"`
	PageInfo struct {
		TotalResults   int `json:"totalResults"`
		ResultsPerPage int `json:"resultsPerPage"`
	} `json:"pageInfo"`
}

Jump to

Keyboard shortcuts

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