NAME
SDK::SoundCloud - SDK for the SoundCloud API
VERSION
version 1.021
DESCRIPTION
This SDK client provides a interface for communicating with the SoundCloud.com API. Client ID, Client Secret are provided by soundcloud.com when you register a app.
SYNOPSIS
use SDK::SoundCloud;
my $SoundCloud = SoundCloud->new(client_id => $client_id);
#Get Auth url, redirect user to SoundCloud to get auth code for OAuthToken.
my $redirect_url = $SoundCloud->connect_url(redirect_uri => $redirect_uri);
redirect $redirect_uri;
#After auth and redirect from SoundCloud's auth service. Capture code param and get OAuthToken.
$SoundCloud->get_token(
client_secret => $client_secret,
code => param->{code},
redirect_uri => $redirect_uri
);
#Until all methods are implemented the req method can be used to query the
#SoundCloud API.
my $result = $SoundCloud->req($params_hashref);
new(client_id)
Create a new instance of the SoundCloud SDK Client.
connect_url(redirect_uri)
Generate auth url to get access code to get OAuth2Token
get_token(client_secret, code, redirect_uri)
Method uses the code value returned from SoundCloud's api to finish
OAuth handshake and get the access token.
req()
Interface to query SoundCloud directly using the designated connection method.
Accepts hashref or hash.
* __method__ defaults to get
* __url__ defaults to api.soundlcoud.com
* __path__ is required
* __query__ accepts hashref that will be building into a url query string and attached to the path.
* __data__ will be json encoded and attached to the body.
* __header__ takes key => value and adds it to the header.
=head1 AUTHOR
John Rummel <desertfox@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2015 by John Rummel
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.