packages feed

servant-pushbullet-client 0.4.0.0 → 0.5.0.0

raw patch · 5 files changed

+50/−28 lines, 5 filesdep ~aesondep ~basedep ~http-api-data

Dependency ranges changed: aeson, base, http-api-data, http-client, http-client-tls, microlens, microlens-th, pushbullet-types, scientific, servant, servant-client, text, time, unordered-containers

Files

ChangeLog.md view
@@ -1,5 +1,12 @@ # Revision history for servant-pushbullet-client +## 0.5.0.0  -- 2018-02-11++* Require version 0.4.0.2 of pushbullet-types.+* Define a client function for deleting a push.+* Define a client function for getting a single push.+  Note: this API endpoint is undocumented.+ ## 0.4.0.0  -- 2017-08-01  Bump dependency on pushbullet-types to require version 0.4. This version@@ -16,7 +23,7 @@ ## 0.1.0.0  -- 2017-02-20  The bulk of the library has been moved into a separate library-[pushbullet-types](https://github.com/tsani/pushbullet-types).+pushbullet-types.  This library now just defines the Pushbullet API-as-a-type and applies servant-client's `client` function to produce the functions for querying the
servant-pushbullet-client.cabal view
@@ -1,8 +1,8 @@--- Initial servant-pushbullet-client.cabal generated by cabal init.  For +-- Initial servant-pushbullet-client.cabal generated by cabal init.  For -- further documentation, see http://haskell.org/cabal/users-guide/  name:                servant-pushbullet-client-version:             0.4.0.0+version:             0.5.0.0 synopsis:            Bindings to the Pushbullet API using servant-client description:   This library describes the Pushbullet API as a type, and uses servant-client@@ -10,9 +10,9 @@   are added so that dealing with raw JSON is avoided. license:             MIT license-file:        LICENSE-author:              Jacob Errington-maintainer:          git@mail.jerrington.me-copyright:           Jacob Thomas Errington, 2017+author:              Jacob Thomas Errington+maintainer:          pushbullet-hs@mail.jerrington.me+copyright:           Jacob Thomas Errington, 2017-2018 category:            Web build-type:          Simple extra-source-files:  ChangeLog.md@@ -20,12 +20,7 @@  source-repository head   type: git-  location: https://github.com/tsani/servant-pushbullet-client--source-repository this-  type: git-  location: https://github.com/tsani/servant-pushbullet-client/releases/tag/v0.4.0.0-  tag: v0.4.0.0+  location: https://github.com/tsani/pushbullet-hs  library   exposed-modules:@@ -48,18 +43,17 @@     TypeFamilies     TypeApplications   build-depends:-    pushbullet-types >=0.4 && <0.5,--    aeson >=0.11 && <1.2,-    base >=4.9 && <4.10,-    http-api-data >=0.3 && <0.4,-    http-client-tls >=0.3 && <0.4,-    http-client >=0.5 && <0.6,-    microlens >=0.4 && <0.5,-    microlens-th >=0.4 && <0.5,-    scientific >=0.3 && <0.4,-    servant >=0.9 && <0.12,-    servant-client >=0.9 && <0.12,-    time >=1.6 && <1.7,-    text >=1.2 && <1.3,-    unordered-containers >=0.2 && <0.3+    pushbullet-types >=0.4.0.2,+    aeson >=0.11,+    base >=4.9 && <5,+    http-api-data >=0.3,+    http-client-tls >=0.3,+    http-client >=0.5,+    microlens >=0.4,+    microlens-th >=0.4,+    scientific >=0.3,+    servant >=0.9,+    servant-client >=0.9,+    time >=1.6,+    text >=1.2,+    unordered-containers >=0.2
src/Network/Pushbullet/Api.hs view
@@ -30,6 +30,10 @@         :> QueryParam "limit" Int         :> QueryParam "cursor" Cursor         :> Get '[JSON] (Paginated ExistingPushes)+      :<|>+        Capture "iden" PushId :> Delete '[JSON] TrivialObject+      :<|>+        Capture "iden" PushId :> Get '[JSON] (Push 'Existing)     )   :<|>     "ephemerals"
src/Network/Pushbullet/Client.hs view
@@ -22,6 +22,14 @@   -> Maybe Int   -> Maybe Cursor   -> ClientM (Paginated ExistingPushes)+getPush+  :: Auth+  -> PushId+  -> ClientM (Push 'Existing)+deletePush+  :: Auth+  -> PushId+  -> ClientM TrivialObject createEphemeral :: Auth -> Ephemeral -> ClientM TrivialObject getMe :: Auth -> ClientM User getDevices@@ -45,7 +53,7 @@   :: Auth   -> Permanent 'MessageList   -> ClientM SmsMessages-(createPush :<|> getPushes)+(createPush :<|> getPushes :<|> deletePush :<|> getPush)   :<|> createEphemeral   :<|> getMe   :<|> (getDevices :<|> createDevice :<|> deleteDevice)
src/Network/Pushbullet/Misc.hs view
@@ -40,3 +40,12 @@   p <- next c   later <- getPaginatedLimit (Limit n') p next   pure (d' ++ later)++getPaginatedLimit'+  :: Monad m+  => Count+  -> (Maybe Cursor -> m (Paginated [a]))+  -> m [a]+getPaginatedLimit' c next = do+  page <- next Nothing+  getPaginatedLimit c page (next . Just)