packages feed

digitalocean-kzs 0.1.0.0 → 0.1.0.1

raw patch · 8 files changed

+68/−60 lines, 8 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

digitalocean-kzs.cabal view
@@ -10,7 +10,7 @@ -- PVP summary:      +-+------- breaking API changes --                   | | +----- non-breaking API additions --                   | | | +--- code changes with no API change-version:             0.1.0.0+version:             0.1.0.1  -- A short (one-line) description of the package. synopsis:            digitalocean api for haskell
src/DigitalOcean/Account.hs view
@@ -41,13 +41,15 @@   parseJSON _ = mzero  -- | Get User Information--- >>> :{+-- Example:+--+-- @ -- do---   tkn <- getEnv "DIGITAL_OCEAN_PERSONAL_ACCESS_TOKEN"---   mayBeAcnt <- account $ Authentication tkn---   print $ show $ isJust mayBeAcnt--- :}--- "True"+--     tkn <- getEnv "DIGITAL_OCEAN_PERSONAL_ACCESS_TOKEN"+--     mayBeAcnt <- account $ Authentication tkn+--     print $ show $ isJust mayBeAcnt+-- @+-- account :: Authentication -> (MonadIO m) => m (Maybe Account) account a = liftM toAccount $ liftM decode (requestGet "account" a) 
src/DigitalOcean/Droplet.hs view
@@ -52,13 +52,14 @@   -- | List all Droplets---  :{+--+-- @ -- do---   tkn <- getEnv "DIGITAL_OCEAN_PERSONAL_ACCESS_TOKEN"---   maybeDroplets <- droplets $ Authentication tkn---   print $ show $ isJust maybeDroplets--- :}--- "True"+--     tkn <- getEnv "DIGITAL_OCEAN_PERSONAL_ACCESS_TOKEN"+--     maybeDroplets <- droplets $ Authentication tkn+--     print $ show $ isJust maybeDroplets+-- @+--  droplets :: Authentication -> (MonadIO m) => m (Maybe [Droplet]) droplets a = liftM toList $ liftM decode (requestGet "droplets?page=1&per_page=100" a) 
src/DigitalOcean/Image.hs view
@@ -32,24 +32,26 @@ } deriving(Show, Read)  -- | List all Images--- >>> :{+--+-- @ -- do---   tkn <- getEnv "DIGITAL_OCEAN_PERSONAL_ACCESS_TOKEN"---   maybeImages <- images $ Authentication tkn---   print $ show $ isJust maybeImages--- :}--- "True"+--     tkn <- getEnv "DIGITAL_OCEAN_PERSONAL_ACCESS_TOKEN"+--     maybeImages <- images $ Authentication tkn+--     print $ show $ isJust maybeImages+-- @+-- images :: Authentication -> (MonadIO m) => m (Maybe [Image]) images a = liftM toList $ liftM decode (requestGet "images?page=1&per_page=1" a)  -- | List all Distribution Images--- >>> :{+--+-- @ -- do---   tkn <- getEnv "DIGITAL_OCEAN_PERSONAL_ACCESS_TOKEN"---   maybeImages <- listAllDistributionImages $ Authentication tkn---   print $ show $ isJust maybeImages--- :}--- "True"+--     tkn <- getEnv "DIGITAL_OCEAN_PERSONAL_ACCESS_TOKEN"+--     maybeImages <- listAllDistributionImages $ Authentication tkn+--     print $ show $ isJust maybeImages+-- @+-- listAllDistributionImages :: Authentication -> (MonadIO m) => m (Maybe [Image]) listAllDistributionImages a = liftM toList $ liftM decode (requestGet "images?page=1&per_page=100&type=distribution" a) 
src/DigitalOcean/NewDroplet.hs view
@@ -52,24 +52,24 @@   -- | create new Droplet--- :{+--+-- @ -- do---   let d = NewDropletRequest {---     ndname="hoge",---     region="nyc3",---     size="512mb",---     image=12241402,---     ndsshKeys=[],---     backups = False,---     ipv6=True,---     userData = Nothing,---     privateNetworking=False---   }---   tkn <- getEnv "DIGITAL_OCEAN_PERSONAL_ACCESS_TOKEN"---   maybeNewDroplet <- newDroplet ( Authentication tkn) d---   print $ show $ isJust maybeNewDroplet --- :}--- "True"+--     let d = NewDropletRequest {+--         ndname="hoge",+--         region="nyc3",+--         size="512mb",+--         image=12241402,+--         ndsshKeys=[],+--         backups = False,+--         ipv6=True,+--         userData = Nothing,+--         privateNetworking=False+--     }+--     tkn <- getEnv "DIGITAL_OCEAN_PERSONAL_ACCESS_TOKEN"+--     maybeNewDroplet <- newDroplet ( Authentication tkn) d+-- @+-- newDroplet :: Authentication -> NewDropletRequest -> (MonadIO m) => m (Maybe Droplet) newDroplet a d = liftM toDroplet $ liftM decode (requestPost "droplets" a  d) 
src/DigitalOcean/Region.hs view
@@ -25,13 +25,14 @@   -- | List all Regions--- >>> :{+--+-- @ -- do---   tkn <- getEnv "DIGITAL_OCEAN_PERSONAL_ACCESS_TOKEN"---   maybeRegions <- regions $ Authentication tkn---   print $ show $ isJust maybeRegions--- :}--- "True"+--     tkn <- getEnv "DIGITAL_OCEAN_PERSONAL_ACCESS_TOKEN"+--     maybeRegions <- regions $ Authentication tkn+--     print $ show $ isJust maybeRegions+-- @+-- regions :: Authentication -> (MonadIO m) => m (Maybe [Region]) regions a = liftM toList $ liftM decode (requestGet "regions" a) 
src/DigitalOcean/SSHKey.hs view
@@ -40,13 +40,14 @@   parseJSON _ = mzero  -- | List all Keys--- >>> :{+--+-- @ -- do---   tkn <- getEnv "DIGITAL_OCEAN_PERSONAL_ACCESS_TOKEN"---   maybeKeys <- listAllKeys $ Authentication tkn---   print $ show $ isJust maybeKeys--- :}--- "True"+--     tkn <- getEnv "DIGITAL_OCEAN_PERSONAL_ACCESS_TOKEN"+--     maybeKeys <- listAllKeys $ Authentication tkn+--     print $ show $ isJust maybeKeys+-- @+-- listAllKeys :: Authentication -> (MonadIO m) => m (Maybe [SSHKey]) listAllKeys a = liftM toList $ liftM decode (requestGet "account/keys" a) 
src/DigitalOcean/Size.hs view
@@ -35,13 +35,14 @@   parseJSON _          = mzero  -- | List all Sizes--- >>> :{+-- +-- @ -- do---   tkn <- getEnv "DIGITAL_OCEAN_PERSONAL_ACCESS_TOKEN"---   maybeSizes <- sizes $ Authentication tkn---   print $ show $ isJust maybeSizes--- :}--- "True"+--     tkn <- getEnv "DIGITAL_OCEAN_PERSONAL_ACCESS_TOKEN"+--     maybeSizes <- sizes $ Authentication tkn+--     print $ show $ isJust maybeSizes+-- @+--  sizes :: Authentication -> (MonadIO m) => m (Maybe [Size]) sizes  a = liftM toList $ liftM decode (requestGet "sizes" a)