cmoresearch

package module
v0.0.0-...-1b15734 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: MIT Imports: 12 Imported by: 0

README

cmoresearch-go

Build Status Go Report Card GoDoc License MIT

cmoresearch-go is a Go client for C More's search service.

Usage

package main

import (
	"context"
	"fmt"
	"log"
	"net/url"
	"os"

	cmoresearch "github.com/TV4/cmoresearch-go"
)

func main() {
	client := cmoresearch.NewClient(
		cmoresearch.SetDebugLogf(log.New(os.Stderr, "", 0).Printf),
	)

	query := url.Values{
		"site":        {"cmore.se"},
		"video_ids":   {"2222333,2222334"},
	}

	res, err := client.Search(context.Background(), query)
	if err != nil {
		fmt.Printf("error: %v\n", err)
		return
	}

	fmt.Printf("%d hits\n", res.TotalHits)

	for _, hit := range res.Hits {
		switch h := hit.(type) {
		case *cmoresearch.Asset:
			fmt.Printf("Asset %s\n", h.VideoID)
		case *cmoresearch.Series:
			fmt.Printf("Series %s\n", h.BrandID)
		}
	}
}
GET https://cmore-search.b17g.services/search?site=cmore.se&video_ids=2222333%2C2222334
2 hits
Asset 2222334
Asset 2222333

API Documentation

https://cmore-search.b17g.services/docs/

License

Copyright (c) 2017-2019 TV4

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Documentation

Overview

Package cmoresearch implements a client for C More's search service.

API Documentation

https://cmore-search.b17g.services/docs/

Usage

A small usage example:

package main

import (
	"context"
	"fmt"
	"net/url"

	cmoresearch "github.com/TV4/cmoresearch-go"
)

func main() {
	client := cmoresearch.NewClient()

	res, err := client.Search(
		context.Background(),
		url.Values{
			"device_type": {"tve_web"},
			"lang":        {"sv"},
			"site":        {"cmore.se"},

			"brand_id":  {"34515"},
			"season":    {"1"},
			"sort_by":   {"episode_number"},
			"order":     {"asc"},
			"page_size": {"3"},
		},
	)

	if err != nil {
		fmt.Println(err)
		return
	}

	for _, hit := range res.Hits {
		if a, ok := hit.(*cmoresearch.Asset); ok {
			fmt.Printf("%s S%02dE%02d\n", a.Brand.TitleSv, a.Season.Number, a.EpisodeNumber)
		}
	}
}

Output:

Solsidan S01E01
Solsidan S01E02
Solsidan S01E03

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrTypeMissing is returned when a search hit has an empty type field
	ErrTypeMissing = errors.New("type missing")

	// ErrContentTypeNotJSON is returned if a response does not have Content-Type application/json
	ErrContentTypeNotJSON = errors.New("Content-Type not JSON")

	// ErrInvalidBaseURL is returned if the client has been configured with an invalid base URL
	ErrInvalidBaseURL = errors.New("invalid base URL")
)

Functions

func SetAppName

func SetAppName(appName string) func(*Client)

SetAppName is an option to set the value used in the client parameter sent to cmore-search.

func SetBaseURL

func SetBaseURL(rawurl string) func(*Client)

SetBaseURL is an option to set a custom URL to the search service when creating a new Search instance.

func SetDebugLogf

func SetDebugLogf(logf func(format string, v ...interface{})) func(*Client)

SetDebugLogf is an option to set a debug logger when creating a new client. If set the client will log requests using this logger, for debug uses.

func SetHTTPClient

func SetHTTPClient(hc *http.Client) func(*Client)

SetHTTPClient is an option to set a custom HTTP client when creating a new Search instance.

func SetRequestID

func SetRequestID(requestID string) func(*http.Request)

SetRequestID is an option for Search to set the X-Request-Id header on the search request.

Types

type APIError

type APIError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

APIError holds an error as received from the search service.

func (*APIError) Error

func (e *APIError) Error() string

type Asset

