Documentation
¶
Overview ¶
Package releases handles collections of Demozoo Productions that share a common filter such as a platform or category type.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNegativeID = errors.New("demozoo production id cannot be a negative integer")
Functions ¶
func Site ¶
Site parses a production title to see if it is suitable as a BBS or FTP site name, otherwise an empty string is returned.
func URLReleasers ¶ added in v1.7.0
URL generates an API v1 URL used to fetch the productions of a releaser ID. i.e. https://demozoo.org/api/v1/releasers/1/productions/
Types ¶
type Filter ¶ added in v1.7.0
type Filter uint
Filter the Production List using API fields.
func (Filter) URL ¶ added in v1.7.0
URL generates an API v1 URL used to fetch the productions filtered by a productions id. i.e. https://demozoo.org/api/v1/productions/?supertype=production&title=&platform=4
type ProductionV1 ¶
type ProductionV1 struct {
ExistsInDB bool
// URL string `json:"url"`
// DemozooURL string `json:"demozoo_url"`
ID int `json:"id"`
Title string `json:"title"`
AuthorNicks []struct {
Name string `json:"name"`
Abbreviation string `json:"abbreviation"`
Releaser struct {
URL string `json:"url"`
ID int `json:"id"`
Name string `json:"name"`
IsGroup bool `json:"is_group"`
} `json:"releaser"`
} `json:"author_nicks"`
// AuthorAffiliationNicks []interface{} `json:"author_affiliation_nicks"`
ReleaseDate string `json:"release_date"`
// Supertype string `json:"supertype"`
Platforms []struct {
URL string `json:"url"`
ID int `json:"id"`
Name string `json:"name"`
} `json:"platforms"`
Types []Type `json:"types"`
// Types []struct {
// URL string `json:"url"`
// ID int `json:"id"`
// Name string `json:"name"`
// } `json:"types"`
Tags []string `json:"tags"`
}
Productions releasers productions API v1. This can be dynamically generated at https://mholt.github.io/json-to-go/ Get the Demozoo JSON output from https://demozoo.org/api/v1/releasers/{{.ID}}/productions?format=json
func (ProductionV1) Groups ¶
func (p ProductionV1) Groups() (string, string)
Groups returns the first two names in the production that have is_group as true. The one exception is if the production title contains a reference to a BBS or FTP site name. Then that title will be used as the first group returned.
type Productions ¶
type Productions []ProductionV1