class Stremio::Addon::DevKit::CatalogBase::ExtraGenre
- Stremio::Addon::DevKit::CatalogBase::ExtraGenre
- Reference
- Object
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
- JSON::Serializable
- JSON::Serializable::Fake
Defined in:
stremio-addon-devkit/catalog_base.crConstructors
- .new(pull : JSON::PullParser)
- .new(genres : GenresResultType, isRequired : Bool = false, max_selectable : UInt32 = 1)
- .new(isRequired : Bool = false, max_selectable : UInt32 = 1, &block : -> GenresResultType)
Instance Method Summary
- #genres : GenresProcType
-
#isRequired : Bool
#isRequired
: optional - boolean, set to true if this property must always be passed -
#name : ExtraType
#name
: required - string, is the name of the property; this name will be used in the extraProps argument itself -
#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. -
#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
Constructor Detail
Instance Method Detail
#isRequired
: optional - boolean, set to true if this property must always be passed
#name
: required - string, is the name of the property; this name will be used in the extraProps argument itself
#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"] });
#optionsLimit
- optional - number, the limit of values a user may select from the pre-set options list; by default, this is set to 1