type Asset struct {
	Arena                 string              `json:"arena"`
	AwayTeam              Team                `json:"awayteam"`
	Brand                 Brand               `json:"brand"`
	Cinemascope           Image               `json:"cinemascope"`
	ContentAPIID          string              `json:"content_api_id"`
	ContentAPISeasonID    string              `json:"content_api_season_id"`
	ContentAPISeriesID    string              `json:"content_api_series_id"`
	ContentSource         string              `json:"content_source"`
	Country               []string            `json:"country"`
	Credits               []Credit            `json:"credits"`
	DRMRestrictions       bool                `json:"drm_restrictions"`
	DescriptionExtendedDa string              `json:"description_extended_da"`
	DescriptionExtendedFi string              `json:"description_extended_fi"`
	DescriptionExtendedNb string              `json:"description_extended_nb"`
	DescriptionExtendedSv string              `json:"description_extended_sv"`
	DescriptionLongDa     string              `json:"description_long_da"`
	DescriptionLongFi     string              `json:"description_long_fi"`
	DescriptionLongNb     string              `json:"description_long_nb"`
	DescriptionLongSv     string              `json:"description_long_sv"`
	DescriptionMediumDa   string              `json:"description_medium_da"`
	DescriptionMediumFi   string              `json:"description_medium_fi"`
	DescriptionMediumNb   string              `json:"description_medium_nb"`
	DescriptionMediumSv   string              `json:"description_medium_sv"`
	DescriptionShortDa    string              `json:"description_short_da"`
	DescriptionShortFi    string              `json:"description_short_fi"`
	DescriptionShortNb    string              `json:"description_short_nb"`
	DescriptionShortSv    string              `json:"description_short_sv"`
	DescriptionTinyDa     string              `json:"description_tiny_da"`
	DescriptionTinyFi     string              `json:"description_tiny_fi"`
	DescriptionTinyNb     string              `json:"description_tiny_nb"`
	DescriptionTinySv     string              `json:"description_tiny_sv"`
	Duration              int                 `json:"duration"`
	EpisodeNumber         int                 `json:"episode_number"`
	Events                []Event             `json:"events"`
	ExternalReferences    []ExternalReference `json:"external_references"`
	FifteenBySeven        Image               `json:"fifteen_by_seven"`
	FourByThree           Image               `json:"four_by_three"`
	GenreDescriptionDa    string              `json:"genre_description_da"`
	GenreDescriptionFi    string              `json:"genre_description_fi"`
	GenreDescriptionNb    string              `json:"genre_description_nb"`
	GenreDescriptionSv    string              `json:"genre_description_sv"`
	Genres                []Genre             `json:"genres"`
	HomeTeam              Team                `json:"hometeam"`
	ItemsPublished        bool                `json:"items_published"`
	KeywordsDa            []Keyword           `json:"keywords_da"`
	KeywordsFi            []Keyword           `json:"keywords_fi"`
	KeywordsNb            []Keyword           `json:"keywords_nb"`
	KeywordsSv            []Keyword           `json:"keywords_sv"`
	Landscape             Image               `json:"landscape"`
	League                string              `json:"league"`
	LeagueDa              string              `json:"league_da"`
	LeagueFi              string              `json:"league_fi"`
	LeagueNb              string              `json:"league_nb"`
	LeagueSv              string              `json:"league_sv"`
	Live                  bool                `json:"live"`
	LiveEventEnd          time.Time           `json:"live_event_end"`
	LogoAwayTeam          Image               `json:"logoawayteam"`
	LogoHomeTeam          Image               `json:"logohometeam"`
	MLTNIDs               []string            `json:"mlt_nids"`
	OriginalTitle         OriginalTitle       `json:"original_title"`
	ParentVideoID         string              `json:"parent_video_id"`
	ParentalRatings       []ParentalRating    `json:"parental_ratings"`
	Poster                Image               `json:"poster"`
	ProductionYear        string              `json:"production_year"`
	PublicationRights     PublicationRights   `json:"publication_rights"`
	Season                Season              `json:"season"`
	SpokenLanguages       []string            `json:"spoken_languages"`
	Studio                string              `json:"studio"`
	Tags                  Tags                `json:"tags"`
	Timestamp             string              `json:"timestamp"`
	TitleDa               string              `json:"title_da"`
	TitleFi               string              `json:"title_fi"`
	TitleNb               string              `json:"title_nb"`
	TitleSv               string              `json:"title_sv"`
	Type                  string              `json:"type"`
	VMANID                string              `json:"vman_id"`
	VideoID               string              `json:"video_id"`
	// contains filtered or unexported fields
}

