-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Access to the Pinboard API
--   
--   The Pinboard API is a way to interact programatically with your
--   bookmarks, notes and other Pinboard data. This library wraps the API
--   exposing functions and data structures suitable for usage in Haskell
--   programs.
@package pinboard
@version 0.9.12.10


module Pinboard.ApiTypes
data Posts
Posts :: !UTCTime -> !Text -> [Post] -> Posts
[postsDate] :: Posts -> !UTCTime
[postsUser] :: Posts -> !Text
[postsPosts] :: Posts -> [Post]
data Post
Post :: !Text -> !Text -> !Text -> !Text -> !Text -> !UTCTime -> !Bool -> !Bool -> [Tag] -> Post
[postHref] :: Post -> !Text
[postDescription] :: Post -> !Text
[postExtended] :: Post -> !Text
[postMeta] :: Post -> !Text
[postHash] :: Post -> !Text
[postTime] :: Post -> !UTCTime
[postShared] :: Post -> !Bool
[postToRead] :: Post -> !Bool
[postTags] :: Post -> [Tag]
boolFromYesNo :: Text -> Bool
boolToYesNo :: Bool -> Text
data PostDates
PostDates :: !Text -> !Text -> [(Day, Int)] -> PostDates
[postDatesUser] :: PostDates -> !Text
[postDatesTag] :: PostDates -> !Text
[postDatesCount] :: PostDates -> [(Day, Int)]
type DateCount = (Day, Int)
data NoteList
NoteList :: !Int -> [NoteListItem] -> NoteList
[noteListCount] :: NoteList -> !Int
[noteListItems] :: NoteList -> [NoteListItem]
data NoteListItem
NoteListItem :: !Text -> !Text -> !Text -> !Int -> !UTCTime -> !UTCTime -> NoteListItem
[noteListItemId] :: NoteListItem -> !Text
[noteListItemHash] :: NoteListItem -> !Text
[noteListItemTitle] :: NoteListItem -> !Text
[noteListItemLength] :: NoteListItem -> !Int
[noteListItemCreatedAt] :: NoteListItem -> !UTCTime
[noteListItemUpdatedAt] :: NoteListItem -> !UTCTime
data Note
Note :: !Text -> !Text -> !Text -> !Text -> !Int -> !UTCTime -> !UTCTime -> Note
[noteId] :: Note -> !Text
[noteHash] :: Note -> !Text
[noteTitle] :: Note -> !Text
[noteText] :: Note -> !Text
[noteLength] :: Note -> !Int
[noteCreatedAt] :: Note -> !UTCTime
[noteUpdatedAt] :: Note -> !UTCTime
readNoteTime :: Monad m => String -> m UTCTime
showNoteTime :: UTCTime -> String
type TagMap = HashMap Tag Int
newtype JsonTagMap
ToJsonTagMap :: TagMap -> JsonTagMap
[fromJsonTagMap] :: JsonTagMap -> TagMap
data Suggested
Popular :: [Text] -> Suggested
Recommended :: [Text] -> Suggested
newtype DoneResult
ToDoneResult :: () -> DoneResult
[fromDoneResult] :: DoneResult -> ()
newtype TextResult
ToTextResult :: Text -> TextResult
[fromTextResult] :: TextResult -> Text
newtype UpdateTime
ToUpdateTime :: UTCTime -> UpdateTime
[fromUpdateTime] :: UpdateTime -> UTCTime

-- | as defined by RFC 3986. Allowed schemes are http, https, javascript,
--   mailto, ftp and file. The Safari-specific feed scheme is allowed but
--   will be treated as a synonym for http.
type Url = Text

-- | up to 255 characters long
type Description = Text

-- | up to 65536 characters long. Any URLs will be auto-linkified when
--   displayed.
type Extended = Text

-- | up to 255 characters. May not contain commas or whitespace.
type Tag = Text
type Old = Tag
type New = Tag
type Count = Int
type NumResults = Int
type StartOffset = Int
type Shared = Bool
type Replace = Bool
type ToRead = Bool

-- | UTC date in this format: 2010-12-11. Same range as datetime above
type Date = Day

