Copyright | (c) Jon Schoning 2015 |
---|---|
Maintainer | jonschoning@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
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.
Synopsis
- getPostsRecentRequest :: ResultFormatType -> Maybe [Tag] -> Maybe Count -> PinboardRequest
- getPostsForDateRequest :: ResultFormatType -> Maybe [Tag] -> Maybe Date -> Maybe Url -> PinboardRequest
- getPostsAllRequest :: ResultFormatType -> Maybe [Tag] -> Maybe StartOffset -> Maybe NumResults -> Maybe FromDateTime -> Maybe ToDateTime -> Maybe Meta -> PinboardRequest
- getPostsDatesRequest :: ResultFormatType -> Maybe [Tag] -> PinboardRequest
- getPostsMRUTimeRequest :: ResultFormatType -> PinboardRequest
- getSuggestedTagsRequest :: ResultFormatType -> Url -> PinboardRequest
- addPostRequest :: ResultFormatType -> Url -> Description -> Maybe Extended -> Maybe [Tag] -> Maybe DateTime -> Maybe Replace -> Maybe Shared -> Maybe ToRead -> PinboardRequest
- addPostRecRequest :: ResultFormatType -> Post -> Replace -> PinboardRequest
- deletePostRequest :: ResultFormatType -> Url -> PinboardRequest
- getTagsRequest :: ResultFormatType -> PinboardRequest
- renameTagRequest :: ResultFormatType -> Old -> New -> PinboardRequest
- deleteTagRequest :: ResultFormatType -> Tag -> PinboardRequest
- getUserSecretRssKeyRequest :: ResultFormatType -> PinboardRequest
- getUserApiTokenRequest :: ResultFormatType -> PinboardRequest
- getNoteListRequest :: ResultFormatType -> PinboardRequest
- getNoteRequest :: ResultFormatType -> NoteId -> PinboardRequest
Posts
getPostsRecentRequest Source #
:: ResultFormatType | |
-> Maybe [Tag] | filter by up to three tags |
-> Maybe Count | number of results to return. Default is 15, max is 100 |
-> PinboardRequest |
posts/recent : Returns a list of the user's most recent posts, filtered by tag.
getPostsForDateRequest Source #
:: ResultFormatType | |
-> Maybe [Tag] | filter by up to three tags |
-> Maybe Date | return results bookmarked on this day |
-> Maybe Url | return bookmark for this URL |
-> 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.
:: ResultFormatType | |
-> Maybe [Tag] | filter by up to three tags |
-> Maybe StartOffset | offset value (default is 0) |
-> Maybe NumResults | number of results to return. Default is all |
-> Maybe FromDateTime | return only bookmarks created after this time |
-> Maybe ToDateTime | return only bookmarks created before this time |
-> Maybe Meta | include a change detection signature for each bookmark |
-> PinboardRequest |
posts/all : Returns all bookmarks in the user's account.
:: ResultFormatType | |
-> Maybe [Tag] | filter by up to three tags |
-> PinboardRequest |
posts/dates : Returns a list of dates with the number of posts at each date.
getPostsMRUTimeRequest :: ResultFormatType -> PinboardRequest Source #
posts/update : Returns the most recent time a bookmark was added, updated or deleted.
getSuggestedTagsRequest :: ResultFormatType -> Url -> PinboardRequest Source #
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.
:: ResultFormatType | |
-> Url | the URL of the item |
-> Description | Title of the item. This field is unfortunately named |
-> Maybe Extended | Description of the item. Called |
-> Maybe [Tag] | List of up to 100 tags |
-> Maybe DateTime | creation time for this bookmark. Defaults to current time. Datestamps more than 10 minutes ahead of server time will be reset to current server time |
-> Maybe Replace | Replace any existing bookmark with this URL. Default is yes. If set to no, will throw an error if bookmark exists |
-> Maybe Shared | Make bookmark public. Default is "yes" unless user has enabled the "save all bookmarks as private" user setting, in which case default is "no" |
-> Maybe ToRead | Marks the bookmark as unread. Default is "no" |
-> PinboardRequest |
posts/add : Add or Update a bookmark
:: ResultFormatType | |
-> Post | the Post record |
-> Replace | Replace any existing bookmark with the Posts URL. If set to no, will throw an error if bookmark exists |
-> PinboardRequest |
posts/add : Add or Update a bookmark (from a Post record)
deletePostRequest :: ResultFormatType -> Url -> PinboardRequest Source #
posts/delete : Delete an existing bookmark.
Tags
getTagsRequest :: ResultFormatType -> PinboardRequest Source #
tags/get : Returns a full list of the user's tags along with the number of times they were used.
:: ResultFormatType | |
-> Old | note: match is not case sensitive |
-> New | if empty, nothing will happen |
-> PinboardRequest |
tags/rename : Rename an tag, or fold it in to an existing tag
deleteTagRequest :: ResultFormatType -> Tag -> PinboardRequest Source #
tags/delete : Delete an existing tag.
User
getUserSecretRssKeyRequest :: ResultFormatType -> PinboardRequest Source #
user/secret : Returns the user's secret RSS key (for viewing private feeds)
getUserApiTokenRequest :: ResultFormatType -> PinboardRequest Source #
user/api_token : Returns the user's API token (for making API calls without a password)
Notes
getNoteListRequest :: ResultFormatType -> PinboardRequest Source #
notes/list : Returns a list of the user's notes (note text detail is not included)
getNoteRequest :: ResultFormatType -> NoteId -> PinboardRequest Source #
notes/id : Returns an individual user note. The hash property is a 20 character long sha1 hash of the note text.