Stability | experimental |
---|---|
Maintainer | Sebastián Ramírez Magrí <sebasmagri@gmail.com> |
Safe Haskell | Safe-Infered |
Implements tracks related types and functions
- data JSON = JSON {
- id :: Int
- created_at :: String
- user :: JSON
- title :: String
- permalink_url :: String
- sharing :: String
- description :: String
- label_id :: Maybe Int
- label_name :: Maybe String
- duration :: Int
- genre :: String
- license :: String
- release_day :: Maybe Int
- release_month :: Maybe Int
- release_year :: Maybe Int
- streamable :: Bool
- downloadable :: Bool
- track_type :: String
- stream_url :: String
- bpm :: Maybe Int
- comment_count :: Int
- download_count :: Int
- playback_count :: Int
- favoritings_count :: Int
- original_format :: String
- original_content_size :: Int
- tag_list :: String
- data DownloadJSON = DownloadJSON {}
- decodeJSON :: String -> Maybe JSON
- getJSON :: String -> IO (Maybe JSON)
- decodeDownloadJSON :: String -> Maybe DownloadJSON
- decodeComments :: String -> Maybe [JSON]
- getComments :: Int -> IO (Maybe [JSON])
- fetch :: String -> String -> IO ()
- showInfo :: String -> IO ()
Documentation
Represent a track's JSON as a record
JSON | |
|
data DownloadJSON Source
Simple record to parse download_url from a track's JSON
getJSON :: String -> IO (Maybe JSON)Source
Get a JSON
record given a track URL
as in http://soundcloud.com/artist/track_title
decodeDownloadJSON :: String -> Maybe DownloadJSONSource
Decode a DownloadJSON
record out of a track's JSON
decodeComments :: String -> Maybe [JSON]Source
Decode a Network.SoundCloud.Comment JSON
list given a track id
getComments :: Int -> IO (Maybe [JSON])Source
Given the track id, get its comments as a list of Network.SoundCloud.Comment JSON