-- | UTC timestamp in this format: 2010-12-11T19:48:02Z. Valid date range
--   is Jan 1, 1 AD to January 1, 2100 (but see note below about future
--   timestamps).
type DateTime = UTCTime
type FromDateTime = DateTime
type ToDateTime = DateTime
type Meta = Int
type NoteId = Text
instance GHC.Classes.Ord Pinboard.ApiTypes.Posts
instance GHC.Generics.Generic Pinboard.ApiTypes.Posts
instance Data.Data.Data Pinboard.ApiTypes.Posts
instance GHC.Classes.Eq Pinboard.ApiTypes.Posts
instance GHC.Show.Show Pinboard.ApiTypes.Posts
instance GHC.Classes.Ord Pinboard.ApiTypes.Post
instance GHC.Generics.Generic Pinboard.ApiTypes.Post
instance Data.Data.Data Pinboard.ApiTypes.Post
instance GHC.Classes.Eq Pinboard.ApiTypes.Post
instance GHC.Show.Show Pinboard.ApiTypes.Post
instance GHC.Generics.Generic Pinboard.ApiTypes.JsonTagMap
instance Data.Data.Data Pinboard.ApiTypes.JsonTagMap
instance GHC.Classes.Eq Pinboard.ApiTypes.JsonTagMap
instance GHC.Show.Show Pinboard.ApiTypes.JsonTagMap
instance GHC.Classes.Ord Pinboard.ApiTypes.UpdateTime
instance GHC.Generics.Generic Pinboard.ApiTypes.UpdateTime
instance Data.Data.Data Pinboard.ApiTypes.UpdateTime
instance GHC.Classes.Eq Pinboard.ApiTypes.UpdateTime
instance GHC.Show.Show Pinboard.ApiTypes.UpdateTime
instance GHC.Classes.Ord Pinboard.ApiTypes.TextResult
instance GHC.Generics.Generic Pinboard.ApiTypes.TextResult
instance Data.Data.Data Pinboard.ApiTypes.TextResult
instance GHC.Classes.Eq Pinboard.ApiTypes.TextResult
instance GHC.Show.Show Pinboard.ApiTypes.TextResult
instance GHC.Classes.Ord Pinboard.ApiTypes.DoneResult
instance GHC.Generics.Generic Pinboard.ApiTypes.DoneResult
instance Data.Data.Data Pinboard.ApiTypes.DoneResult
instance GHC.Classes.Eq Pinboard.ApiTypes.DoneResult
instance GHC.Show.Show Pinboard.ApiTypes.DoneResult
instance GHC.Classes.Ord Pinboard.ApiTypes.Suggested
instance GHC.Generics.Generic Pinboard.ApiTypes.Suggested
instance Data.Data.Data Pinboard.ApiTypes.Suggested
instance GHC.Classes.Eq Pinboard.ApiTypes.Suggested
instance GHC.Show.Show Pinboard.ApiTypes.Suggested
instance GHC.Classes.Ord Pinboard.ApiTypes.Note
instance GHC.Generics.Generic Pinboard.ApiTypes.Note
instance Data.Data.Data Pinboard.ApiTypes.Note
instance GHC.Classes.Eq Pinboard.ApiTypes.Note
instance GHC.Show.Show Pinboard.ApiTypes.Note
instance GHC.Classes.Ord Pinboard.ApiTypes.NoteList
instance GHC.Generics.Generic Pinboard.ApiTypes.NoteList
instance Data.Data.Data Pinboard.ApiTypes.NoteList
instance GHC.Classes.Eq Pinboard.ApiTypes.NoteList
instance GHC.Show.Show Pinboard.ApiTypes.NoteList
instance GHC.Classes.Ord Pinboard.ApiTypes.NoteListItem
instance GHC.Generics.Generic Pinboard.ApiTypes.NoteListItem
instance Data.Data.Data Pinboard.ApiTypes.NoteListItem
instance GHC.Classes.Eq Pinboard.ApiTypes.NoteListItem
instance GHC.Show.Show Pinboard.ApiTypes.NoteListItem
instance GHC.Classes.Ord Pinboard.ApiTypes.PostDates
instance GHC.Generics.Generic Pinboard.ApiTypes.PostDates
instance Data.Data.Data Pinboard.ApiTypes.PostDates
instance GHC.Classes.Eq Pinboard.ApiTypes.PostDates
instance GHC.Show.Show Pinboard.ApiTypes.PostDates
instance Data.Aeson.Types.FromJSON.FromJSON Pinboard.ApiTypes.Posts
instance Data.Aeson.Types.ToJSON.ToJSON Pinboard.ApiTypes.Posts
instance Data.Aeson.Types.FromJSON.FromJSON Pinboard.ApiTypes.Post
instance Data.Aeson.Types.ToJSON.ToJSON Pinboard.ApiTypes.Post
instance Data.Aeson.Types.FromJSON.FromJSON Pinboard.ApiTypes.JsonTagMap
instance Data.Aeson.Types.ToJSON.ToJSON Pinboard.ApiTypes.JsonTagMap
instance Data.Aeson.Types.FromJSON.FromJSON Pinboard.ApiTypes.UpdateTime
instance Data.Aeson.Types.FromJSON.FromJSON Pinboard.ApiTypes.TextResult
instance Data.Aeson.Types.FromJSON.FromJSON Pinboard.ApiTypes.DoneResult
instance Data.Aeson.Types.FromJSON.FromJSON Pinboard.ApiTypes.Suggested
instance Data.Aeson.Types.ToJSON.ToJSON Pinboard.ApiTypes.Suggested
instance Data.Aeson.Types.FromJSON.FromJSON Pinboard.ApiTypes.Note
instance Data.Aeson.Types.ToJSON.ToJSON Pinboard.ApiTypes.Note
instance Data.Aeson.Types.FromJSON.FromJSON Pinboard.ApiTypes.NoteList
instance Data.Aeson.Types.ToJSON.ToJSON Pinboard.ApiTypes.NoteList
instance Data.Aeson.Types.FromJSON.FromJSON Pinboard.ApiTypes.NoteListItem
instance Data.Aeson.Types.ToJSON.ToJSON Pinboard.ApiTypes.NoteListItem
instance Data.Aeson.Types.FromJSON.FromJSON Pinboard.ApiTypes.PostDates
instance Data.Aeson.Types.ToJSON.ToJSON Pinboard.ApiTypes.PostDates

