packages feed

backblaze-b2-hs-0.1.0.0: app/Main.hs

module Main where

import           Protolude
import           UnliftIO.Exception  (throwString)

import           Network.BackblazeB2

main :: IO ()
main = do
    cMay <- credsFromEnv
    c <- case cMay of
      Nothing -> throwString "No creds found!"
      Just c' -> return c'

    connInfo <- authorizeAccount c

    bs <- flip runReaderT connInfo listBuckets
    print bs