filter

package
v1.11.13 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package filter confirms a Demozoo Production is suitable for Defacto2. A MS-DOS intro would be okay, while a demo for the Atari 2600 would be rejected.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter(db *sql.DB, w io.Writer, prods []releases.ProductionV1) ([]releases.ProductionV1, error)

Filter removes any productions that are not suitable for Defacto2.

func Next

func Next(link string) ([]releases.ProductionV1, string, error)

Next gets all the next page of productions.

Types

type ProductionList

type ProductionList struct {
	Count    int                     `json:"count"`    // Count the total productions.
	Next     string                  `json:"next"`     // Next page URL.
	Previous interface{}             `json:"previous"` // Previous page object.
	Results  []releases.ProductionV1 `json:"results"`  // Results of the productions.
}

ProductionList result.

type Productions

type Productions struct {
	Filter  releases.Filter
	Count   int           // Count the total productions.
	Finds   int           // Finds are the number of productions to use.
	Link    string        // Link URL to receive the request.
	Code    int           // Code received by the HTTP request.
	Status  string        // Status received by the HTTP request.
	Timeout time.Duration // Timeout in seconds for the HTTP request (default 5).
}

Productions API production request.

func (*Productions) Prods

func (p *Productions) Prods(db *sql.DB, w io.Writer, maxPage int) ([]releases.ProductionV1, error)

Prods gets all the productions of a releaser and normalises the results. The maxPage are the maximum number of API pages to iterate, but if set to 0 it will default to 1000.

Jump to

Keyboard shortcuts

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