module Pinboard.ApiTypesLens
type Lens_' s a = Lens_ s s a a
type Lens_ s t a b = forall (f :: * -> *). Functor f => (a -> f b) -> s -> f t
type Prism_' s a = Prism_ s s a a
type Prism_ s t a b = forall (p :: * -> * -> *) (f :: * -> *). (Choice p, Applicative f) => p a (f b) -> p s (f t)
postsDateL :: Lens_' Posts UTCTime
postsPostsL :: Lens_' Posts [Post]
postsUserL :: Lens_' Posts Text
postDescriptionL :: Lens_' Post Text
postExtendedL :: Lens_' Post Text
postHashL :: Lens_' Post Text
postHrefL :: Lens_' Post Text
postMetaL :: Lens_' Post Text
postSharedL :: Lens_' Post Bool
postTagsL :: Lens_' Post [Tag]
postTimeL :: Lens_' Post UTCTime
postToReadL :: Lens_' Post Bool
postDatesCountL :: Lens_' PostDates [(Day, Int)]
postDatesTagL :: Lens_' PostDates Text
postDatesUserL :: Lens_' PostDates Text
noteListCountL :: Lens_' NoteList Int
noteListItemsL :: Lens_' NoteList [NoteListItem]
noteListItemCreatedAtL :: Lens_' NoteListItem UTCTime
noteListItemHashL :: Lens_' NoteListItem Text
noteListItemIdL :: Lens_' NoteListItem Text
noteListItemLengthL :: Lens_' NoteListItem Int
noteListItemTitleL :: Lens_' NoteListItem Text
noteListItemUpdatedAtL :: Lens_' NoteListItem UTCTime
noteCreatedAtL :: Lens_' Note UTCTime
noteHashL :: Lens_' Note Text
noteIdL :: Lens_' Note Text
noteLengthL :: Lens_' Note Int
noteTextL :: Lens_' Note Text
noteTitleL :: Lens_' Note Text
noteUpdatedAtL :: Lens_' Note UTCTime
popularP :: Prism_' Suggested [Text]
recommendedP :: Prism_' Suggested [Text]


