The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::Async::Spotify::Object::Base - Base Package for Spotify Object Classes.

DESCRIPTION

Base class to be used by all Autogenerated modules of Spotify Objects It does so by creating an accessor that goes by the name of each field in the object. It also applies type casting to passed values, making sure all types are matching. If an undefined field passed when creating, it will be populated in "extra_fields" Defined fields are specific to each Net::Async::Spotify::Object and can be viewed in class itself.

METHODS

apply_type

an internal function attached to every field accessor. Casting the value of each field depending on it's type. I believe this may not be the optimum way to do it. However for the time being I think it works great. Here are the available types that it checks for:

extra_fields

Special field, where it holds any undefined keys passed when creating.

to_hash

Converts object into a hash rather than blessed object with methods.

to_json

return object as JSON encoded string

to_human

return object as readable string