Asset is an asset hit returned by the search service.

func (*Asset) Subset

func (a *Asset) Subset() *HitSubset

Subset returns the HitSubset for an *Asset

type Brand

type Brand struct {
	Cinemascope           Image               `json:"cinemascope"`
	Country               []string            `json:"country"`
	DescriptionExtendedDa string              `json:"description_extended_da"`
	DescriptionExtendedFi string              `json:"description_extended_fi"`
	DescriptionExtendedNb string              `json:"description_extended_nb"`
	DescriptionExtendedSv string              `json:"description_extended_sv"`
	DescriptionLongDa     string              `json:"description_long_da"`
	DescriptionLongFi     string              `json:"description_long_fi"`
	DescriptionLongNb     string              `json:"description_long_nb"`
	DescriptionLongSv     string              `json:"description_long_sv"`
	DescriptionMediumDa   string              `json:"description_medium_da"`
	DescriptionMediumFi   string              `json:"description_medium_fi"`
	DescriptionMediumNb   string              `json:"description_medium_nb"`
	DescriptionMediumSv   string              `json:"description_medium_sv"`
	DescriptionShortDa    string              `json:"description_short_da"`
	DescriptionShortFi    string              `json:"description_short_fi"`
	DescriptionShortNb    string              `json:"description_short_nb"`
	DescriptionShortSv    string              `json:"description_short_sv"`
	DescriptionTinyDa     string              `json:"description_tiny_da"`
	DescriptionTinyFi     string              `json:"description_tiny_fi"`
	DescriptionTinyNb     string              `json:"description_tiny_nb"`
	DescriptionTinySv     string              `json:"description_tiny_sv"`
	ExternalReferences    []ExternalReference `json:"external_references"`
	FifteenBySeven        Image               `json:"fifteen_by_seven"`
	FourByThree           Image               `json:"four_by_three"`
	GenreDescriptionDa    string              `json:"genre_description_da"`
	GenreDescriptionFi    string              `json:"genre_description_fi"`
	GenreDescriptionNb    string              `json:"genre_description_nb"`
	GenreDescriptionSv    string              `json:"genre_description_sv"`
	Genres                []Genre             `json:"genres"`
	ID                    string              `json:"id"`
	Landscape             Image               `json:"landscape"`
	Poster                Image               `json:"poster"`
	Studio                string              `json:"studio"`
	TitleDa               string              `json:"title_da"`
	TitleFi               string              `json:"title_fi"`
	TitleNb               string              `json:"title_nb"`
	TitleSv               string              `json:"title_sv"`
}

Brand is the brand of an asset, e.g. Idol or Harry Potter.

type Client

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

Client is a client for the search service.

func NewClient

func NewClient(options ...func(*Client)) *Client

NewClient returns a new search client.

func (*Client) Search

func (c *Client) Search(ctx context.Context, query url.Values, options ...func(r *http.Request)) (Response, error)

Search performs a search and returns the response. An error is returned if there is an error while setting up or sending the request, but also if the response status is not HTTP 200 OK or the response content is not JSON.

type Credit

type Credit struct {
	Function string `json:"function"`
	NID      string `json:"nid"`
	Name     string `json:"name"`
	Rolename string `json:"rolename"`
}

Credit represents one entry in the credit list for an asset.

type Event

type Event struct {
	Site              string    `json:"site"`
	DeviceTypes       []string  `json:"device_types"`
	ProductGroups     []string  `json:"product_groups"`
	Products          []string  `json:"products"`
	StartTime         time.Time `json:"start_time"`
	EndTime           time.Time `json:"end_time"`
	PublishTime       time.Time `json:"publish_time"`
	LivePublished     bool      `json:"live_published"`
	OnDemandPublished bool      `json:"on_demand_published"`
}

Event contains publication rights for an asset.