module Pinboard.Error
type MonadErrorPinboard m = MonadError PinboardError m
defaultPinboardError :: PinboardError
pinboardExceptionToEither :: MonadCatch m => m (Either PinboardError a) -> m (Either PinboardError a)
pinboardExceptionToMonadError :: (MonadCatch m, MonadErrorPinboard e) => m (e a) -> m (e a)
exceptionToMonadErrorPinboard :: (MonadCatch m, MonadErrorPinboard e) => m (e a) -> m (e a)
tryMonadError :: (Exception e, MonadCatch m, MonadError e r) => m a -> m (r a)
eitherToMonadError :: MonadError e m => Either e a -> m a
eitherToMonadThrow :: (Exception e, MonadThrow m) => Either e a -> m a
data PinboardErrorHTTPCode

-- | 400
BadRequest :: PinboardErrorHTTPCode

-- | 401
UnAuthorized :: PinboardErrorHTTPCode

-- | 402
RequestFailed :: PinboardErrorHTTPCode

-- | 403
Forbidden :: PinboardErrorHTTPCode

-- | 404
NotFound :: PinboardErrorHTTPCode

-- | 429
TooManyRequests :: PinboardErrorHTTPCode

-- | (&gt;=500)
PinboardServerError :: PinboardErrorHTTPCode

-- | All other codes
UnknownHTTPCode :: PinboardErrorHTTPCode
data PinboardErrorType
ConnectionFailure :: PinboardErrorType
HttpStatusFailure :: PinboardErrorType
ParseFailure :: PinboardErrorType
UnknownErrorType :: PinboardErrorType
data PinboardErrorCode
UnknownError :: PinboardErrorCode
data PinboardError
PinboardError :: PinboardErrorType -> !Text -> Maybe PinboardErrorCode -> Maybe Text -> Maybe PinboardErrorHTTPCode -> PinboardError
[errorType] :: PinboardError -> PinboardErrorType
[errorMsg] :: PinboardError -> !Text
[errorCode] :: PinboardError -> Maybe PinboardErrorCode
[errorParam] :: PinboardError -> Maybe Text
[errorHTTP] :: PinboardError -> Maybe PinboardErrorHTTPCode
instance GHC.Show.Show Pinboard.Error.PinboardError
instance GHC.Show.Show Pinboard.Error.PinboardErrorCode
instance GHC.Show.Show Pinboard.Error.PinboardErrorType
instance GHC.Classes.Eq Pinboard.Error.PinboardErrorType
instance GHC.Show.Show Pinboard.Error.PinboardErrorHTTPCode
instance GHC.Exception.Exception Pinboard.Error.PinboardError


module Pinboard.Types
type PinboardEnv = (PinboardConfig, Manager)
type PinboardT m a = ReaderT PinboardEnv (ExceptT PinboardError (LoggingT m)) a
runPinboardT :: (MonadIO m, MonadCatch m) => PinboardEnv -> PinboardT m a -> m (Either PinboardError a)

-- | Typeclass alias for the return type of the API functions (keeps the
--   signatures less verbose)
type MonadPinboard m = (Functor m, Applicative m, MonadIO m, MonadCatch m, MonadReader PinboardEnv m, MonadLogger m)
type ExecLoggingT = forall m. MonadIO m => forall a. LoggingT m a -> m a
data PinboardConfig
PinboardConfig :: !ByteString -> !Int -> IORef UTCTime -> PinboardConfig -> IO () -> ExecLoggingT -> LogSource -> LogLevel -> Bool -> PinboardConfig
[apiToken] :: PinboardConfig -> !ByteString
[maxRequestRateMills] :: PinboardConfig -> !Int
[lastRequestTime] :: PinboardConfig -> IORef UTCTime
[doThreadDelay] :: PinboardConfig -> PinboardConfig -> IO ()
[execLoggingT] :: PinboardConfig -> ExecLoggingT
[filterLoggingT] :: PinboardConfig -> LogSource -> LogLevel -> Bool
runConfigLoggingT :: PinboardConfig -> ExecLoggingT
data PinboardRequest
PinboardRequest :: !Text -> [Param] -> PinboardRequest

