freesound-0.3.0: Access the Freesound Project database

Safe HaskellNone
LanguageHaskell98

Sound.Freesound

Contents

Description

This module provides access to the Freesound Project, a database of Creative Commons licensed sounds.

import qualified Network.HTTP.Conduit as HTTP

Synopsis

Freesound API monad

data APIKey Source

API key required for each call to the Freesound server.

apiKeyFromString :: String -> APIKey Source

Construct an API key from a String.

data Freesound a Source

Freesound API monad for communication with the Freesound server.

runFreesound :: APIKey -> Freesound a -> IO a Source

Perform an API action and return the result.

data URI Source

Newtype wrapper of Network.URI.URI to avoid orphan instance.

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.

newtype Resource a Source

Resource URI.

Constructors

Resource URI 

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.

get :: FromJSON a => Resource a -> Freesound a Source

Get the resource referred to by a URI.

Result lists

Users

getUserByName :: Text -> Freesound User Source

Get information about a user by name.