type ExternalReference

type ExternalReference struct {
	Locator string `json:"locator"`
	Type    string `json:"type"`
	Value   string `json:"value"`
}

ExternalReference is a reference to additional information contained in a different system.

type Genre

type Genre struct {
	Main string   `json:"main"`
	Sub  []string `json:"sub"`
}

Genre is the main and sub genre inforamtion for an asset, e.g. Main: Horror, Sub [Action, Drama, Romance]

type Hit

type Hit interface {
	Subset() *HitSubset
}

Hit is a search hit. It holds e.g. Asset or Series.

type HitSubset

type HitSubset struct {
	ID                    string              `json:"id"`
	Type                  string              `json:"type"`
	Cinemascope           Image               `json:"cinemascope"`
	ContentSource         string              `json:"content_source"`
	Country               []string            `json:"country"`
	Credits               []Credit            `json:"credits"`
	DescriptionExtendedDa string              `json:"description_extended_da"`
	DescriptionExtendedFi string              `json:"description_extended_fi"`
	DescriptionExtendedNb string              `json:"description_extended_nb"`
	DescriptionExtendedSv string              `json:"description_extended_sv"`
	DescriptionLongDa     string              `json:"description_long_da"`
	DescriptionLongFi     string              `json:"description_long_fi"`
	DescriptionLongNb     string              `json:"description_long_nb"`
	DescriptionLongSv     string              `json:"description_long_sv"`
	DescriptionMediumDa   string              `json:"description_medium_da"`
	DescriptionMediumFi   string              `json:"description_medium_fi"`
	DescriptionMediumNb   string              `json:"description_medium_nb"`
	DescriptionMediumSv   string              `json:"description_medium_sv"`
	DescriptionShortDa    string              `json:"description_short_da"`
	DescriptionShortFi    string              `json:"description_short_fi"`
	DescriptionShortNb    string              `json:"description_short_nb"`
	DescriptionShortSv    string              `json:"description_short_sv"`
	DescriptionTinyDa     string              `json:"description_tiny_da"`
	DescriptionTinyFi     string              `json:"description_tiny_fi"`
	DescriptionTinyNb     string              `json:"description_tiny_nb"`
	DescriptionTinySv     string              `json:"description_tiny_sv"`
	Events                []Event             `json:"events"`
	ExternalReferences    []ExternalReference `json:"external_references"`
	FifteenBySeven        Image               `json:"fifteen_by_seven"`
	FourByThree           Image               `json:"four_by_three"`
	GenreDescriptionDa    string              `json:"genre_description_da"`
	GenreDescriptionFi    string              `json:"genre_description_fi"`
	GenreDescriptionNb    string              `json:"genre_description_nb"`
	GenreDescriptionSv    string              `json:"genre_description_sv"`
	Genres                []Genre             `json:"genres"`
	KeywordsDa            []Keyword           `json:"keywords_da"`
	KeywordsFi            []Keyword           `json:"keywords_fi"`
	KeywordsNb            []Keyword           `json:"keywords_nb"`
	KeywordsSv            []Keyword           `json:"keywords_sv"`
	Landscape             Image               `json:"landscape"`
	Poster                Image               `json:"poster"`
	SpokenLanguages       []string            `json:"spoken_languages"`
	Studio                string              `json:"studio"`
	Tags                  Tags                `json:"tags"`
	Timestamp             string              `json:"timestamp"`
	TitleDa               string              `json:"title_da"`
	TitleFi               string              `json:"title_fi"`
	TitleNb               string              `json:"title_nb"`
	TitleSv               string              `json:"title_sv"`
}

HitSubset contains the subset of fields in common between different hit types (*Series and *Asset for now)

type Image

type Image struct {
	Caption       string           `json:"caption"`
	Copyright     string           `json:"copyright"`
	Localizations []LocalizedImage `json:"localizations"`
	URL           string           `json:"url"`
}

Image is the image attribute for an asset. It may contain localizations.

type Keyword

type Keyword struct {
	NID  string `json:"nid"`
	Text string `json:"text"`
}

Keyword holds a URL-friendly ID and a human-friendly text for a keyword.

type LocalizedImage