-- | url path of PinboardRequest
[requestPath] :: PinboardRequest -> !Text

-- | Query Parameters of PinboardRequest
[requestParams] :: PinboardRequest -> [Param]
data ResultFormatType
FormatJson :: ResultFormatType
FormatXml :: ResultFormatType
data Param
Format :: !ResultFormatType -> Param
Tag :: !Text -> Param
Tags :: !Text -> Param
Old :: !Text -> Param
New :: !Text -> Param
Count :: !Int -> Param
Start :: !Int -> Param
Results :: !Int -> Param
Url :: !Text -> Param
Date :: !Day -> Param
DateTime :: !UTCTime -> Param
FromDateTime :: !UTCTime -> Param
ToDateTime :: !UTCTime -> Param
Replace :: !Bool -> Param
Shared :: !Bool -> Param
ToRead :: !Bool -> Param
Description :: !Text -> Param
Extended :: !Text -> Param
Meta :: !Int -> Param
type ParamsBS = [(ByteString, ByteString)]
instance GHC.Show.Show Pinboard.Types.PinboardRequest
instance GHC.Classes.Eq Pinboard.Types.Param
instance GHC.Show.Show Pinboard.Types.Param
instance GHC.Classes.Eq Pinboard.Types.ResultFormatType
instance GHC.Show.Show Pinboard.Types.ResultFormatType
instance GHC.Show.Show Pinboard.Types.PinboardConfig


module Pinboard.Logging
withStdoutLogging :: PinboardConfig -> PinboardConfig
withStderrLogging :: PinboardConfig -> PinboardConfig
withNoLogging :: PinboardConfig -> PinboardConfig
logNST :: (MonadIO m, MonadLogger m) => LogLevel -> Text -> Text -> m ()
logOnException :: (MonadLogger m, MonadCatch m, MonadIO m) => Text -> m a -> m a
runLogOnException :: (MonadCatch m, MonadIO m) => Text -> PinboardConfig -> LoggingT m a -> m a
nullLogger :: Loc -> LogSource -> LogLevel -> LogStr -> IO ()
runNullLoggingT :: LoggingT m a -> m a
errorLevelFilter :: LogSource -> LogLevel -> Bool
infoLevelFilter :: LogSource -> LogLevel -> Bool
debugLevelFilter :: LogSource -> LogLevel -> Bool


module Pinboard.Util

-- | Conversion of a key value pair to a query parameterized string
paramsToByteString :: (Monoid m, IsString m) => [(m, m)] -> m

-- | Conversion from a <a>Show</a> constrained type to <a>Text</a>
toText :: Show a => a -> Text

-- | Conversion from a <a>Show</a> constrained type to lowercase
--   <a>Text</a>
toTextLower :: Show a => a -> Text

-- | Forward slash interspersion on <a>Monoid</a> and <a>IsString</a>
--   constrained types
(</>) :: (Monoid m, IsString m) => m -> m -> m
paramToName :: Param -> Text
paramToText :: Param -> (Text, Text)

-- | Retrieve and encode the optional parameters
encodeParams :: [Param] -> ParamsBS
ensureResultFormatType :: ResultFormatType -> PinboardRequest -> PinboardRequest


module Pinboard.Client

-- | Create a default PinboardConfig using the supplied apiToken (ex:
--   "use:ABCDEF0123456789ABCD")
fromApiToken :: String -> PinboardConfig
defaultPinboardConfig :: PinboardConfig
data PinboardConfig
PinboardConfig :: !ByteString -> !Int -> IORef UTCTime -> PinboardConfig -> IO () -> ExecLoggingT -> LogSource -> LogLevel -> Bool -> PinboardConfig
[apiToken] :: PinboardConfig -> !ByteString
[maxRequestRateMills] :: PinboardConfig -> !Int
[lastRequestTime] :: PinboardConfig -> IORef UTCTime
[doThreadDelay] :: PinboardConfig -> PinboardConfig -> IO ()
[execLoggingT] :: PinboardConfig -> ExecLoggingT
[filterLoggingT] :: PinboardConfig -> LogSource -> LogLevel -> Bool

-- | Execute computations in the Pinboard monad
runPinboard :: (MonadIO m, MonadCatch m, MonadErrorPinboard e) => PinboardConfig -> PinboardT m a -> m (e a)

