models

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

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

Go to latest
Published: Jun 28, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShowsSet

func ShowsSet(s []Show)

ShowsSet set shows

Types

type Episode

type Episode struct {
	ID   string `json:"id" groups:"api"`
	Name string `json:"name" groups:"api"`
	//SvtID           string    `json:"svtId" groups:"api"`
	//VideoSvtID      string    `json:"videoSvtId" groups:"api"`
	Slug             string      `json:"slug" groups:"api"`
	LongDescription  string      `json:"longDescription" groups:"api"`
	ImageURL         string      `json:"imageUrl" groups:"api"`
	URL              string      `json:"url" groups:"api"`
	Duration         float64     `json:"duration" groups:"api`
	Number           string      `json:"number" groups:"api"`
	ValidFrom        string      `json:"validFrom" groups:"api"`
	ValidTo          string      `json:"validTo" groups:"api"`
	Variants         []Variant   `json:"variants" groups:"api"`
	PlatformSpecific interface{} `json:"platform_specific" groups:"api"`
}

Episode is

type PlatformSpecific

type PlatformSpecific map[string]interface{}

PlatformSpecific interface

type QueryItem

type QueryItem struct {
	Field string      `json:"field"`
	Value interface{} `json:"value"`
}

QueryItem ...

type Season

type Season struct {
	ID       string    `json:"id" groups:"api,seasons"`
	Name     string    `json:"name" groups:"api,seasons"`
	Episodes []Episode `json:"episodes" groups:"api,seasons"`
}

Season handles season info

type Show

type Show struct {
	ID          string   `json:"-" groups:"api" example:"1"`
	Name        string   `json:"name" groups:"api" example:"Show Name"`
	Slug        string   `json:"slug" groups:"api" example:"show_name"`
	APIURL      string   `json:"api_url" groups:"api" example:"http://adad.ad/se"`
	PageURL     string   `json:"page_url" groups:"api" example:"http://adad.ad/se"`
	Seasons     []Season `json:"seasons" groups:"seasons"`
	ImageURL    string   `json:"imageUrl" groups:"api" example:"http://adad.ad/se"`
	Description string   `json:"decription" groups:"api" example:"Show about x"`
	UpdatedAt   string   `json:"updatedAt" groups:"api" example:"2019-12-22"`
	Genre       string   `json:"genre" groups:"api" example:"2019-12-22"`
	Prossesed   bool     `json:"-"`
	Provider    string   `json:"service" groups:"api"`
}

Show handles show information

func ShowsAll

func ShowsAll(queryItems ...QueryItem) ([]Show, error)

ShowsAll return shows with query

type Variant

type Variant struct {
	ID               string      `json:"-" groups:"api`
	URL              string      `json:"url" groups:"api`
	PlatformSpecific interface{} `json:"platform_specific" groups:"api"`
}

Variant is

Jump to

Keyboard shortcuts

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