type LocalizedImage struct {
	Caption   string `json:"caption"`
	Copyright string `json:"copyright"`
	Language  string `json:"language"`
	URL       string `json:"url"`
}

LocalizedImage is a localized image.

type LocationRestrictions

type LocationRestrictions struct {
	IncludeCountries []string `json:"include_countries"`
}

LocationRestrictions contains restrictions by location.

type LocationRights

type LocationRights struct {
	LocationRestrictions LocationRestrictions `json:"location_restrictions"`
	Product              string               `json:"product"`
}

LocationRights contains rights based on location.

type Meta

type Meta struct {
	StatusCode int
	Header     http.Header
	RequestURL *url.URL
}

Meta contains request/response meta information

type OriginalTitle

type OriginalTitle struct {
	Language string `json:"language"`
	Text     string `json:"text"`
	Type     string `json:"type"`
}

OriginalTitle is the title of an asset in the original language.

type ParentalRating

type ParentalRating struct {
	Country string `json:"country"`
	System  string `json:"system"`
	Value   string `json:"value"`
}

ParentalRating is a parental rating of an asset for a given country and rating system.

type PublicationRights

type PublicationRights struct {
	LocationRights LocationRights `json:"location_rights"`
}

PublicationRights contain location rights for an asset.

type Response

type Response struct {
	TotalHits int
	Hits      []Hit
	Meta      Meta
}

Response represents the result as received from the search service.

type Season

type Season struct {
	BroadcastingInfoDa    string              `json:"broadcasting_info_da"`
	BroadcastingInfoNb    string              `json:"broadcasting_info_nb"`
	BroadcastingInfoSv    string              `json:"broadcasting_info_sv"`
	Cinemascope           Image               `json:"cinemascope"`
	Country               []string            `json:"country"`
	DescriptionExtendedDa string              `json:"description_extended_da"`
	DescriptionExtendedFi string              `json:"description_extended_fi"`
	DescriptionExtendedNb string              `json:"description_extended_nb"`
	DescriptionExtendedSv string              `json:"description_extended_sv"`
	DescriptionLongDa     string              `json:"description_long_da"`
	DescriptionLongFi     string              `json:"description_long_fi"`
	DescriptionLongNb     string              `json:"description_long_nb"`
	DescriptionLongSv     string              `json:"description_long_sv"`
	DescriptionMediumDa   string              `json:"description_medium_da"`
	DescriptionMediumFi   string              `json:"description_medium_fi"`
	DescriptionMediumNb   string              `json:"description_medium_nb"`
	DescriptionMediumSv   string              `json:"description_medium_sv"`
	DescriptionShortDa    string              `json:"description_short_da"`
	DescriptionShortFi    string              `json:"description_short_fi"`
	DescriptionShortNb    string              `json:"description_short_nb"`
	DescriptionShortSv    string              `json:"description_short_sv"`
	DescriptionTinyDa     string              `json:"description_tiny_da"`
	DescriptionTinyFi     string              `json:"description_tiny_fi"`
	DescriptionTinyNb     string              `json:"description_tiny_nb"`
	DescriptionTinySv     string              `json:"description_tiny_sv"`
	ExternalReferences    []ExternalReference `json:"external_references"`
	FifteenBySeven        Image               `json:"fifteen_by_seven"`
	FourByThree           Image               `json:"four_by_three"`
	GenreDescriptionDa    string              `json:"genre_description_da"`
	GenreDescriptionFi    string              `json:"genre_description_fi"`
	GenreDescriptionNb    string              `json:"genre_description_nb"`
	GenreDescriptionSv    string              `json:"genre_description_sv"`
	Genres                []Genre             `json:"genres"`
	ID                    string              `json:"id"`
	Landscape             Image               `json:"landscape"`
	Number                int                 `json:"season_number"`
	NumberOfEpisodes      int                 `json:"number_of_episodes"`
	Poster                Image               `json:"poster"`
	Studio                string              `json:"studio"`
	TitleDa               string              `json:"title_da"`
	TitleFi               string              `json:"title_fi"`
	TitleNb               string              `json:"title_nb"`
	TitleSv               string              `json:"title_sv"`
}

