| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Sound.Freesound
Description
This module provides access to the Freesound Project, a database of Creative Commons licensed sounds.
import qualified Network.HTTP.Conduit as HTTP
- module Sound.Freesound.Search
- module Sound.Freesound.Search.Query
- module Sound.Freesound.List
- getUser :: User a => a -> Freesound Detail
- getUserByName :: Text -> Freesound Detail
- getBookmarkCategories :: Detail -> Freesound [Category]
- getSounds :: Pagination -> Detail -> Freesound Sounds
- getSounds_ :: Detail -> Freesound Sounds
- getPacks :: Detail -> Freesound Packs
- search :: Pagination -> Sorting -> Filters -> Query -> Freesound Sounds
- search_ :: Query -> Freesound Sounds
- getSimilar :: Pagination -> Detail -> Freesound Sounds
- getSimilar_ :: Detail -> Freesound Sounds
- data APIKey
- apiKeyFromString :: String -> APIKey
- data Freesound a
- runFreesound :: APIKey -> Freesound a -> IO a
- data URI
- getURI :: URI -> Freesound ByteString
- data Resource a
- resourceURI :: [Text] -> Query -> Resource a
- appendQuery :: QueryLike a => a -> Resource r -> Resource r
- getResource :: FromJSON a => Resource a -> Freesound a
Searching
module Sound.Freesound.Search
module Sound.Freesound.Search.Query
module Sound.Freesound.List
Users
getUserByName :: Text -> Freesound Detail Source
Get information about a user by name.
getBookmarkCategories :: Detail -> Freesound [Category] Source
Retrieve a list of a user's bookmark categories.
getSounds :: Pagination -> Detail -> Freesound Sounds Source
Retrieve a user's sounds. This is broken: the response doesn't contain the User.
getSounds_ :: Detail -> Freesound Sounds Source
Retrieve a user's sounds.
Sounds
getSimilar :: Pagination -> Detail -> Freesound Sounds Source
Search for sounds in a certain coordinate region. geotagged :: ...
Content based search. contentSearch :: ...
getSimilar_ :: Detail -> Freesound Sounds Source
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.
getURI :: URI -> Freesound ByteString Source
Download the data referred to by a 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.
getResource :: FromJSON a => Resource a -> Freesound a Source
Create a query item for the API key. apiKeyQuery :: Freesound HTTP.Query apiKeyQuery = do k <- Freesound $ R.asks apiKey return $ [("api_key", Just k)]
Download the resource referred to by a URI.