pinboardixir v0.2.0 Pinboardixir.Posts

Endpoints under “/posts”.

Summary

Functions

Get all bookmarks in the user’s account

Returns a list of dates with the number of posts at each date

Delete a bookmark

Get one or more posts on a single day matching the arguments

Returns a list of the user’s most recent posts

For a given URL, returns a mapped list of popular and recommended tags

Returns the most recent time a bookmark was added, updated or deleted

Functions

add(url, description, options \\ [])

Specs

add(String.t, String.t, Pinboardixir.Types.options) :: Pinboardixir.Types.result

Add a bookmark.

all(options \\ [])

Specs

all(Pinboardixir.Types.options) :: [Pinboardixir.Post.t]

Get all bookmarks in the user’s account.

Also, :toread can be used to filter posts marked as “read later”.

dates(options \\ [])

Specs

dates(Pinboardixir.Types.options) :: %{String.t => integer}

Returns a list of dates with the number of posts at each date.

delete(url)

Specs

delete(String.t) :: Pinboardixir.Types.result

Delete a bookmark.

get(options \\ [])

Specs

get(Pinboardixir.Types.options) :: [Pinboardixir.Post.t]

Get one or more posts on a single day matching the arguments.

recent(options \\ [])

Specs

recent(Pinboardixir.Types.options) :: [%Pinboardixir.Post{description: term, extended: term, hash: term, href: term, meta: term, shared: term, tags: term, time: term, toread: term}]

Returns a list of the user’s most recent posts.

suggest(url)

Specs

suggest(String.t) :: Map.t

For a given URL, returns a mapped list of popular and recommended tags.

Example

iex> Pinboardixir.Posts.suggest("http://www.ulisp.com/")
%{"popular" => [],
"recommended" => ["arduino", "lisp", "hardware", "programming", "compiler",
"scheme"]}
update()

Specs

update :: String.t

Returns the most recent time a bookmark was added, updated or deleted.

Use this before calling posts/all to see if the data has changed since the last fetch.