Season is a season of an asset, e.g. "Idol season 2".

type Series

type Series struct {
	BrandID               string              `json:"brand_id"`
	Cinemascope           Image               `json:"cinemascope"`
	ContentSource         string              `json:"content_source"`
	ContentAPISeriesID    string              `json:"content_api_series_id"`
	Country               []string            `json:"country"`
	Credits               []Credit            `json:"credits"`
	DescriptionExtendedDa string              `json:"description_extended_da"`
	DescriptionExtendedFi string              `json:"description_extended_fi"`
	DescriptionExtendedNb string              `json:"description_extended_nb"`
	DescriptionExtendedSv string              `json:"description_extended_sv"`
	DescriptionLongDa     string              `json:"description_long_da"`
	DescriptionLongFi     string              `json:"description_long_fi"`
	DescriptionLongNb     string              `json:"description_long_nb"`
	DescriptionLongSv     string              `json:"description_long_sv"`
	DescriptionMediumDa   string              `json:"description_medium_da"`
	DescriptionMediumFi   string              `json:"description_medium_fi"`
	DescriptionMediumNb   string              `json:"description_medium_nb"`
	DescriptionMediumSv   string              `json:"description_medium_sv"`
	DescriptionShortDa    string              `json:"description_short_da"`
	DescriptionShortFi    string              `json:"description_short_fi"`
	DescriptionShortNb    string              `json:"description_short_nb"`
	DescriptionShortSv    string              `json:"description_short_sv"`
	DescriptionTinyDa     string              `json:"description_tiny_da"`
	DescriptionTinyFi     string              `json:"description_tiny_fi"`
	DescriptionTinyNb     string              `json:"description_tiny_nb"`
	DescriptionTinySv     string              `json:"description_tiny_sv"`
	Events                []Event             `json:"events"`
	ExternalReferences    []ExternalReference `json:"external_references"`
	FifteenBySeven        Image               `json:"fifteen_by_seven"`
	FourByThree           Image               `json:"four_by_three"`
	GenreDescriptionDa    string              `json:"genre_description_da"`
	GenreDescriptionFi    string              `json:"genre_description_fi"`
	GenreDescriptionNb    string              `json:"genre_description_nb"`
	GenreDescriptionSv    string              `json:"genre_description_sv"`
	Genres                []Genre             `json:"genres"`
	ID                    string              `json:"id"`
	KeywordsDa            []Keyword           `json:"keywords_da"`
	KeywordsFi            []Keyword           `json:"keywords_fi"`
	KeywordsNb            []Keyword           `json:"keywords_nb"`
	KeywordsSv            []Keyword           `json:"keywords_sv"`
	Landscape             Image               `json:"landscape"`
	ParentalRatings       []ParentalRating    `json:"parental_ratings"`
	Poster                Image               `json:"poster"`
	Scripted              bool                `json:"scripted"`
	Seasons               []int               `json:"seasons"`
	SeasonsDk             []int               `json:"seasons_cmore_dk"`
	SeasonsFi             []int               `json:"seasons_cmore_fi"`
	SeasonsNo             []int               `json:"seasons_cmore_no"`
	SeasonsSe             []int               `json:"seasons_cmore_se"`
	SpokenLanguages       []string            `json:"spoken_languages"`
	Studio                string              `json:"studio"`
	Tags                  Tags                `json:"tags"`
	Timestamp             string              `json:"timestamp"`
	TitleDa               string              `json:"title_da"`
	TitleFi               string              `json:"title_fi"`
	TitleNb               string              `json:"title_nb"`
	TitleSv               string              `json:"title_sv"`
	Type                  string              `json:"type"`
	// contains filtered or unexported fields
}

Series is an series hit returned by the search service.

func (*Series) Subset

func (s *Series) Subset() *HitSubset

Subset returns the HitSubset for a *Series

type Tags

type Tags map[string][]string

Tags bind otherwise unrelated assets.

type Team

type Team struct {
	Name string `json:"name"`
	NID  string `json:"nid"`
}

Team represents e.g. home team for a sports asset.

Jump to

Keyboard shortcuts

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