Documentation
¶
Index ¶
- func MakeAndUnmarshal(suggesterContext core.SuggesterContext, spec *core.SuggesterSpec) (*recommendations.Recommender, error)
- func MoreHandler(c *gin.Context)
- func RecommendHandler(c *gin.Context)
- func SetupRoutes(router *gin.Engine)
- func ViewsHandler(c *gin.Context)
- type Collection
- type ContentUnit
- type File
- type HttpError
- type Item
- type ItemInterface
- type ItemsRequest
- type ItemsResponse
- type MoreResponse
- type ViewsRequest
- type ViewsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeAndUnmarshal ¶
func MakeAndUnmarshal(suggesterContext core.SuggesterContext, spec *core.SuggesterSpec) (*recommendations.Recommender, error)
func MoreHandler ¶
func SetupRoutes ¶
func ViewsHandler ¶
Types ¶
type Collection ¶
type Collection struct {
Item
City string `json:"city,omitempty"`
ContentUnits []*ContentUnit `json:"content_units,omitempty"`
Country string `json:"country,omitempty"`
DefaultLanguage string `json:"default_language,omitempty"`
EndDate *utils.Date `json:"end_date,omitempty"`
FullAddress string `json:"full_address,omitempty"`
Genres []string `json:"genres,omitempty"`
HolidayID string `json:"holiday_id,omitempty"`
Number int `json:"number,omitempty"`
SourceID string `json:"source_id,omitempty"`
StartDate *utils.Date `json:"start_date,omitempty"`
}
type ContentUnit ¶
type ContentUnit struct {
Item
Collections map[string]*Collection `json:"collections,omitempty"`
DerivedUnits map[string]*ContentUnit `json:"derived_units,omitempty"`
Duration float64 `json:"duration,omitempty"`
Files []*File `json:"files,omitempty"`
NameInCollection string `json:"name_in_collection,omitempty"`
OriginalLanguage string `json:"original_language,omitempty"`
Publishers []string `json:"publishers,omitempty"`
SourceUnits map[string]*ContentUnit `json:"source_units,omitempty"`
Sources []string `json:"sources,omitempty"`
Tags []string `json:"tags,omitempty"`
// contains filtered or unexported fields
}
type File ¶
type File struct {
ID string `json:"id"`
Name string `json:"name"`
Size int64 `json:"size"`
Duration float64 `json:"duration,omitempty"`
Language string `json:"language,omitempty"`
MimeType string `json:"mimetype,omitempty"`
Type string `json:"type,omitempty"`
SubType string `json:"subtype,omitempty"`
VideoSize string `json:"video_size,omitempty"`
CreatedAt time.Time `json:"-"`
}
type HttpError ¶
func NewBadRequestError ¶
func NewInternalError ¶
func NewNotFoundError ¶
func NewNotFoundError() *HttpError
type ItemInterface ¶
type ItemInterface interface {
}
type ItemsRequest ¶
type ItemsRequest struct {
Offset int `json:"offset,omitempty" form:"offset" binding:"omitempty,min=0"`
}
type ItemsResponse ¶
type ItemsResponse struct {
Total int64 `json:"total"`
Items []interface{} `json:"items"`
}
type MoreResponse ¶
type MoreResponse struct {
Feed []core.ContentItem `json:"feed"`
Feeds [][]core.ContentItem `json:"feeds"`
}
More
type ViewsRequest ¶
type ViewsRequest struct {
Uids []string `json:"uids,omitempty" form:"uids,omitempty"`
}
Views
type ViewsResponse ¶
type ViewsResponse struct {
Views []int64 `json:"views,omitempty" form:"views,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.