gh-pocket-knife-0.1.0.0: Script helpers for interacting with GitHub

Safe HaskellNone
LanguageHaskell2010

GH

Contents

Synopsis

Documentation

get :: FromJSON a => Path -> IO a Source #

getEach :: FromJSON a => Path -> (a -> IO b) -> IO [b] Source #

Get a paginated resource, giving each item to the given action

Notes:

  • This will yield each item out of each page, not each page of items.
  • If you're trying to apply a pure function, instead use:
map f <$> getAll path

getEach_ :: FromJSON a => Path -> (a -> IO b) -> IO () Source #

getEach, but discarding the results of the provided action

getAll :: FromJSON a => Path -> IO [a] Source #

getEach, but collecting all values into a list that is returned

post :: (ToJSON a, FromJSON b) => Path -> a -> IO b Source #

put :: (ToJSON a, FromJSON b) => Path -> a -> IO b Source #

delete :: Path -> IO () Source #

lower level