Stability | experimental |
---|---|
Maintainer | Sebastián Ramírez Magrí <sebasmagri@gmail.com> |
Safe Haskell | Safe-Infered |
The Network.SoundCloud
module provides functions and types to access
the soundcloud.com public API.
Resource Modules
The library is composed by a set of modules implementing datatypes and functions for the resources available through the API. Namely,
- Network.SoundCloud.App
- Network.SoundCloud.Comment
- Network.SoundCloud.Group
- Network.SoundCloud.MiniUser
- Network.SoundCloud.Set
- Network.SoundCloud.Track
- Network.SoundCloud.User
Every resource module defines at least a JSON
record and the getJSON
and decodeJSON
functions.
Base Modules
The base modules provide values and functions that are to be used by the rest of the modules in the library. The base modules are,
API Documentation
Documentation of the SoundCloud's API can be found at http://developers.soundcloud.com/docs/
Documentation
scSimpleGet :: String -> IO (Maybe String)Source
Issue a GET
HTTP request to the passed URL returning
Nothing
if a response code different than 2XX is found.
scRecursiveGet :: String -> IO (Maybe String)Source
Issue a GET
HTTP request to the passed URL recursing
over redirections
scFetch :: String -> String -> IO ()Source
Given an URL as a first parameter, and a path as a second,
issue a GET
request to the URL
and save the response body
to a file at path
.
scResolve :: String -> IO StringSource
Get the API url of a resource given its public URL. In example, for a public URL like:
http://soundcloud.com/user/track
It returns the API URL:
http://api.soundcloud.com/tracks/track_id.json?client_id=foo
scResourceType :: String -> StringSource
Given an arbitrary resource URL, returns the type of the resource.
The response can be one of:
track
user
set
group
comment
app
nothing
scResourceShowInfo :: String -> IO ()Source
Show information about the resource pointed by the given API URL
scShowInfo :: String -> IO ()Source
Show information about a resource given its public URL