NAME
WebService::8tracks::Session - 8tracks mix playing session
SYNOPSIS
my $session = $api->create_session($mix_id); # start playing mix
# to start playing
my $res = $session->play;
my $media_url = $res->{set}->{track}->{url};
...
# to play next track
$res = $session->next;
...
# to skip a track
$res = $session->skip;
if ($res->{set}->{at_end}) {
# played all tracks, does not contain URL
...
}
METHODS
- play
-
my $res = $session->play;
Start playing.
- next
-
my $res = $session->next;
Go to next track. Calls play() if playing is not started.
- skip
-
my $res = $session->skip;
Skip to next track.
AUTHOR
motemen <motemen@gmail.com>
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.