-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Access the Freesound Project database -- -- Access the Freesound Project database. The Freesound Project is a -- collaborative database of Creative Commons licensed sounds. -- -- http://www.freesound.org/ -- -- http://www.creativecommons.org/ @package freesound @version 0.2.0 module Sound.Freesound.List data List a class Elem a elemsFieldName :: Elem a => a -> Text elems :: List a -> [a] numElems :: List a -> Int previous :: List a -> Maybe (Resource (List a)) next :: List a -> Maybe (Resource (List a)) getPrevious :: (Elem a, FromJSON a) => List a -> Freesound (Maybe (List a)) getNext :: (Elem a, FromJSON a) => List a -> Freesound (Maybe (List a)) instance GHC.Show.Show a => GHC.Show.Show (Sound.Freesound.List.List a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Sound.Freesound.List.List a) instance (Sound.Freesound.List.Elem a, Data.Aeson.Types.Class.FromJSON a) => Data.Aeson.Types.Class.FromJSON (Sound.Freesound.List.List a) module Sound.Freesound.Bookmark data Bookmark sound :: Bookmark -> Summary name :: Bookmark -> Text data Category category :: Category -> Text url :: Category -> URI sounds :: Category -> Resource [Bookmark] getSounds :: Category -> Freesound [Bookmark] instance GHC.Show.Show Sound.Freesound.Bookmark.Category instance GHC.Classes.Eq Sound.Freesound.Bookmark.Category instance GHC.Show.Show Sound.Freesound.Bookmark.Bookmark instance GHC.Classes.Eq Sound.Freesound.Bookmark.Bookmark instance Data.Aeson.Types.Class.FromJSON Sound.Freesound.Bookmark.Bookmark instance Data.Aeson.Types.Class.FromJSON Sound.Freesound.Bookmark.Category module Sound.Freesound.Search.Numerical -- | Numerical constraint. data Numerical a equals :: a -> Numerical a between :: Ord a => a -> a -> Numerical a lessThan :: a -> Numerical a greaterThan :: a -> Numerical a instance GHC.Show.Show a => GHC.Show.Show (Sound.Freesound.Search.Numerical.Numerical a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Sound.Freesound.Search.Numerical.Numerical a) instance Sound.Freesound.Search.Numerical.NumericalQueryValue GHC.Types.Double instance Sound.Freesound.Search.Numerical.NumericalQueryValue GHC.Integer.Type.Integer instance Sound.Freesound.Search.Numerical.NumericalQueryValue Sound.Freesound.Sound.Type.SoundId instance Sound.Freesound.Search.Numerical.NumericalQueryValue Data.Time.Clock.UTC.UTCTime instance Sound.Freesound.Search.Numerical.NumericalQueryValue a => Network.HTTP.Types.QueryLike.QueryValueLike (Sound.Freesound.Search.Numerical.Numerical a) module Sound.Freesound.Search.Filter data Filters -- | Sound id on Freesound. id :: Numerical SoundId -> Filters username :: Text -> Filters created :: Text -> Filters originalFilename :: Text -> Filters description :: Text -> Filters tag :: Text -> Filters license :: License -> Filters isRemix :: Bool -> Filters wasRemixed :: Bool -> Filters pack :: Text -> Filters isGeotagged :: Bool -> Filters fileType :: FileType -> Filters -- | Duration of sound in seconds. duration :: Numerical Double -> Filters -- | WARNING is not to be trusted right now. bitdepth :: Numerical Integer -> Filters -- | WARNING is not to be trusted right now. bitrate :: Numerical Integer -> Filters samplerate :: Numerical Integer -> Filters -- | File size in bytes. filesize :: Numerical Integer -> Filters -- | Number of channels in sound, mostly 1 or 2, sometimes more. channels :: Numerical Integer -> Filters -- | 32-byte md5 hash of file. md5 :: Text -> Filters -- | All zero right now (not imported data). numDownloads :: Numerical Integer -> Filters -- | Average rating, from 0 to 5. avgRating :: Numerical Double -> Filters -- | Number of ratings. numRatings :: Numerical Integer -> Filters comment :: Text -> Filters -- | Number of comments. comments :: Numerical Integer -> Filters instance GHC.Show.Show Sound.Freesound.Search.Filter.Filters instance GHC.Show.Show Sound.Freesound.Search.Filter.Filter instance GHC.Classes.Eq Sound.Freesound.Search.Filter.Filter instance GHC.Show.Show Sound.Freesound.Search.Filter.F_Bool instance GHC.Classes.Eq Sound.Freesound.Search.Filter.F_Bool instance GHC.Show.Show Sound.Freesound.Search.Filter.License instance GHC.Classes.Eq Sound.Freesound.Search.Filter.License instance Network.HTTP.Types.QueryLike.QueryValueLike Sound.Freesound.Search.Filter.License instance Network.HTTP.Types.QueryLike.QueryValueLike Sound.Freesound.Search.Filter.F_Bool instance Network.HTTP.Types.QueryLike.QueryValueLike Sound.Freesound.Search.Filter.Filter instance GHC.Base.Monoid Sound.Freesound.Search.Filter.Filters instance Data.Default.Class.Default Sound.Freesound.Search.Filter.Filters instance Network.HTTP.Types.QueryLike.QueryValueLike Sound.Freesound.Search.Filter.Filters module Sound.Freesound.Search.Query data Query include :: Text -> Query exclude :: Text -> Query (&) :: Query -> Query -> Query instance GHC.Show.Show Sound.Freesound.Search.Query.Query instance GHC.Classes.Eq Sound.Freesound.Search.Query.Query instance GHC.Show.Show Sound.Freesound.Search.Query.Term instance GHC.Classes.Eq Sound.Freesound.Search.Query.Term instance Network.HTTP.Types.QueryLike.QueryValueLike Sound.Freesound.Search.Query.Query module Sound.Freesound.Search data SortMethod Duration :: SortMethod Created :: SortMethod Downloads :: SortMethod Rating :: SortMethod data SortDirection Ascending :: SortDirection Descending :: SortDirection data Sorting unsorted :: Sorting sortedBy :: SortMethod -> SortDirection -> Sorting data Pagination Pagination :: Int -> Int -> Pagination [page] :: Pagination -> Int [resultsPerPage] :: Pagination -> Int instance GHC.Show.Show Sound.Freesound.Search.Pagination instance GHC.Classes.Eq Sound.Freesound.Search.Pagination instance GHC.Show.Show Sound.Freesound.Search.Sorting instance GHC.Classes.Eq Sound.Freesound.Search.Sorting instance GHC.Show.Show Sound.Freesound.Search.SortDirection instance GHC.Classes.Eq Sound.Freesound.Search.SortDirection instance GHC.Show.Show Sound.Freesound.Search.SortMethod instance GHC.Classes.Eq Sound.Freesound.Search.SortMethod instance Data.Default.Class.Default Sound.Freesound.Search.Sorting instance Network.HTTP.Types.QueryLike.QueryValueLike Sound.Freesound.Search.Sorting instance Data.Default.Class.Default Sound.Freesound.Search.Pagination instance Network.HTTP.Types.QueryLike.QueryLike Sound.Freesound.Search.Pagination module Sound.Freesound.Sound data SoundId data FileType WAV :: FileType AIFF :: FileType OGG :: FileType MP3 :: FileType FLAC :: FileType class Sound a -- | The sound’s unique identifier. id :: Sound a => a -> SoundId -- | The name user gave to the sound. name :: Sound a => a -> Text -- | An array of tags the user gave to the sound. tags :: Sound a => a -> [Text] -- | The username of the uploader of the sound. username :: Sound a => a -> Text -- | The license under which the sound is available to you. license :: Sound a => a -> License data Summary data Detail type Sounds = List Summary -- | The URI for this sound on the Freesound website. url :: Detail -> URI -- | The description the user gave to the sound. description :: Detail -> Text -- | Latitude and longitude of the geotag (only for sounds that have been -- geotagged). geotag :: Detail -> Maybe GeoTag -- | The date of when the sound was uploaded. created :: Detail -> Text -- | The license under which the sound is available to you. sound_license :: Detail -> License -- | The type of sound (wav, aif, mp3, etc.). fileType :: Detail -> FileType -- | The number of channels. channels :: Detail -> Int -- | The size of the file in bytes. filesize :: Detail -> Integer -- | The bit rate of the sound. bitrate :: Detail -> Int -- | The bit depth of the sound. bitdepth :: Detail -> Int -- | The duration of the sound in seconds. duration :: Detail -> Double -- | The samplerate of the sound. samplerate :: Detail -> Int -- | The username of the uploader of the sound. sound_username :: Detail -> Text -- | If the sound is part of a pack, this URI points to that pack’s API -- resource. pack :: Detail -> Maybe (Resource ()) -- | The URI for retrieving the original sound. download :: Detail -> URI -- | The URI for bookmarking the sound. bookmark :: Detail -> URI -- | Dictionary containing the URIs for mp3 and ogg versions of the sound. -- The dictionary includes the fields preview-hq-mp3 and preview-lq-mp3 -- (for ~128kbps quality and ~64kbps quality mp3 respectively), and -- preview-hq-ogg and preview-lq-ogg (for ~192kbps quality and ~80kbps -- quality ogg respectively). previews :: Detail -> Previews -- | Dictionary including the URIs for spectrogram and waveform -- visualizations of the sound. The dinctionary includes the fields -- waveform_l and waveform_m (for large and medium waveform images -- respectively), and spectral_l and spectral_m (for large and medium -- spectrogram images respectively). images :: Detail -> Images -- | The number of times the sound was downloaded. numDownloads :: Detail -> Integer -- | The average rating of the sound. avgRating :: Detail -> Double -- | The number of times the sound was rated. numRatings :: Detail -> Integer -- | The URI for rating the sound. rate :: Detail -> URI -- | The URI of a paginated list of the comments of the sound. comments :: Detail -> Resource () -- | The number of comments. numComments :: Detail -> Integer -- | The URI to comment the sound. comment :: Detail -> URI -- | URI pointing to the similarity resource (to get a list of similar -- sounds). , analysis :: Maybe similarSounds :: Detail -> Resource (List Summary) -- | URI pointing to the complete analysis results of the sound. analysisStats :: Detail -> Resource () -- | The URI for retrieving a JSON file with analysis information for each -- frame of the sound. analysisFrames :: Detail -> Resource () search :: Pagination -> Sorting -> Filters -> Query -> Freesound Sounds search_ :: Query -> Freesound Sounds -- | Search for sounds in a certain coordinate region. geotagged :: ... -- -- Content based search. contentSearch :: ... getSimilar :: Pagination -> Detail -> Freesound Sounds getSimilar_ :: Detail -> Freesound Sounds module Sound.Freesound.Pack class Pack a -- | The URI for this resource. ref :: Pack a => a -> Resource () -- | The URL for this pack’s page on the Freesound website. url :: Pack a => a -> URI -- | The API URI for the pack’s sound collection. sounds :: Pack a => a -> Resource (List Summary) -- | The pack’s name. name :: Pack a => a -> Text -- | The date when the pack was created. created :: Pack a => a -> Text -- | The number of times the pack was downloaded. numDownloads :: Pack a => a -> Integer type Packs = List Summary data Summary data Detail -- | A JSON object with the user’s username, url, and ref. username :: Detail -> Text getSounds :: (Pack a) => Pagination -> a -> Freesound Sounds getSounds_ :: (Pack a) => a -> Freesound Sounds module Sound.Freesound.User -- | User of the Freesound database. class User a -- | The user’s username. name :: User a => a -> Text -- | The URI for this resource. ref :: User a => a -> Resource Detail -- | The profile page for the user on the Freesound website. url :: User a => a -> URI -- | User of the Freesound database. data Summary data Detail -- | The API URI for this user’s sound collection. sounds :: Detail -> Resource (List Summary) -- | The API URI for this user’s pack collection. packs :: Detail -> Resource (List Summary) -- | The user’s first name, possibly empty. firstName :: Detail -> Maybe Text -- | The user’s last name, possibly empty. lastName :: Detail -> Maybe Text -- | A small text the user wrote about himself. FIXME: homePage :: Maybe -- Data about :: Detail -> Maybe Text -- | The user’s homepage, possibly empty. homePage :: Detail -> Maybe Text -- | The user’s signature, possibly empty. signature :: Detail -> Maybe Text -- | The date the user joined Freesound. dateJoined :: Detail -> Text bookmarkCategories :: Detail -> Resource Categories -- | Get detailed information about a user. getUser :: (User a) => a -> Freesound Detail -- | Get information about a user by name. getUserByName :: Text -> Freesound Detail -- | Retrieve a list of a user's bookmark categories. getBookmarkCategories :: Detail -> Freesound [Category] -- | Retrieve a user's sounds. This is broken: the response doesn't contain -- the User. getSounds :: Pagination -> Detail -> Freesound Sounds -- | Retrieve a user's sounds. getSounds_ :: Detail -> Freesound Sounds -- | Retrieve a user's packs. getPacks :: Detail -> Freesound Packs -- | 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 -- | Get detailed information about a user. getUser :: (User a) => a -> Freesound Detail -- | Get information about a user by name. getUserByName :: Text -> Freesound Detail -- | Retrieve a list of a user's bookmark categories. getBookmarkCategories :: Detail -> Freesound [Category] -- | Retrieve a user's sounds. This is broken: the response doesn't contain -- the User. getSounds :: Pagination -> Detail -> Freesound Sounds -- | Retrieve a user's sounds. getSounds_ :: Detail -> Freesound Sounds -- | Retrieve a user's packs. getPacks :: Detail -> Freesound Packs search :: Pagination -> Sorting -> Filters -> Query -> Freesound Sounds search_ :: Query -> Freesound Sounds -- | Search for sounds in a certain coordinate region. geotagged :: ... -- -- Content based search. contentSearch :: ... getSimilar :: Pagination -> Detail -> Freesound Sounds getSimilar_ :: Detail -> Freesound Sounds -- | API key required for each call to the Freesound server. data APIKey -- | Construct an API key from a String. apiKeyFromString :: String -> APIKey -- | Freesound API monad for communication with the Freesound server. data Freesound a -- | Perform an API action and return the result. runFreesound :: APIKey -> Freesound a -> IO a -- | Newtype wrapper of Network.URI.URI to avoid orphan instance. data URI -- | Download the data referred to by a URI. getURI :: URI -> Freesound ByteString -- | Resource URI. data Resource a -- | Construct an API uri from path components and a query. resourceURI :: [Text] -> Query -> Resource a -- | Append a query string to a resource URI. appendQuery :: QueryLike a => a -> Resource r -> Resource r -- | 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. getResource :: (FromJSON a) => Resource a -> Freesound a