prod

package
v1.9.6 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNegativeID = errors.New("demozoo production id cannot be a negative integer")

Functions

func URL

func URL(id int64) (string, error)

URL creates a production URL from a Demozoo ID.

Types

type Production

type Production struct {
	ID         int64         // Demozoo production ID
	Timeout    time.Duration // HTTP request timeout in seconds (default 5)
	Link       string        // URL link to sent the request // ??
	StatusCode int           // received HTTP statuscode
	Status     string        // received HTTP status
}

Production API production request.

func (*Production) Get

func (p *Production) Get() (prods.ProductionsAPIv1, error)

Get a production API link and normalises the results.

func (*Production) URL

func (p *Production) URL() error

URL creates a productions API v.1 request link. example: https://demozoo.org/api/v1/productions/158411/?format=json

Jump to

Keyboard shortcuts

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