NAME

    Net::Async::Spotify::Object - Common Wrapper package for Spotify response Objects

SYNOPSIS

To be used internally, and it will be used as a response to Net::Async::Spotify::API However this is how it's actually being used:

    use Net::Async::Spotify::Object;

    my $sp_json_decoded_res = {danceability => 0.735,,...}; # Audio Features response.
    my $obj = Net::Async::Spotify::Object->new(
        $sp_json_decoded_res,
        {
            response_objs => ['features'],
            uri => 'https://api.spotify.com/v1/audio-features/{id}',
        },
    );
    ref $obj; # => Net::Async::Spotify::Object::AudioFeatures

DESCRIPTION

Common wrapper for Spotify response Objects. To be used to dynamically be able to create resonse objects. It does so by so by figuring out needed Object type using Net::Async::Spotify::Util::response_object_map and returning a new instance of that "Objects" in perlsyn. When it can't determine an exact object type it will return an instance of Net::Async::Spotify::Object::General. Note that some responses are paginated, so might contain Net::Async::Spotify::Object::Paging. and if it's an erroneous response it will be Net::Async::Spotify::Object::Error.

PARAMETERS

We would need to pass what we think this Object might be along with the content.

possible_types

A list of possible types for this object we want to create.

data

the content that we want to create the object for.

Objects

Here is a list of the current available Spotify Object types. Found in link here https://developer.spotify.com/documentation/web-api/reference/#objects-index