reddit 0.2.1.0 → 0.2.2.0
raw patch · 3 files changed
+28/−13 lines, 3 filesdep ~aesondep ~api-builderdep ~base
Dependency ranges changed: aeson, api-builder, base, data-default-class, http-types, time, vector
Files
- reddit.cabal +16/−10
- src/Reddit.hs +4/−3
- test-utils/Utils.hs +8/−0
reddit.cabal view
@@ -1,5 +1,5 @@ name: reddit-version: 0.2.1.0+version: 0.2.2.0 synopsis: Library for interfacing with Reddit's API description: A library for interfacing with Reddit's API in Haskell. Handles@@ -16,7 +16,7 @@ author: Fraser Murray maintainer: fraser.m.murray@gmail.com homepage: https://github.com/intolerable/reddit-copyright: Copyright (c) Fraser Murray, 2013-2015+copyright: Copyright (c) Fraser Murray, 2013-2018 category: Network build-type: Simple cabal-version: >= 1.10@@ -91,21 +91,21 @@ default-language: Haskell2010 hs-source-dirs: src/ build-depends:- base >= 4.6 && < 4.10,- aeson >= 0.9 && < 0.12,- api-builder >= 0.10 && < 0.13,+ base >= 4.6 && < 4.12,+ aeson >= 0.9 && < 1.3,+ api-builder >= 0.10 && < 0.15, bytestring == 0.10.*, data-default-class >= 0.0.1 && < 0.2, free >= 4 && < 5, http-client >= 0.4.30 && < 0.6, http-client-tls >= 0.2 && < 0.4,- http-types >= 0.8 && < 0.10,+ http-types >= 0.8 && < 0.11, network == 2.6.*, text == 1.*,- time >= 1.5 && < 1.7,+ time >= 1.5 && < 1.9, transformers >= 0.4 && < 0.6, unordered-containers >= 0.2.5 && < 0.3,- vector >= 0.10 && < 0.12+ vector >= 0.10 && < 0.13 ghc-options: -Wall test-suite test@@ -128,7 +128,7 @@ ghc-options: -Wall test-suite test-io- hs-source-dirs: test-io+ hs-source-dirs: test-io, test-utils main-is: Spec.hs default-extensions: OverloadedStrings@@ -140,6 +140,7 @@ Cabal >= 1.16.0, api-builder, bytestring,+ data-default-class, http-client, http-client-tls, reddit,@@ -148,9 +149,11 @@ time, transformers ghc-options: -Wall+ other-modules:+ Utils test-suite test-anon- hs-source-dirs: test-anon+ hs-source-dirs: test-anon, test-utils main-is: Spec.hs default-extensions: OverloadedStrings@@ -161,9 +164,12 @@ base == 4.*, Cabal >= 1.16.0, api-builder,+ data-default-class, reddit, hspec, text, time, transformers ghc-options: -Wall+ other-modules:+ Utils
src/Reddit.hs view
@@ -53,15 +53,16 @@ -- | Options for how we should run the 'Reddit' action. -- -- - 'rateLimitingEnabled': 'True' if the connection should be automatically rate-limited--- and should pause when we hit the limit, 'False' otherwise.+-- and should pause when we hit the limit, 'False' otherwise. Default is 'True'. -- -- - 'connectionManager': @'Just' x@ if the connection should use the 'Manager' @x@, 'Nothing'--- if we should create a new one for the connection.+-- if we should create a new one for the connection. Default is 'Nothing'. -- -- - 'loginMethod': The method we should use for authentication, described in 'LoginMethod'.+-- Default is 'Anonymous'. -- -- - 'customUserAgent': @'Just' "string"@ if the connection should use the user agent @"string"@,--- @'Nothing'@ if it should use the default agent.+-- @'Nothing'@ if it should use the default agent. Default is 'Nothing'. data RedditOptions = RedditOptions { rateLimitingEnabled :: Bool , connectionManager :: Maybe Manager
+ test-utils/Utils.hs view
@@ -0,0 +1,8 @@+module Utils where++import Reddit+import Data.Default.Class++runAnon :: Reddit a -> IO (Either (APIError RedditError) a)+runAnon =+ runRedditWith def { customUserAgent = Just "reddit-haskell test suite" }