-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell binding to the Flickr API -- -- The flickr API binding lets you access flickr.com's resources and -- methods from Haskell. Implements the full API, as specified by -- http://flickr.com/services/api/ @package flickr @version 0.2.2 -- | License : See the file LICENSE -- -- Status : Coded -- -- Codec for de/encoding URI strings via percent encodings (cf. RFC -- 3986.) module Codec.Percent getEncodedString :: String -> String getDecodedString :: String -> String getEncodedChar :: Char -> Maybe String getDecodedChar :: String -> Maybe (Char, String) module Codec.URLEncoder encodeString :: String -> String decodeString :: String -> String module Util.MIME uploadFileType :: String -> Type mixedType :: IO (MIMEValue, String) uploadFile :: String -> FilePath -> IO MIMEValue showMIMEValue :: String -> MIMEValue -> ([(String, String)], String) showMIMEContent :: String -> MIMEContent -> String crnl :: String showDisposition :: Disposition -> String showDispType :: DispType -> String showDispParam :: DispParam -> String module Util.Post data PostReq PostReq :: String -> [PostParam] -> PostReq prName :: PostReq -> String prVals :: PostReq -> [PostParam] data PostKind PostQuery :: PostKind PostWWWForm :: PostKind PostFormData :: PostKind newPostRequest :: String -> PostReq testRequest :: PostReq -> Maybe PostKind -> IO () toRequest :: PostReq -> Maybe PostKind -> IO (String, [(String, String)], String) addNameValue :: String -> String -> PostReq -> PostReq addNameFile :: String -> FilePath -> Maybe String -> PostReq -> PostReq data PostParam PostNameValue :: String -> String -> PostParam PostFile :: String -> FilePath -> (Maybe String) -> PostParam isPostFile :: PostParam -> Bool toMIMEValue :: [PostParam] -> IO MIMEValue fromPostParam :: String -> PostParam -> IO MIMEValue toMIMEType :: String -> IO Type getMIMEType :: String -> IO Type -- | Haskell implementation of MD5, derived from RFC 1321. module Util.MD5 md5 :: [Word8] -> [Word8] md5sum :: [Word8] -> String md5sumStr :: [Char] -> String showDigest :: [Word8] -> String -- | hs-flickr keys and secrets; use and authorize with care.. module Util.Keys data APIKey APIKey :: String -> String -> String -> Maybe String -> APIKey apiKind :: APIKey -> String apiKey :: APIKey -> String apiSecret :: APIKey -> String apiAuthURL :: APIKey -> Maybe String hsflickrAPIKey :: APIKey -- | the API key currently registered for hsflickr, mobile -- application version (write perms.) hsflickr_mobile_key :: APIKey -- | the API key currently registered for hsflickr, web application version -- (write perms.) hsflickr_web_key :: APIKey -- | Simple GET/de-ref of URLs; abstracting out networking backend/package. module Util.Fetch readContentsURL :: URLString -> IO String readUserContentsURL :: User -> URLString -> IO String postContentsURL :: URLString -> [(String, String)] -> String -> IO String type URLString = String data User User :: String -> String -> User userName :: User -> String userPass :: User -> String -- | Assorted functions for unravelling Flickr responses. module Flickr.Utils pNodes :: String -> [Element] -> [Element] pNode :: String -> [Element] -> Maybe Element pLeaf :: String -> [Element] -> Maybe String pAttr :: String -> Element -> Maybe String pMany :: String -> (Element -> Maybe a) -> [Element] -> [a] children :: Element -> [Element] child :: Element -> Element nsName :: String -> QName without :: [String] -> [Attr] -> [Attr] ifNamed :: String -> Element -> Maybe a -> Maybe a mbDef :: a -> Maybe a -> Maybe a readMb :: (Read a) => String -> Maybe a piped :: [String] -> String opt :: String -> String -> Maybe (String, String) optB :: String -> Bool -> Maybe (String, String) opt1 :: String -> [String] -> Maybe (String, String) mbOpt :: String -> (a -> String) -> Maybe a -> Maybe (String, String) showBool :: Bool -> String intContent :: Element -> Maybe Int -- | The fromMaybe function takes a default value and and -- Maybe value. If the Maybe is Nothing, it returns -- the default values; otherwise, it returns the value contained in the -- Maybe. fromMaybe :: a -> Maybe a -> a -- | Haskell rendering of types used and introduced by the Flickr API. module Flickr.Types type URLString = String type DateString = String type UserID = String type UserName = String type NSID = UserID type PhotoID = String type PhotosetID = String type BlogID = String type CategoryID = String type ChatId = String type Key = String type Tag = String type TagID = Tag type Title = String type Description = String type PlaceID = String type GroupID = String type WhereOnEarthID = String type LicenseID = String type CommentID = String type TicketID = String type NoteID = String type ClusterID = String type DayWeek = Bool type PermissionID = String type Date = DateString type DateInterval = (Date, Maybe Date) data AppInfo AppInfo :: String -> String -> URLString -> Maybe URLString -> AppInfo appTitle :: AppInfo -> String appDescription :: AppInfo -> String appLogo :: AppInfo -> URLString appAboutURL :: AppInfo -> Maybe URLString data Signature Signature :: String -> Signature sigComputed :: Signature -> String data AuthRequest AuthRequest :: Key -> String -> Maybe AuthFrob -> Signature -> AuthRequest authKey :: AuthRequest -> Key authPermission :: AuthRequest -> String authFrob :: AuthRequest -> Maybe AuthFrob authSig :: AuthRequest -> Signature data AuthFrob AuthFrob :: String -> AuthFrob aFrob :: AuthFrob -> String type AuthTokenValue = String type AuthMiniToken = String data AuthToken AuthToken :: AuthTokenValue -> [String] -> User -> AuthToken authToken :: AuthToken -> AuthTokenValue authPerms :: AuthToken -> [String] authUser :: AuthToken -> User data User User :: UserName -> String -> Maybe String -> Maybe Bool -> Maybe Bool -> Maybe String -> Maybe URLString -> Maybe URLString -> Maybe UserPhotoStat -> [Attr] -> User userName :: User -> UserName userId :: User -> String userFullName :: User -> Maybe String userIsAdmin :: User -> Maybe Bool userIsPro :: User -> Maybe Bool userLocation :: User -> Maybe String userProfileURL :: User -> Maybe URLString userPhotosURL :: User -> Maybe URLString userPhotoStat :: User -> Maybe UserPhotoStat userAttrs :: User -> [Attr] nullUser :: User data UserPhotoStat UserPhotoStat :: Maybe DateString -> Maybe Int -> UserPhotoStat userPhotoFirst :: UserPhotoStat -> Maybe DateString userPhotoCount :: UserPhotoStat -> Maybe Int data Activity Activity :: String -> User -> DateString -> String -> Activity actType :: Activity -> String actUser :: Activity -> User actDate :: Activity -> DateString actContent :: Activity -> String data Item Item :: String -> String -> Maybe String -> Maybe [Activity] -> UserID -> String -> String -> Integer -> Integer -> Integer -> Integer -> Bool -> Item itType :: Item -> String itId :: Item -> String itTitle :: Item -> Maybe String itActivity :: Item -> Maybe [Activity] itOwner :: Item -> UserID itSecret :: Item -> String itServer :: Item -> String itComments :: Item -> Integer itViews :: Item -> Integer itPhotos :: Item -> Integer itPrimary :: Item -> Integer itMore :: Item -> Bool data Blog Blog :: BlogID -> String -> Bool -> URLString -> Blog blogId :: Blog -> BlogID blogName :: Blog -> String blogNeedsPW :: Blog -> Bool blogURL :: Blog -> URLString data Photo Photo :: PhotoID -> String -> Maybe User -> String -> Maybe Integer -> Maybe String -> Maybe URLString -> Maybe LicenseID -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Photo photoId :: Photo -> PhotoID photoTitle :: Photo -> String photoOwner :: Photo -> Maybe User photoSecret :: Photo -> String photoServer :: Photo -> Maybe Integer photoFarm :: Photo -> Maybe String photoURL :: Photo -> Maybe URLString photoLicense :: Photo -> Maybe LicenseID photoPublic :: Photo -> Maybe Bool photoFriend :: Photo -> Maybe Bool photoFamily :: Photo -> Maybe Bool data PhotoDetails PhotoDetails :: Photo -> Maybe Int -> Maybe LicenseID -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> PhotoDate -> Maybe (Int, Int) -> Maybe (Bool, Bool) -> Maybe Int -> [Note] -> [TagDetails] -> [URLDetails] -> PhotoDetails photoDetailsPhoto :: PhotoDetails -> Photo photoDetailsRotation :: PhotoDetails -> Maybe Int photoDetailsLicense :: PhotoDetails -> Maybe LicenseID photoDetailsIsFavorite :: PhotoDetails -> Maybe Bool photoDetailsIsPublic :: PhotoDetails -> Maybe Bool photoDetailsIsFamily :: PhotoDetails -> Maybe Bool photoDetailsIsFriend :: PhotoDetails -> Maybe Bool photoDetailsOrigFormat :: PhotoDetails -> Maybe String photoDetailsOrigSecret :: PhotoDetails -> Maybe String photoDetailsTitle :: PhotoDetails -> Maybe String photoDetailsDesc :: PhotoDetails -> Maybe String photoDetailsDates :: PhotoDetails -> PhotoDate photoDetailsPerms :: PhotoDetails -> Maybe (Int, Int) photoDetailsEdits :: PhotoDetails -> Maybe (Bool, Bool) photoDetailsComments :: PhotoDetails -> Maybe Int photoDetailsNotes :: PhotoDetails -> [Note] photoDetailsTags :: PhotoDetails -> [TagDetails] photoDetailsURLs :: PhotoDetails -> [URLDetails] data PhotoSize PhotoSizeSmallSquare :: PhotoSize PhotoSizeThumb :: PhotoSize PhotoSizeSmall :: PhotoSize PhotoSizeMedium :: PhotoSize PhotoSizeLarge :: PhotoSize PhotoSizeOriginal :: PhotoSize data PhotoDate PhotoDate :: DateString -> DateString -> DateString -> Maybe Int -> PhotoDate photoDatePosted :: PhotoDate -> DateString photoDateTaken :: PhotoDate -> DateString photoDateLastUpdate :: PhotoDate -> DateString photoDateGranularity :: PhotoDate -> Maybe Int data Note Note :: NoteID -> UserID -> UserName -> Maybe Point -> Maybe Size -> String -> Note noteId :: Note -> NoteID noteAuthor :: Note -> UserID noteAuthorName :: Note -> UserName notePoint :: Note -> Maybe Point noteSize :: Note -> Maybe Size noteText :: Note -> String data PhotoInfo PhotoLicense :: PhotoInfo PhotoDateUpload :: PhotoInfo PhotoDateTaken :: PhotoInfo PhotoOwnerName :: PhotoInfo PhotoIconServer :: PhotoInfo PhotoOriginalFormat :: PhotoInfo PhotoLastUpdate :: PhotoInfo PhotoGeo :: PhotoInfo PhotoTags :: PhotoInfo PhotoMachineTags :: PhotoInfo PhotoO_Dims :: PhotoInfo PhotoViews :: PhotoInfo PhotoMedia :: PhotoInfo data Photoset Photoset :: PhotoID -> UserID -> PhotoID -> Int -> String -> String -> Photoset photosetId :: Photoset -> PhotoID photosetOwner :: Photoset -> UserID photosetPrimaryPhoto :: Photoset -> PhotoID photosetPhotos :: Photoset -> Int photosetTitle :: Photoset -> String photosetDescription :: Photoset -> String data PhotoPool PhotoPool :: PhotoID -> String -> PhotoPool photoPoolId :: PhotoPool -> PhotoID photoPoolTitle :: PhotoPool -> String data PhotoContext PhotoContext :: Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> PhotoContext photoCtxtPage :: PhotoContext -> Maybe Int photoCtxtPages :: PhotoContext -> Maybe Int photoCtxtPerPage :: PhotoContext -> Maybe Int photoCtxtTotal :: PhotoContext -> Maybe Int data PhotoCount PhotoCount :: Int -> Date -> Date -> PhotoCount photoCount :: PhotoCount -> Int photoCountFrom :: PhotoCount -> Date photoCountTo :: PhotoCount -> Date data MediaType Photos :: MediaType Videos :: MediaType All :: MediaType data Privacy Public :: Privacy Contacts :: Privacy Private :: Bool -> Bool -> Privacy data SortKey SortKey :: String -> AscDesc -> SortKey sortKind :: SortKey -> String sortDir :: SortKey -> AscDesc data AscDesc Asc :: AscDesc Desc :: AscDesc data EXIF EXIF :: EXIFTag -> String -> Maybe String -> Maybe String -> EXIF exifTag :: EXIF -> EXIFTag exifLabel :: EXIF -> String exifRaw :: EXIF -> Maybe String exifClean :: EXIF -> Maybe String data EXIFTag EXIFTag :: Tag -> String -> Tag -> EXIFTag exifTagId :: EXIFTag -> Tag exifTagspace :: EXIFTag -> String exifTagspaceId :: EXIFTag -> Tag data Safety Safe :: Safety Moderate :: Safety Restricted :: Safety showSafety :: Safety -> String type Decimal = String type DateGranularity = Int data ContentType ContentPhoto :: ContentType ContentScreenshot :: ContentType ContentOther :: ContentType showContentType :: ContentType -> String type Latitude = Decimal type Longitude = Decimal type GeoLocation = (Latitude, Longitude, Accuracy) data LocationPlace LocationPlace :: PlaceID -> WhereOnEarthID -> Latitude -> Longitude -> URLString -> PlaceType -> [LocationPlace] -> String -> LocationPlace locationPlaceId :: LocationPlace -> PlaceID locationPlaceWOEId :: LocationPlace -> WhereOnEarthID locationPlaceLat :: LocationPlace -> Latitude locationPlaceLong :: LocationPlace -> Longitude locationPlaceURL :: LocationPlace -> URLString locationPlaceType :: LocationPlace -> PlaceType locationPlaceDetails :: LocationPlace -> [LocationPlace] locationPlaceDesc :: LocationPlace -> String type Accuracy = Int data BoundingBox BoundingBox :: Int -> Int -> Int -> Int -> BoundingBox bboxMinLongitude :: BoundingBox -> Int bboxMinLatitude :: BoundingBox -> Int bboxMaxLongitude :: BoundingBox -> Int bboxMaxLatitude :: BoundingBox -> Int data Size Size :: Int -> Int -> Size sizeW :: Size -> Int sizeH :: Size -> Int data Point Point :: Int -> Int -> Point pointX :: Point -> Int pointY :: Point -> Int data Comment Comment :: CommentID -> User -> Date -> Maybe URLString -> String -> Comment commentId :: Comment -> CommentID commentAuthor :: Comment -> User commentDate :: Comment -> Date commentURL :: Comment -> Maybe URLString commentText :: Comment -> String data Permissions Permissions :: PermissionID -> Bool -> Bool -> Bool -> Int -> Int -> Permissions permId :: Permissions -> PermissionID permIsPublic :: Permissions -> Bool permIsFriend :: Permissions -> Bool permIsFamily :: Permissions -> Bool permCommentLevel :: Permissions -> Int permAddMetaLevel :: Permissions -> Int data Ticket Ticket :: TicketID -> Int -> Bool -> PhotoID -> Ticket ticketId :: Ticket -> TicketID ticketComplete :: Ticket -> Int ticketInvalid :: Ticket -> Bool ticketPhoto :: Ticket -> PhotoID data License License :: LicenseID -> String -> URLString -> License licenseId :: License -> LicenseID licenseName :: License -> String licenseLink :: License -> URLString data PlaceQuery PlaceQuery :: Maybe String -> Maybe Decimal -> Maybe Decimal -> Maybe Accuracy -> Int -> PlaceQuery placeQuery :: PlaceQuery -> Maybe String placeQueryLatitude :: PlaceQuery -> Maybe Decimal placeQueryLongitude :: PlaceQuery -> Maybe Decimal placeQueryAccuracy :: PlaceQuery -> Maybe Accuracy placeTotal :: PlaceQuery -> Int type Threshold = Int type PlaceType = String data Place Place :: PlaceID -> WhereOnEarthID -> Decimal -> Decimal -> URLString -> PlaceType -> String -> Place placeId :: Place -> PlaceID placeWOEId :: Place -> WhereOnEarthID placeLat :: Place -> Decimal placeLong :: Place -> Decimal placeURL :: Place -> URLString placeType :: Place -> PlaceType placeDesc :: Place -> String data GroupCat SubCat :: SubCategory -> GroupCat AGroup :: Group -> GroupCat data Category Category :: String -> Maybe CategoryID -> String -> String -> [GroupCat] -> Category catName :: Category -> String catId :: Category -> Maybe CategoryID catPath :: Category -> String catPaths :: Category -> String catSubs :: Category -> [GroupCat] data Group Group :: GroupID -> String -> Maybe Integer -> Maybe Integer -> Maybe ChatId -> Maybe Integer -> Group groupId :: Group -> GroupID groupName :: Group -> String groupMembers :: Group -> Maybe Integer groupIsOnline :: Group -> Maybe Integer groupChatId :: Group -> Maybe ChatId groupInChat :: Group -> Maybe Integer data SubCategory SubCategory :: CategoryID -> String -> Integer -> SubCategory subCatId :: SubCategory -> CategoryID subName :: SubCategory -> String subCount :: SubCategory -> Integer data FileSize FileSize :: Integer -> Maybe Integer -> FileSize fileSizeBytes :: FileSize -> Integer fileSizeKB :: FileSize -> Maybe Integer data Bandwidth Bandwidth :: Integer -> Maybe Integer -> Integer -> Maybe Integer -> Integer -> Maybe Integer -> Bandwidth bandWidthBytes :: Bandwidth -> Integer bandWidthKB :: Bandwidth -> Maybe Integer bandWidthUsedBytes :: Bandwidth -> Integer bandWidthUsedKB :: Bandwidth -> Maybe Integer bandWidthRemainingBytes :: Bandwidth -> Integer bandWidthRemainingKB :: Bandwidth -> Maybe Integer data PhotosetQuota PhotosetQuota :: Integer -> Maybe Int -> PhotosetQuota photosetCreated :: PhotosetQuota -> Integer photosetRemaining :: PhotosetQuota -> Maybe Int data Cluster Cluster :: [Tag] -> Int -> Cluster clusterTags :: Cluster -> [Tag] clusterCount :: Cluster -> Int data TagDetails TagDetails :: TagID -> UserID -> [String] -> String -> Maybe Int -> Maybe Int -> TagDetails tagDetailsId :: TagDetails -> TagID tagDetailsAuthor :: TagDetails -> UserID tagDetailsRaw :: TagDetails -> [String] tagDetailsName :: TagDetails -> String tagDetailsCount :: TagDetails -> Maybe Int tagDetailsScore :: TagDetails -> Maybe Int data URLDetails URLDetails :: URLString -> String -> URLDetails urlDetailsURL :: URLDetails -> URLString urlDetailsType :: URLDetails -> String data Filter Friends :: Filter Family :: Filter Both :: Filter Neither :: Filter data Contact Contact :: String -> User -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Contact conId :: Contact -> String conUser :: Contact -> User conIcon :: Contact -> Maybe Bool conIsFriend :: Contact -> Maybe Bool conIsFamily :: Contact -> Maybe Bool conIgnored :: Contact -> Maybe Bool data SizeDetails SizeDetails :: String -> Int -> Int -> URLString -> URLString -> SizeDetails sizeDetailsLabel :: SizeDetails -> String sizeDetailsWidth :: SizeDetails -> Int sizeDetailsHeight :: SizeDetails -> Int sizeDetailsSource :: SizeDetails -> URLString sizeDetailsURL :: SizeDetails -> URLString instance Enum ContentType instance Enum Safety instance Eq PhotoSize instance Enum PhotoSize instance Show Filter instance Show BoundingBox instance Show SortKey instance Show AscDesc instance Enum Privacy instance Show MediaType instance Show PhotoInfo -- | Monadic layer for supporting flickr.com interactions. module Flickr.Monad data FM a FM :: (FMEnv -> IO a) -> FM a data FMEnv FMEnv :: APIKey -> Bool -> Bool -> Maybe Int -> Maybe Int -> Bool -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> FMEnv fm_api_key :: FMEnv -> APIKey fm_is_signed :: FMEnv -> Bool fm_post_method :: FMEnv -> Bool fm_per_page :: FMEnv -> Maybe Int fm_page :: FMEnv -> Maybe Int fm_is_paged :: FMEnv -> Bool fm_perm_level :: FMEnv -> Maybe String fm_auth_token :: FMEnv -> Maybe String fm_auth_mini_token :: FMEnv -> Maybe String fm_api_base :: FMEnv -> Maybe String liftIO :: IO a -> FM a flick :: FM a -> IO a flickAPI :: APIKey -> FM a -> IO a withAPIKey :: APIKey -> FM a -> FM a getAPIKey :: FM APIKey withSharedSecret :: String -> FM a -> FM a withAuthToken :: String -> FM a -> FM a withAuthMiniToken :: String -> FM a -> FM a getAuthToken :: FM String getAuthMiniToken :: FM String withPageSize :: Int -> FM a -> FM a pagedCall :: Maybe Int -> FM a -> FM a signedMethod :: FM a -> FM a withReadPerm :: FM a -> FM a withWritePerm :: FM a -> FM a withDeletePerm :: FM a -> FM a postMethod :: FM a -> FM a withBase :: URLString -> FM a -> FM a getBaseURL :: FM URLString getMobileAuthURL :: FM URLString api_base :: URLString auth_base :: URLString upload_base :: URLString replace_base :: URLString flickTranslate :: (String -> ErrM a) -> FM String -> FM a flickCall_ :: String -> [(String, String)] -> FM () mbArg :: String -> Maybe String -> [(String, String)] -> [(String, String)] eiArg :: String -> String -> Either String String -> [(String, String)] -> [(String, String)] lsArg :: String -> [String] -> [(String, String)] -> [(String, String)] flickrCall :: String -> [(String, String)] -> FM String flickCall :: String -> [(String, String)] -> FM String mkLoginURL :: String -> String -> FM String genLoginURL :: String -> String -> String -> String -> String restGet :: String -> [(String, String)] -> IO String restPost :: String -> [(String, String)] -> IO String type ErrM a = Either FlickErr a data FlickErr FlickErr :: Int -> FlickErrorType -> String -> Maybe String -> String -> FlickErr flickErrorCode :: FlickErr -> Int flickErrorType :: FlickErr -> FlickErrorType flickErrorMsg :: FlickErr -> String flickErrorLoc :: FlickErr -> Maybe String flickErrorSource :: FlickErr -> String data SomeFlickException SomeFlickException :: e -> SomeFlickException flickToException :: (Exception e) => e -> SomeException flickFromException :: (Exception e) => SomeException -> Maybe e handleFlickr :: (FlickErr -> FM a) -> FM a -> FM a tryFlick :: FM a -> FM (Either FlickErr a) throwFlickErr :: FlickErr -> FM a catchFlickr :: FM a -> (FlickErr -> FM a) -> FM a flickError :: FlickErr data FlickErrorType UnexpectedResponse :: FlickErrorType MissingStatus :: FlickErrorType EmptyResponse :: FlickErrorType IllformedError :: FlickErrorType FlickParseError :: FlickErrorType FlickrAPIError :: FlickErrorType parseDoc :: (Element -> Maybe a) -> String -> ErrM a checkResponse :: String -> ErrM Element instance Typeable SomeFlickException instance Typeable FlickErr instance Eq FlickErrorType instance Show FlickErrorType instance Show FlickErr instance Exception FlickErr instance Exception SomeFlickException instance Show SomeFlickException instance Monad FM -- | Translating XML responses into Haskell type representations of the -- Flickr API resourcesentitiestypes. module Flickr.Types.Import toAuthFrob :: String -> ErrM AuthFrob eltAuthFrob :: Element -> Maybe AuthFrob toAuthToken :: String -> ErrM AuthToken eltAuthToken :: Element -> Maybe AuthToken toUser :: String -> ErrM User eltUser :: Element -> Maybe User toGroupList :: String -> ErrM [Group] eltGroupList :: Element -> Maybe [Group] toGroup :: String -> ErrM Group eltGroup :: Element -> Maybe Group toPlaces :: String -> ErrM (PlaceQuery, [Place]) toPlacesList :: String -> ErrM [Place] eltPlaceQuery :: Element -> Maybe PlaceQuery eltPlaces :: Element -> Maybe (PlaceQuery, [Place]) eltPlacesList :: Element -> Maybe [Place] eltPlace :: Element -> Maybe Place toBlogs :: String -> ErrM [Blog] eltBlogsList :: Element -> Maybe [Blog] eltBlog :: Element -> Maybe Blog toLocationPlace :: String -> ErrM LocationPlace eltLocationPlace :: Element -> Maybe LocationPlace toContentType :: String -> ErrM ContentType eltContentType :: Element -> Maybe ContentType toPrivacy :: String -> String -> ErrM Privacy eltPrivacy :: String -> Element -> Maybe Privacy toBool :: String -> String -> ErrM Bool eltBool :: String -> Element -> Maybe Bool toSafetyLevel :: String -> String -> ErrM Int eltIntAttr :: String -> Element -> Maybe Int toString :: String -> String -> ErrM String eltStringAttr :: String -> Element -> Maybe String toItems :: String -> ErrM [Item] eltItems :: Element -> Maybe [Item] eltItem :: Element -> Maybe Item eltActivity :: Element -> Maybe [Activity] eltEvent :: Element -> Maybe Activity toContactList :: String -> ErrM [Contact] eltContactList :: Element -> Maybe [Contact] eltContact :: Element -> Maybe Contact toPhotoList :: String -> ErrM (PhotoContext, [Photo]) toPhotoPair :: String -> ErrM (Photo, Photo) eltPhotoList :: Element -> Maybe (PhotoContext, [Photo]) eltPhotoPair :: Element -> Maybe (Photo, Photo) eltPhoto :: Element -> Maybe Photo eltPhotoContext :: Element -> Maybe PhotoContext toCategory :: String -> ErrM Category eltCategory :: Element -> Maybe Category eltGroupCat :: Element -> Maybe GroupCat eltSubCategory :: Element -> Maybe SubCategory eltBandwidth :: Element -> Maybe Bandwidth eltFileSize :: Element -> Maybe FileSize eltPhotosetQuota :: Element -> Maybe PhotosetQuota toPhotoset :: String -> ErrM Photoset eltPhotoset :: Element -> Maybe Photoset toPhotoPool :: String -> ErrM PhotoPool eltPhotoPool :: Element -> Maybe PhotoPool toPhotoDetails :: String -> ErrM PhotoDetails eltPhotoDetails :: Element -> Maybe PhotoDetails eltPhotoDate :: Element -> Maybe PhotoDate eltNote :: Element -> Maybe Note eltTagDetails :: Element -> Maybe TagDetails eltURLDetails :: Element -> Maybe URLDetails toPhotoCountList :: String -> ErrM [PhotoCount] eltPhotoCountList :: Element -> Maybe [PhotoCount] eltPhotoCount :: Element -> Maybe PhotoCount toEXIFList :: String -> ErrM [EXIF] eltEXIFList :: Element -> Maybe [EXIF] eltEXIF :: Element -> Maybe EXIF toPermissions :: String -> ErrM Permissions eltPermissions :: Element -> Maybe Permissions toSizeList :: String -> ErrM [SizeDetails] eltSizeList :: Element -> Maybe [SizeDetails] eltSize :: Element -> Maybe SizeDetails toPhotoID :: String -> ErrM PhotoID eltPhotoID :: Element -> Maybe PhotoID toCommentID :: String -> ErrM CommentID eltCommentID :: Element -> Maybe CommentID toNoteID :: String -> ErrM NoteID eltNoteID :: Element -> Maybe NoteID toCommentList :: String -> ErrM [Comment] eltCommentList :: Element -> Maybe [Comment] eltComment :: Element -> Maybe Comment toGeoLocation :: String -> ErrM GeoLocation eltGeoLocation :: Element -> Maybe GeoLocation toLicenseList :: String -> ErrM [License] eltLicenseList :: Element -> Maybe [License] eltLicense :: Element -> Maybe License toTicketList :: String -> ErrM [Ticket] eltTicketList :: Element -> Maybe [Ticket] eltTicket :: Element -> Maybe Ticket toClusterList :: String -> ErrM [Cluster] eltClusterList :: Element -> Maybe [Cluster] eltCluster :: Element -> Maybe Cluster toTagDetailsList :: String -> ErrM [TagDetails] eltTagDetailsList :: Element -> Maybe [TagDetails] -- | Binding to flickr.auth's (signed) API module Flickr.Auth -- | Returns a frob to be used during authentication. This method call must -- be signed. getFrob :: FM AuthFrob -- | Returns the credentials attached to an authentication token. This call -- must be signed as specified in the authentication API spec. checkToken :: AuthTokenValue -> FM AuthToken getFullToken :: AuthMiniToken -> FM AuthToken -- | Returns the auth token for the given frob, if one has been attached. -- This method call must be signed. getToken :: AuthFrob -> FM AuthToken -- | flickr.activity, methods for accessing comments and activity for a -- user. module Flickr.Activity -- | Returns a list of recent activity on photos commented on by the -- calling user. userComments :: FM [Item] -- | Returns a list of recent activity on photos belonging to the calling -- user. userPhotos :: Maybe Integer -> FM [Item] -- | flickr.blogs API, accessing a user's blogs + post photos to them. module Flickr.Blogs -- | Get a list of configured blogs for the calling user. getList :: FM [Blog] -- | Post a photo to the given blog. postPhoto :: BlogID -> PhotoID -> String -> String -> Maybe String -> FM () -- | flickr.contacts API, fetching a user's contact list. module Flickr.Contacts -- | Get a list of contacts for the calling user. getList :: Maybe Filter -> FM [Contact] -- | Get the contact list for a user. getPublicList :: UserID -> FM [Contact] -- | flickr.favorites API, managing a user's favorite photos. module Flickr.Favorites -- | Adds a photo to a user's favorites list. add :: PhotoID -> FM () -- | Removes a photo from a user's favorites list. remove :: PhotoID -> FM () -- | Returns a list of the user's favorite photos. Only photos which the -- calling user has permission to see are returned. getList :: Maybe UserID -> [PhotoInfo] -> FM (PhotoContext, [Photo]) -- | Returns a list of favorite public photos for the given user. getPublicList :: UserID -> [PhotoInfo] -> FM (PhotoContext, [Photo]) -- | flickr.groups API, traversing photo categories and groups. module Flickr.Groups browse :: Maybe CategoryID -> FM Category getInfo :: GroupID -> Maybe String -> FM Group search :: String -> FM [Group] -- | flickr.groups.pools API, manage photo group pooling. module Flickr.Groups.Pools -- | Add a photo to a group's pool. add :: PhotoID -> GroupID -> FM () -- | Returns next and previous photos for a photo in a group pool. getContext :: PhotoID -> GroupID -> FM (Photo, Photo) -- | Returns a list of groups to which you can add photos. getGroups :: FM [Group] -- | Returns a list of pool photos for a given group, based on the -- permissions of the group and the user logged in (if any). getPhotos :: GroupID -> [Tag] -> Maybe UserID -> [PhotoInfo] -> FM [Photo] -- | Remove a photo from a group pool. remove :: PhotoID -> GroupID -> FM () -- | Fetch ranked photos by Flickr interest level. module Flickr.Interestingness -- | Returns the list of interesting photos for the most recent day or a -- user-specified date. getList :: Maybe DateString -> [PhotoInfo] -> FM [Photo] -- | flickr.prefs API, accessing a user's preferences. module Flickr.Prefs -- | Returns the default content type preference for the user. getContentType :: FM ContentType -- | Returns the default privacy level for geographic information attached -- to the user's photos. getGeoPerms :: FM Privacy -- | Returns the default hidden preference for the user. getHidden :: FM Bool -- | Returns the default privacy level preference for the user. getPrivacy :: FM Privacy -- | Returns the default safety level preference for the user. getSafetyLevel :: FM Int -- | flickr.people API, accessing a user's attributes etc. -- http://www.flickr.com/services/api/ module Flickr.People -- | Return a user's NSID, given their email address findByEmail :: String -> FM User -- | Return a user's NSID, given their username. findByUsername :: UserName -> FM User -- | Get information about a user. getInfo :: UserID -> Bool -> FM User -- | Returns the list of public groups a user is a member of. getPublicGroups :: UserID -> FM [Group] -- | Get a list of public photos for the given user. getPublicPhotos :: UserID -> Maybe Safety -> [PhotoInfo] -> FM [Photo] -- | Returns information for the calling user related to photo uploads. getUploadStatus :: FM (User, Bandwidth, FileSize, PhotosetQuota) -- | flickr.photos API, searching, managing and access a user's photos. -- http://www.flickr.com/services/api/ module Flickr.Photos -- | Add tags to a photo. addTags :: PhotoID -> [Tag] -> FM () -- | Delete a photo from flickr. delete :: PhotoID -> FM () -- | Returns all visible sets and pools the photo belongs to. getAllContexts :: PhotoID -> FM ([Photoset], [PhotoPool]) -- | Fetch a list of recent photos from the calling users' contacts. getContactsPhotos :: Maybe Int -> Maybe Bool -> Maybe Bool -> Maybe Bool -> [PhotoInfo] -> FM [Photo] -- | Fetch a list of recent public photos from a users' contacts. getContactsPublicPhotos :: Maybe Int -> Maybe Bool -> Maybe Bool -> Maybe Bool -> [PhotoInfo] -> FM [Photo] -- | Fetch a list of recent photos from the calling users' contacts. getContext :: PhotoID -> FM (Photo, Photo) -- | Gets a list of photo counts for the given date ranges for the calling -- user. getCounts :: [DateString] -> [DateString] -> FM [PhotoCount] -- | Retrieves a list of EXIFTIFFGPS tags for a given photo. The -- calling user must have permission to view the photo. getExif :: PhotoID -> Maybe String -> FM [EXIF] -- | Returns the list of people who have favorited a given photo. getFavorites :: PhotoID -> FM [(User, Date)] -- | Get information about a photo. The calling user must have permission -- to view the photo. getInfo :: PhotoID -> Maybe String -> FM PhotoDetails -- | Returns a list of your photos that are not part of any sets. getNotInSet :: Maybe DateInterval -> Maybe DateInterval -> Maybe Privacy -> Maybe MediaType -> [PhotoInfo] -> FM [Photo] -- | Get permissions for a photo. getPerms :: PhotoID -> FM Permissions -- | Returns a list of the latest public photos uploaded to flickr. getRecent :: [PhotoInfo] -> FM [Photo] -- | Returns the available sizes for a photo. The calling user must have -- permission to view the photo. getSizes :: PhotoID -> FM [SizeDetails] -- | Returns a list of your photos with no tags. getUntagged :: Maybe DateInterval -> Maybe DateInterval -> Maybe Privacy -> Maybe MediaType -> [PhotoInfo] -> FM [Photo] -- | Returns a list of your geo-tagged photos. getWithGeoData :: Maybe DateInterval -> Maybe DateInterval -> Maybe Privacy -> Maybe SortKey -> Maybe MediaType -> [PhotoInfo] -> FM [Photo] -- | Returns a list of your photos which haven't been geo-tagged. getWithoutGeoData :: Maybe DateInterval -> Maybe DateInterval -> Maybe Privacy -> Maybe SortKey -> Maybe MediaType -> [PhotoInfo] -> FM [Photo] -- | Return a list of your photos that have been recently created or which -- have been recently modified. Recently modified may mean that the -- photo's metadata (title, description, tags) may have been changed or a -- comment has been added (or just modified somehow :-) recentlyUpdated :: DateString -> [PhotoInfo] -> FM (PhotoContext, [Photo]) -- | Remove a tag from a photo. removeTag :: Tag -> FM () -- | Return a list of photos matching some criteria. Only photos visible to -- the calling user will be returned. To return private or semi-private -- photos, the caller must be authenticated with read permissions, -- and have permission to view the photos. Unauthenticated calls will -- only return public photos. search :: Maybe UserID -> SearchConstraints -> [PhotoInfo] -> FM (PhotoContext, [Photo]) data SearchConstraints SearchConstraints :: [Tag] -> Maybe Bool -> Maybe String -> Maybe DateInterval -> Maybe DateInterval -> Maybe [LicenseID] -> Maybe SortKey -> Maybe Privacy -> Maybe BoundingBox -> Maybe Accuracy -> Maybe Safety -> Maybe ContentType -> [Tag] -> Maybe Bool -> Maybe GroupID -> Maybe Bool -> Maybe WhereOnEarthID -> Maybe PlaceID -> Maybe MediaType -> Maybe Bool -> Maybe Decimal -> Maybe Decimal -> Maybe Decimal -> Maybe String -> SearchConstraints s_tags :: SearchConstraints -> [Tag] s_tag_mode :: SearchConstraints -> Maybe Bool s_text :: SearchConstraints -> Maybe String s_upload :: SearchConstraints -> Maybe DateInterval s_taken :: SearchConstraints -> Maybe DateInterval s_license :: SearchConstraints -> Maybe [LicenseID] s_sort :: SearchConstraints -> Maybe SortKey s_privacy :: SearchConstraints -> Maybe Privacy s_bbox :: SearchConstraints -> Maybe BoundingBox s_accuracy :: SearchConstraints -> Maybe Accuracy s_safe_search :: SearchConstraints -> Maybe Safety s_content_type :: SearchConstraints -> Maybe ContentType s_machine_tags :: SearchConstraints -> [Tag] s_machine_tag_mode :: SearchConstraints -> Maybe Bool s_group_id :: SearchConstraints -> Maybe GroupID s_contacts :: SearchConstraints -> Maybe Bool s_woe_id :: SearchConstraints -> Maybe WhereOnEarthID s_place_id :: SearchConstraints -> Maybe PlaceID s_media :: SearchConstraints -> Maybe MediaType s_has_geo :: SearchConstraints -> Maybe Bool s_lat :: SearchConstraints -> Maybe Decimal s_lon :: SearchConstraints -> Maybe Decimal s_radius :: SearchConstraints -> Maybe Decimal s_radius_units :: SearchConstraints -> Maybe String nullSearchConstraints :: SearchConstraints -- | Set the content type of a photo. setContentType :: PhotoID -> ContentType -> FM () -- | Set one or both of the dates for a photo. setDates :: PhotoID -> Maybe DateString -> Maybe DateString -> Maybe DateGranularity -> FM () -- | Set the meta information for a photo. setMeta :: PhotoID -> Title -> Description -> FM () -- | Set permissions for a photo. setPerms :: PhotoID -> Permissions -> FM () -- | Set the safety level of a photo. setSafetyLevel :: PhotoID -> Maybe Safety -> Maybe Bool -> FM () -- | Set the tags for a photo. setTags :: PhotoID -> [Tag] -> FM () -- | locate the URL for the photo..local, non-Flickr, helper function. -- Returns '<unknown>' if cannot be located. getPhotoURL :: PhotoDetails -> URLString -- | flickr.photos.comments API, setting/getting photo comments. module Flickr.Photos.Comments -- | Add comment to a photo as the currently authenticated user. addComment :: PhotoID -> String -> FM CommentID -- | Delete a comment as the currently authenticated user. deleteComment :: CommentID -> FM () -- | Edit the text of a comment as the currently authenticated user. editComment :: CommentID -> String -> FM () -- | Returns the comments for a photo. getList :: PhotoID -> FM [Comment] -- | flickr.photos.geo API, setting/getting photo geo location. module Flickr.Photos.Geo -- | Get the geo data (latitude and longitude and the accuracy level) for a -- photo. getLocation :: PhotoID -> FM GeoLocation -- | Get permissions for who may view geo data for a photo. getPerms :: PhotoID -> FM Permissions -- | Removes the geo data associated with a photo. removeLocation :: PhotoID -> FM () -- | Sets the geo data (latitude and longitude and, optionally, the -- accuracy level) for a photo. Before users may assign location data to -- a photo they must define who, by default, may view that information. -- Users can edit this preference at -- http:www.flickr.comaccountgeoprivacy. If a user -- has not set this preference, the API method will return an error. setLocation :: PhotoID -> GeoLocation -> FM () -- | Set the permission for who may view the geo data associated with a -- photo. setPerms :: PhotoID -> Permissions -> FM () -- | flickr.photos.upload API, check status of upload API initiated -- actions. module Flickr.Photos.Upload -- | Checks the status of one or more asynchronous photo upload tickets. checkTickets :: [TicketID] -> FM [Ticket] -- | Upload a photo, returning an upload id/ticket. uploadPhoto :: FilePath -> Maybe String -> Maybe String -> [Tag] -> UploadAttr -> FM PhotoID data UploadAttr UploadAttr :: Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Safety -> Maybe ContentType -> Maybe Bool -> UploadAttr uploadPublic :: UploadAttr -> Maybe Bool uploadFriend :: UploadAttr -> Maybe Bool uploadFamily :: UploadAttr -> Maybe Bool uploadSafety :: UploadAttr -> Maybe Safety uploadContentType :: UploadAttr -> Maybe ContentType uploadHidden :: UploadAttr -> Maybe Bool nullUploadAttr :: UploadAttr -- | Upload a photo, returning an upload id/ticket. replacePhoto :: FilePath -> PhotoID -> Maybe Bool -> FM (String, String, PhotoID) -- | flickr.photos.transform API, rotation only right now. module Flickr.Photos.Transform -- | Rotate a photo. rotate :: PhotoID -> Latitude -> FM () -- | flickr.photos.notes API, managing a user's photo annotations. module Flickr.Photos.Notes -- | Add a note to a photo. Coordinates and sizes are in pixels, based on -- the 500px image size shown on individual photo pages. add :: PhotoID -> Point -> Size -> String -> FM NoteID -- | Delete a note from a photo. delete :: NoteID -> FM () -- | Edit a note on a photo. Coordinates and sizes are in pixels, based on -- the 500px image size shown on individual photo pages. edit :: NoteID -> Point -> Size -> String -> FM () -- | flickr.photos.licenses API, setting/getting photo licensing. module Flickr.Photos.Licenses -- | Fetches a list of available photo licenses for Flickr. getInfo :: FM [License] -- | Sets the license for a photo. setLicense :: PhotoID -> LicenseID -> FM () -- | flickr.photosets API, navigating and managing photo sets. module Flickr.Photosets -- | Add a photo to the end of an existing photoset. addPhoto :: PhotosetID -> PhotoID -> FM () -- | Create a new photoset for the calling user. create :: String -> Maybe String -> PhotoID -> FM Photoset -- | Delete a photoset. delete :: PhotosetID -> FM () -- | Modify the meta-data for a photoset. editMeta :: PhotosetID -> String -> Maybe String -> FM () -- | Modify the photos in a photoset. Use this method to add, remove and -- re-order photos. editPhotos :: PhotosetID -> PhotoID -> [PhotoID] -> FM () -- | Returns next and previous photos for a photo in a set. getContext :: PhotosetID -> PhotoID -> FM (Photo, Photo) -- | Gets information about a photoset. getInfo :: PhotosetID -> FM Photoset -- | Returns the photosets belonging to the specified user. getList :: Maybe UserID -> FM (Bool, [Photoset]) -- | Get the list of photos in a set. getPhotos :: PhotosetID -> [PhotoInfo] -> Maybe Privacy -> Maybe MediaType -> FM Photoset -- | Set the order of photosets for the calling user. orderSets :: [PhotosetID] -> FM () -- | Remove a photo from a photoset. removePhoto :: PhotosetID -> PhotoID -> FM () -- | flickr.photosets.comments API, manage comments on photo sets. module Flickr.Photosets.Comments -- | Add a comment to a photoset. addComment :: PhotosetID -> String -> FM CommentID -- | Delete a photoset comment as the currently authenticated user. deleteComment :: CommentID -> FM () -- | Edit the text of a comment as the currently authenticated user. editComment :: CommentID -> String -> FM () -- | Returns the comments for a photoset. getList :: PhotosetID -> FM [Comment] -- | flickr.places API, locating photos by places and geo. module Flickr.Places -- | Return a list of place IDs for a query string. The flickr.places.find -- method is not a geocoder. It will round up to the nearest place type -- to which place IDs apply. For example, if you pass it a street level -- address it will return the city that contains the address rather than -- the street, or building, itself. find :: String -> FM (PlaceQuery, [Place]) -- | Return a place ID for a latitude, longitude and accuracy triple. -- -- The flickr.places.findByLatLon method is not meant to be a (reverse) -- geocoder in the traditional sense. It is designed to allow users to -- find photos for places and will round up to the nearest place -- type to which corresponding place IDs apply. -- -- For example, if you pass it a street level coordinate it will return -- the city that contains the point rather than the street, or building, -- itself. -- -- It will also truncate latitudes and longitudes to three decimal -- points. findByLatLon :: Latitude -> Longitude -> Maybe Accuracy -> FM (PlaceQuery, [Place]) -- | Return a list of locations with public photos that are parented by a -- Where on Earth (WOE) or Places ID. getChildrenWithPhotosPublic :: Either PlaceID WhereOnEarthID -> FM (PlaceQuery, [Place]) -- | Lookup information about a place, by its flickr.com/places URL. getInfoByUrl :: URLString -> FM LocationPlace -- | Get informations about a place. getInfo :: Either PlaceID WhereOnEarthID -> FM LocationPlace -- | Return a list of the top 100 unique places clustered by a given -- placetype for a user. placesForUser :: PlaceType -> Maybe WhereOnEarthID -> Maybe PlaceID -> Maybe Threshold -> FM [Place] -- | Find Flickr Places information by Place Id. resolvePlaceId :: PlaceID -> FM LocationPlace -- | Find Flickr Places information by Place URL. resolvePlaceURL :: URLString -> FM LocationPlace -- | The flickr.tags API, fetching photos by tag or cluster membership. module Flickr.Tags -- | Returns the first 24 photos for a given tag cluster. getClusterPhotos :: TagID -> ClusterID -> FM (PhotoContext, [Photo]) -- | Gives you a list of tag clusters for the given tag. getClusters :: Tag -> FM [Cluster] -- | Returns a list of hot tags for the given period. getHotList :: Maybe DayWeek -> Maybe Int -> FM [TagDetails] -- | Get the tag list for a given photo. getListPhoto :: PhotoID -> FM [TagDetails] -- | Get the tag list for a given user (or the currently logged in user). getListUser :: Maybe UserID -> FM [TagDetails] -- | Get the popular tags for a given user (or the currently logged in -- user). getListUserPopular :: Maybe UserID -> Maybe Int -> FM [TagDetails] -- | Get the raw versions of a given tag (or all tags) for the currently -- logged-in user. getListUserRaw :: Maybe Tag -> FM [TagDetails] -- | Returns a list of tags related to the given tag, based on -- clustered usage analysis. getRelated :: Tag -> FM [TagDetails] -- | flickr.test API, kicking the tires for method calls and auth of these. module Flickr.Test -- | A testing method which echo's all parameters back in the response. echo :: [(String, String)] -> FM [(String, String)] -- | A testing method which checks if the caller is logged in then returns -- their username. login :: FM User -- | Null test nullTest :: FM () -- | The 'flickr.urls' API + convenience functions for creating URL strings -- to various Flickr std-format URLs. module Flickr.URLs -- | Returns the url to a group's page. getGroup :: GroupID -> FM URLString -- | Returns the url to a user's photos. getUserPhotos :: Maybe UserID -> FM URLString -- | Returns the url to a user's profile. getUserProfile :: Maybe UserID -> FM URLString -- | Returns a group NSID, given the url to a group's page or photo pool. lookupGroup :: URLString -> FM Group -- | Returns a user NSID, given the url to a user's photos or profile. lookupUser :: URLString -> FM User photoSourceURL :: PhotoDetails -> PhotoSize -> URLString userProfilePageURL :: User -> URLString userPhotoStreamURL :: User -> URLString userPhotoURL :: User -> PhotoID -> URLString userPhotosetsURL :: User -> URLString userPhotosetURL :: User -> PhotosetID -> URLString module Util.Authenticate -- | authenticate the 'web application' way; obtain a so-called frob, -- generate a URL for the user to authorize access via. Once the user has -- done so, resolve the full token by performing action. authenticateForWeb :: String -> FM (Maybe (URLString, FM AuthToken)) -- | Authenticate the 'mobile application' way; emit an authentication URL -- for the mobile application along with an action that takes a -- authentication 'mini-token' to resolve into a full token. The -- mini-token is either something the application stores (as a secret), -- or for the first time around, by having the user write down the -- mini-token 9-digit (format is xxx-yyy-zzz) string and input that to -- the application through its UI. authenticateForMobile :: String -> FM (Maybe (URLString, String -> FM AuthToken)) module Flickr.API