Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { }
Controller struct
func (*Controller) ListEpisodes ¶
func (c *Controller) ListEpisodes(ctx *gin.Context)
ListEpisodes function returns the latest episodes from API @Summary List all episodes @Description get episodes @Tags episodes @Accept json @Produce json @Param prettyPrint query string false "pretty print show" Format(bool) @Success 200 {array} models.Episode @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /episodes [get]
func (*Controller) ListLatestEpisodes ¶ added in v1.0.7
func (c *Controller) ListLatestEpisodes(ctx *gin.Context)
ListLatestEpisodes function returns the latest episodes from API @Summary List latest episodes @Description get episodes @Tags episodes @Accept json @Produce json @Param prettyPrint query string false "pretty print show" Format(bool) @Success 200 {array} models.Episode @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /episodes/latest [get]
func (*Controller) ListShows ¶
func (c *Controller) ListShows(ctx *gin.Context)
ListShows function to return shows from API @Summary List shows @Description get shows @Tags shows @Accept json @Produce json @Param prettyPrint query string false "pretty print show" Format(bool) @Param showSeasons query string false "show seasons" Format(bool) @Success 200 {array} models.Show @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /shows [get]
func (*Controller) Ping ¶
func (c *Controller) Ping(ctx *gin.Context)
Ping return pong @Summary ping common @Description do ping @Tags common @Accept json @Produce json @Success 200 {string} string "pong" @Failure 400 {string} string "ok" @Failure 404 {string} string "ok" @Failure 500 {string} string "ok" @Router /ping [get]
func (*Controller) ShowShow ¶
func (c *Controller) ShowShow(ctx *gin.Context)
ShowShow func to retrun a specific show @Summary Show an show @Description get show by slug @Tags shows @Accept json @Produce json @Param slug path string true "Show ID" @Param prettyPrint query string false "pretty print show" Format(bool) @Success 200 {object} models.Show @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /shows/{slug} [get]
type ErrorResponse ¶
type ErrorResponse struct { Message string `json:"message" groups:"api" example:"status bad request"` Code int `json:"code" groups:"api" example:"400"` MoreInfo string `json:"more_info" groups:"api" example:"http://"` }
ErrorResponse used to descrive api error response
type PagedResponse ¶
type PagedResponse struct { //Links PagedResponseLinks `json:"_links" groups:"api"` Limit int `json:"limit" groups:"api"` Size int `json:"size" groups:"api"` Start int `json:"start" groups:"api"` Results interface{} `json:"results" groups:"api"` }
PagedResponse used to describe api response