Stability | experimental |
---|---|
Maintainer | Sebastián Ramírez Magrí <sebasmagri@gmail.com> |
Safe Haskell | Safe-Infered |
General functions used by other modules
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
.
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
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