MyNixOS website logo
Description

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.

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.

Metadata

Version

0.10.3.0

License

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows