Safe Haskell | None |
---|---|
Language | Haskell98 |
This module provides access to the Freesound Project, a database of Creative Commons licensed sounds.
import qualified Network.HTTP.Conduit as HTTP
- data APIKey
- apiKeyFromString :: String -> APIKey
- data Freesound a
- runFreesound :: APIKey -> Freesound a -> IO a
- data URI
- download :: URI -> Freesound ByteString
- downloadToFile :: FilePath -> URI -> Freesound ()
- newtype Resource a = Resource URI
- resourceURI :: [Text] -> Query -> Resource a
- appendQuery :: QueryLike a => a -> Resource r -> Resource r
- get :: FromJSON a => Resource a -> Freesound a
- module Sound.Freesound.List
- getUserByName :: Text -> Freesound User
Freesound API monad
API key required for each call to the Freesound server.
apiKeyFromString :: String -> APIKey Source
Construct an API key from a String.
Freesound API monad for communication with the Freesound server.
runFreesound :: APIKey -> Freesound a -> IO a Source
Perform an API action and return the result.
download :: URI -> Freesound ByteString Source
Download the data referred to by a URI.
downloadToFile :: FilePath -> URI -> Freesound () Source
Download the data referred to by a URI to a file.
resourceURI :: [Text] -> Query -> Resource a Source
Construct an API uri from path components and a query.
appendQuery :: QueryLike a => a -> Resource r -> Resource r Source
Append a query string to a resource URI.
Result lists
module Sound.Freesound.List
Users
getUserByName :: Text -> Freesound User Source
Get information about a user by name.