Documentation
¶
Overview ¶
Contains all the preset enumerations as defined and used in the API.
Index ¶
- Constants
- func EnumByByteValue[T ~string](e Enum[T], value []byte) (*T, error)
- func EnumByValue[T ~string](e Enum[T], value T) (*T, error)
- func EnumValues[T ~string](e Enum[T]) []string
- type ActionAfterRejection
- type AgeRestriction
- type AutoFill
- type Bool
- type ContentType
- type Dimension
- type DistanceUnit
- type Enum
- type Gateway
- type ImageFormat
- type OrderDirection
- type Orientation
- type OutputModifier
- type QueryMode
- type RichTextFormat
- type StreamType
- type TemperatureUnit
Constants ¶
const ( NoBool = Bool("0") YesBool = Bool("1") )
A boolean value is expressed as a 0 for `false` and 1 for `true`. String is used as type as it's not possible to nil integer values (which is needed in order to omit unset parameters as the query parameter).
const ( WebpImageFormat = ImageFormat("webp") AvifImageFormat = ImageFormat("avif") // Will return a jpg, png or gif. ClassicImageFormat = ImageFormat("classic") )
Used to state the desired image format of a requested image.
const ( PlainFormat = RichTextFormat("plain") CoverLinksFormat = RichTextFormat("converlinks") HtmlFormat = RichTextFormat("html") XmlStrictFormat = RichTextFormat("xmlstrict") )
Possible rich text formats.
const ( MetricUnit = DistanceUnit("metric") ImperialUnit = DistanceUnit("imperial") )
Metric or imperial distance units.
const ( CelsiusUnit = TemperatureUnit("celsius") FahrenheitUnit = TemperatureUnit("fahrenheit") )
Metric or imperial temperature units.
const ( AllGateway = Gateway("all") DesktopGateway = Gateway("desktop") MobileGateway = Gateway("mobile") SmartTvGateway = Gateway("smarttv") CarGateway = Gateway("car") )
Used in conjunction with [QueryParameters.ForceGateway].
const ( AscendingOrder = OrderDirection("ASC") DescendingOrder = OrderDirection("DESC") )
Direction of ordering elements.
const ( AllStreamType = StreamType("allmedia") VideoStreamType = StreamType("videos") AudioStreamType = StreamType("audio") ShowStreamType = StreamType("shows") )
Streamtypes represent the different types of media items.
const ( VideoContentType = ContentType("video") ComicContentType = ContentType("comic") CgiContentType = ContentType("cgi") FotoContentType = ContentType("foto") DrawingContentType = ContentType("drawing") ClipartContentType = ContentType("clipart") )
The content types of media.
const ( AgeRestriction0 = AgeRestriction("0") AgeRestriction6 = AgeRestriction("6") AgeRestriction12 = AgeRestriction("12") AgeRestriction16 = AgeRestriction("16") AgeRestriction18 = AgeRestriction("18") )
The different age restrictions as defined by the FSK.
const ( HdDimension = Dimension("hd") FullHdDimension = Dimension("fullhd") I2kDimension = Dimension("2K") I4kDimension = Dimension("4K") )
Geometric dimension of a media file.
const ( PortraitOrientation = Orientation("portrait") LandscapeOrientation = Orientation("landscape") )
Media orientation.
const ( FullOutputModifier = OutputModifier("full") DefaultOutputModifier = OutputModifier("default") IdOutputModifier = OutputModifier("ID") GidOutputModifier = OutputModifier("GID") )
Output modifier used to define the detail level.
const ( RandomAutoFill = AutoFill("random") LatestAutoFill = AutoFill("latest") TopItemsAutoFill = AutoFill("topitems") TopItemsExternal = AutoFill("topitemsexternal") ForkIdsAutoFill = AutoFill("forkids") EvergreenAutoFill = AutoFill("evergreen") )
Method for the auto fill method of the API.
const ( ClassicWithAndQueryMode = QueryMode("classicwithand") ClassicWithOrQueryMode = QueryMode("classicwithor") FulltextQueryMode = QueryMode("fulltext") )
Query modes.
const ( DeleteAfterRejection = ActionAfterRejection("delete") ArchiveAfterRejection = ActionAfterRejection("archive") BlockAfterRejection = ActionAfterRejection("block") NewVersionAfterRejection = ActionAfterRejection("newversion") )
Action after rejection of an item.
Variables ¶
This section is empty.
Functions ¶
func EnumByByteValue ¶
Returns an Enum instance based on it's value from a byte slice.
func EnumByValue ¶
Returns an Enum instance by it's value.
func EnumValues ¶
Returns all values of an Enum type.
Types ¶
type ActionAfterRejection ¶
type ActionAfterRejection string
Action after rejection of an item.
func (ActionAfterRejection) Instances ¶
func (i ActionAfterRejection) Instances() []ActionAfterRejection
All instances of the ActionAfterRejection
func (*ActionAfterRejection) UnmarshalJSON ¶
func (i *ActionAfterRejection) UnmarshalJSON(data []byte) (err error)
type AgeRestriction ¶
type AgeRestriction string
Age categories for age restrictions.
func (AgeRestriction) Instances ¶
func (i AgeRestriction) Instances() []AgeRestriction
All instances of the AgeRestriction
func (*AgeRestriction) UnmarshalJSON ¶
func (i *AgeRestriction) UnmarshalJSON(data []byte) (err error)
type AutoFill ¶
type AutoFill string
Method for the auto fill method of the API.
func (*AutoFill) UnmarshalJSON ¶
type Bool ¶
type Bool string
A boolean value is expressed as a 0 for `false` and 1 for `true`. String is used as type as it's not possible to nil integer values (which is needed in order to omit unset parameters as the query parameter).
func (*Bool) UnmarshalJSON ¶
type ContentType ¶
type ContentType string
Content type of media items.
func (ContentType) Instances ¶
func (i ContentType) Instances() []ContentType
All instances of the ContentType
func (*ContentType) UnmarshalJSON ¶
func (i *ContentType) UnmarshalJSON(data []byte) (err error)
type Dimension ¶
type Dimension string
Geometric dimension of a media file.
func (*Dimension) UnmarshalJSON ¶
type DistanceUnit ¶
type DistanceUnit string
Metric or imperial distance units.
func (DistanceUnit) Instances ¶
func (i DistanceUnit) Instances() []DistanceUnit
All instances of the DistanceUnit
func (*DistanceUnit) UnmarshalJSON ¶
func (i *DistanceUnit) UnmarshalJSON(data []byte) (err error)
type Enum ¶
type Enum[T ~string] interface { // A list of all possible values. Instances() []T }
Used to simplify the usage of the enums in the cli and notification portion of the library.
type Gateway ¶
type Gateway string
Used in conjunction with [QueryParameters.ForceGateway].
func (*Gateway) UnmarshalJSON ¶
type ImageFormat ¶
type ImageFormat string
Used to state the desired image format of a requested image.
func (ImageFormat) Instances ¶
func (i ImageFormat) Instances() []ImageFormat
All instances of the ImageFormat
func (*ImageFormat) UnmarshalJSON ¶
func (i *ImageFormat) UnmarshalJSON(data []byte) (err error)
type OrderDirection ¶
type OrderDirection string
Direction of ordering elements.
func (OrderDirection) Instances ¶
func (i OrderDirection) Instances() []OrderDirection
All instances of the OrderDirection
func (*OrderDirection) UnmarshalJSON ¶
func (i *OrderDirection) UnmarshalJSON(data []byte) (err error)
type Orientation ¶
type Orientation string
Media orientation.
func (Orientation) Instances ¶
func (i Orientation) Instances() []Orientation
All instances of the Orientation
func (*Orientation) UnmarshalJSON ¶
func (i *Orientation) UnmarshalJSON(data []byte) (err error)
type OutputModifier ¶
type OutputModifier string
Output modifier used to define the detail level.
func (OutputModifier) Instances ¶
func (i OutputModifier) Instances() []OutputModifier
All instances of the OutputModifier
func (*OutputModifier) UnmarshalJSON ¶
func (i *OutputModifier) UnmarshalJSON(data []byte) (err error)
type QueryMode ¶
type QueryMode string
Query modes.
func (*QueryMode) UnmarshalJSON ¶
type RichTextFormat ¶
type RichTextFormat string
Possible rich text formats.
func (RichTextFormat) Instances ¶
func (i RichTextFormat) Instances() []RichTextFormat
All instances of the RichTextFormat
func (*RichTextFormat) UnmarshalJSON ¶
func (i *RichTextFormat) UnmarshalJSON(data []byte) (err error)
type StreamType ¶
type StreamType string
Different streamtypes used in the API call.
func (StreamType) Instances ¶
func (i StreamType) Instances() []StreamType
All instances of the StreamType
func (*StreamType) UnmarshalJSON ¶
func (i *StreamType) UnmarshalJSON(data []byte) (err error)
type TemperatureUnit ¶
type TemperatureUnit string
Metric or imperial temperature units.
func (TemperatureUnit) Instances ¶
func (i TemperatureUnit) Instances() []TemperatureUnit
All instances of the TemperatureUnit
func (*TemperatureUnit) UnmarshalJSON ¶
func (i *TemperatureUnit) UnmarshalJSON(data []byte) (err error)