class Stremio::Addon::DevKit::CatalogBase::ExtraGenre

Overview

Enables Filtering Based on Genre or other tags See: https://github.com/Stremio/stremio-addon-sdk/blob/master/docs/api/responses/manifest.md#extra-properties

Included Modules

Defined in:

stremio-addon-devkit/catalog_base.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(genres : GenresResultType, isRequired : Bool = false, max_selectable : UInt32 = 1) #

[View source]
def self.new(isRequired : Bool = false, max_selectable : UInt32 = 1, &block : -> GenresResultType) #

[View source]

Instance Method Detail

def genres : GenresProcType #

[View source]
def isRequired : Bool #

#isRequired: optional - boolean, set to true if this property must always be passed


[View source]
def name : ExtraType #

#name: required - string, is the name of the property; this name will be used in the extraProps argument itself


[View source]
def options(json : JSON::Builder) : Nil #

#options: optional - array of strings, possible values for this property; this is useful for things like genres, where you need the user to select from a pre-set list of options (e.g. { name: "genre", options: ["Action", "Comedy", "Drama"] });


[View source]
def optionsLimit : UInt32 #

#optionsLimit - optional - number, the limit of values a user may select from the pre-set options list; by default, this is set to 1


[View source]