-- | Execute computations in the Pinboard monad (with specified http
--   Manager)
runPinboardE :: (MonadIO m, MonadCatch m, MonadErrorPinboard e) => PinboardEnv -> PinboardT m a -> m (e a)

-- | Create a Pinboard value from a PinboardRequest w/ json deserialization
pinboardJson :: (MonadPinboard m, FromJSON a) => PinboardRequest -> m a
runPinboardSingleRaw :: PinboardConfig -> PinboardRequest -> IO (Response ByteString)
runPinboardSingleRawBS :: (MonadErrorPinboard e) => PinboardConfig -> PinboardRequest -> IO (e ByteString)
runPinboardSingleJson :: (MonadErrorPinboard e, FromJSON a) => PinboardConfig -> PinboardRequest -> IO (e a)
sendPinboardRequest :: PinboardEnv -> PinboardRequest -> IO (Response ByteString)

-- | delays the thread, if the time since the previous request is less than
--   the configured maxRequestRateMills
requestThreadDelay :: PinboardConfig -> IO ()
newMgr :: IO Manager
mgrFail :: (Monad m, MonadErrorPinboard e) => PinboardErrorType -> SomeException -> m (e b)
parseJSONResponse :: (MonadErrorPinboard e, FromJSON a) => Response ByteString -> e a
decodeJSONResponse :: (MonadErrorPinboard e, FromJSON a) => ByteString -> e a
checkStatusCodeResponse :: MonadErrorPinboard e => Response a -> e ()
checkStatusCode :: MonadErrorPinboard e => Int -> e ()
addErrMsg :: Text -> PinboardError -> PinboardError
createParserErr :: Text -> PinboardError
httpStatusPinboardError :: MonadErrorPinboard e => PinboardErrorHTTPCode -> e a


-- | These request builders allow you to build request params which can
--   sent via Pinboard.Client, in the case you need more control for how
--   the response should be processed over what Pinboard.Api provides.
module Pinboard.ApiRequest

-- | posts/recent : Returns a list of the user's most recent posts,
--   filtered by tag.
getPostsRecentRequest :: ResultFormatType -> Maybe [Tag] -> Maybe Count -> PinboardRequest

-- | posts/get : Returns one or more posts on a single day matching the
--   arguments. If no date or url is given, date of most recent bookmark
--   will be used.
getPostsForDateRequest :: ResultFormatType -> Maybe [Tag] -> Maybe Date -> Maybe Url -> PinboardRequest

-- | posts/all : Returns all bookmarks in the user's account.
getPostsAllRequest :: ResultFormatType -> Maybe [Tag] -> Maybe StartOffset -> Maybe NumResults -> Maybe FromDateTime -> Maybe ToDateTime -> Maybe Meta -> PinboardRequest

-- | posts/dates : Returns a list of dates with the number of posts at each
--   date.
getPostsDatesRequest :: ResultFormatType -> Maybe [Tag] -> PinboardRequest

-- | posts/update : Returns the most recent time a bookmark was added,
--   updated or deleted.
getPostsMRUTimeRequest :: ResultFormatType -> PinboardRequest

-- | posts/suggest : Returns a list of popular tags and recommended tags
--   for a given URL. Popular tags are tags used site-wide for the url;
--   Recommended tags are drawn from the user's own tags.
getSuggestedTagsRequest :: ResultFormatType -> Url -> PinboardRequest

-- | posts/add : Add or Update a bookmark
addPostRequest :: ResultFormatType -> Url -> Description -> Maybe Extended -> Maybe [Tag] -> Maybe DateTime -> Maybe Replace -> Maybe Shared -> Maybe ToRead -> PinboardRequest

-- | posts/add : Add or Update a bookmark (from a Post record)
addPostRecRequest :: ResultFormatType -> Post -> Replace -> PinboardRequest

-- | posts/delete : Delete an existing bookmark.
deletePostRequest :: ResultFormatType -> Url -> PinboardRequest

-- | tags/get : Returns a full list of the user's tags along with the
--   number of times they were used.
getTagsRequest :: ResultFormatType -> PinboardRequest

