pinboard: Access to the Pinboard API

[ library, mit, network-apis ] [ Propose Tags ] [ Report a vulnerability ]

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.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.6.1, 0.6.2, 0.6.2.1, 0.6.2.2, 0.6.3, 0.6.4, 0.6.5, 0.7.5, 0.8.5, 0.8.6, 0.8.7, 0.8.8, 0.8.9, 0.8.10, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.9.5, 0.9.6, 0.9.7, 0.9.8, 0.9.9, 0.9.10, 0.9.11, 0.9.12, 0.9.12.1, 0.9.12.2, 0.9.12.3, 0.9.12.4, 0.9.12.5, 0.9.12.6, 0.9.12.7, 0.9.12.8, 0.9.12.9, 0.9.12.10, 0.9.12.11, 0.10.0.0, 0.10.0.1, 0.10.0.2, 0.10.1.2, 0.10.1.3, 0.10.1.4, 0.10.2.0, 0.10.3.0
Change log changelog.md
Dependencies aeson (>=2.0 && <3.0), base (>=4.6 && <5.0), bytestring (>=0.10.0 && <0.11), containers (>=0.5.0.0 && <0.7), http-client (>=0.5 && <0.8), http-client-tls (>=0.3.0 && <0.4), http-types (>=0.8 && <0.13), monad-logger (>=0.3 && <0.4), mtl (>=2.2.1), network (>=2.6.2 && <4), profunctors (>=5), random (>=1.1), text (>=0.11 && <1.3), time (>1.3), transformers (>=0.4.0.0), unliftio, unliftio-core, unordered-containers, vector (>=0.10.9 && <0.13) [details]
License MIT
Copyright Copyright (c) 2015 Jon Schoning
Author Jon Schoning
Maintainer jonschoning@gmail.com
Category Network APIs
Home page https://github.com/jonschoning/pinboard
Bug tracker https://github.com/jonschoning/pinboard/issues
Source repo head: git clone git://github.com/jonschoning/pinboard.git
Uploaded by jonschoning at 2022-05-07T23:32:56Z
Distributions
Reverse Dependencies 2 direct, 0 indirect [details]
Downloads 31046 total (103 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-05-08 [all 1 reports]

Readme for pinboard-0.10.3.0

[back to package description]

Pinboard Hackage Build Status

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.

Hackage documentation

http://hackage.haskell.org/package/pinboard

Stackage documentation

https://www.stackage.org/package/pinboard

Pinboard Api documentation

https://pinboard.in/api/

Examples:

getPostsRecent

{-# LANGUAGE OverloadedStrings #-}

import Pinboard

main :: IO ()
main = do
  let config = fromApiToken "api token"
  result <- runPinboard config $ getPostsRecent Nothing Nothing
  case result of
    Right details -> print details
    Left pinboardError -> print pinboardError

output:

Posts{postsDate = 2015 - 10 - 24 16 : 17 : 12 UTC,
       postsUser = "jonschoning",
       postsPosts =
         [Post{postHref = "http://www.reddit.com/r/haskell/comments/25vj62/adventure_with_types_in_haskell_simon_peyton/",
               postDescription = "Adventure with Types in Haskell - Simon Peyton Jones [1:33:36] : haskell",
               postExtended = "", 
               postMeta = "3fe9fb05c7c37f7bb66be7b9d85599eb",
               postHash = "c46b717604ef8b126dabeba97b27a36f",
               postTime = 2014 - 5 - 19 3 : 35 : 55 UTC, 
               postShared = True,
               postToRead = False,
               postTags = ["spj", "video", "haskell", "typetheory"]}]}

getPostsRecent (using Lenses)

{-# LANGUAGE OverloadedStrings #-}

import Pinboard
import Control.Lens

main :: IO ()
main = do
  let config = fromApiToken "api token"
  result <- runPinboard config $ getPostsRecent (Just ["haskell"]) (Just 3)
  mapM_ print (result ^.. _Right . postsPostsL . traverse . postHrefL)

output:

"http://www.stephendiehl.com/posts/production.html"
"https://mail.haskell.org/mailman/listinfo"
"https://en.wikibooks.org/wiki/Haskell/Applicative_functors#A_sliding_scale_of_power"

Modules

Pinboard.Types

Pinboard typeclasses and type aliases

Pinboard.Client

Executes the methods defined in Pinboard.Api

Pinboard.Api

Provides Pinboard Api Methods

Pinboard.ApiTypes

Pinboard Data Structures returned by the Api

Pinboard.ApiTypesLens

Lens accessors for Pinboard.ApiTypes