-- | tags/rename : Rename an tag, or fold it in to an existing tag
renameTagRequest :: ResultFormatType -> Old -> New -> PinboardRequest

-- | tags/delete : Delete an existing tag.
deleteTagRequest :: ResultFormatType -> Tag -> PinboardRequest

-- | user/secret : Returns the user's secret RSS key (for viewing private
--   feeds)
getUserSecretRssKeyRequest :: ResultFormatType -> PinboardRequest

-- | user/api_token : Returns the user's API token (for making API calls
--   without a password)
getUserApiTokenRequest :: ResultFormatType -> PinboardRequest

-- | notes/list : Returns a list of the user's notes (note text detail is
--   not included)
getNoteListRequest :: ResultFormatType -> PinboardRequest

-- | notes/id : Returns an individual user note. The hash property is a 20
--   character long sha1 hash of the note text.
getNoteRequest :: ResultFormatType -> NoteId -> PinboardRequest


-- | <a>https://pinboard.in/api/</a>
--   
--   Provides Pinboard Api Access (deserializes into Haskell data
--   structures)
module Pinboard.Api

-- | posts/recent : Returns a list of the user's most recent posts,
--   filtered by tag.
getPostsRecent :: MonadPinboard m => Maybe [Tag] -> Maybe Count -> m Posts

-- | posts/get : Returns one or more posts on a single day matching the
--   arguments. If no date or url is given, date of most recent bookmark
--   will be used.
getPostsForDate :: MonadPinboard m => Maybe [Tag] -> Maybe Date -> Maybe Url -> m Posts

-- | posts/all : Returns all bookmarks in the user's account.
getPostsAll :: MonadPinboard m => Maybe [Tag] -> Maybe StartOffset -> Maybe NumResults -> Maybe FromDateTime -> Maybe ToDateTime -> Maybe Meta -> m [Post]

-- | posts/dates : Returns a list of dates with the number of posts at each
--   date.
getPostsDates :: MonadPinboard m => Maybe [Tag] -> m PostDates

-- | posts/update : Returns the most recent time a bookmark was added,
--   updated or deleted.
getPostsMRUTime :: MonadPinboard m => m UTCTime

-- | posts/suggest : Returns a list of popular tags and recommended tags
--   for a given URL. Popular tags are tags used site-wide for the url;
--   Recommended tags are drawn from the user's own tags.
getSuggestedTags :: MonadPinboard m => Url -> m [Suggested]

-- | posts/add : Add or Update a bookmark
addPost :: MonadPinboard m => Url -> Description -> Maybe Extended -> Maybe [Tag] -> Maybe DateTime -> Maybe Replace -> Maybe Shared -> Maybe ToRead -> m ()

-- | posts/add : Add or Update a bookmark, from a Post record
addPostRec :: MonadPinboard m => Post -> Replace -> m ()

-- | posts/delete : Delete an existing bookmark.
deletePost :: MonadPinboard m => Url -> m ()

-- | tags/get : Returns a full list of the user's tags along with the
--   number of times they were used.
getTags :: MonadPinboard m => m TagMap

-- | tags/rename : Rename an tag, or fold it in to an existing tag
renameTag :: MonadPinboard m => Old -> New -> m ()

-- | tags/delete : Delete an existing tag.
deleteTag :: MonadPinboard m => Tag -> m ()

-- | user/secret : Returns the user's secret RSS key (for viewing private
--   feeds)
getUserSecretRssKey :: MonadPinboard m => m Text

-- | user/api_token : Returns the user's API token (for making API calls
--   without a password)
getUserApiToken :: MonadPinboard m => m Text

-- | notes/list : Returns a list of the user's notes (note text detail is
--   not included)
getNoteList :: MonadPinboard m => m NoteList

-- | notes/id : Returns an individual user note. The hash property is a 20
--   character long sha1 hash of the note text.
getNote :: MonadPinboard m => NoteId -> m Note


-- | <pre>
--   import Pinboard
--   
--   main :: IO ()
--   main = do
--     let config = fromApiToken "api token"
--     result &lt;- runPinboard config $ getPostsRecent Nothing Nothing
--     case result of
--       Right details -&gt; print details
--       Left pinboardError -&gt; print pinboardError
--   </pre>
module Pinboard
