panoptes-client 0.2.12 → 0.2.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e656704fd4bf65904864c26d3279f2f54ac6e804
4
- data.tar.gz: f638ade168a1d478ee158ef9370550f20b382a97
3
+ metadata.gz: 0a4f89360a5623d28bf5063de56281eb5d02d5a8
4
+ data.tar.gz: 8c0af61836ce34866f7f165b9dc9b49d8e0a1d6c
5
5
  SHA512:
6
- metadata.gz: f4ac84c5a4d00cf1a53957c565926272f172e386646b014710aa8a65d74829130cc79b7c222b31e65e3231f418ccdde5b02b7aea84b66c19b8499c4a5d688c30
7
- data.tar.gz: 406e7301bc183492bb84ded6de51efbc8fb915b61c09944e67037a48d368eeca3fc1c058e3f338ba399d5d3301cdc5ce5b93c20fcf00e88e26e6d53d0dec03f9
6
+ metadata.gz: dc8939caf69cbd400c529da5862bf794fb2d7aecb134566dcb7490efaf8e6adb7ca32a8b11475f789efbadf4f252ab4cc1b3e36d15dc0506e95c6ec0b975e615
7
+ data.tar.gz: 3c214a1393d9d5caf0aa5680e337a6c4b1e9f1937250794fbafa15eba0cd097a8e8a88bc0a1b3879acf8cd11feeea1d1060244ff8f35eabaefdb4770e539ada4
@@ -39,12 +39,12 @@ module Panoptes
39
39
 
40
40
  attr_reader :env, :auth, :panoptes, :talk, :cellect
41
41
 
42
- def initialize(env: :production, auth: {}, public_key_path: nil)
42
+ def initialize(env: :production, auth: {}, public_key_path: nil, params: nil)
43
43
  @env = env
44
44
  @auth = auth
45
45
  @public_key_path = public_key_path
46
46
  @panoptes = Panoptes::Endpoints::JsonApiEndpoint.new(
47
- auth: auth, url: panoptes_url, prefix: '/api'
47
+ auth: auth, url: panoptes_url, prefix: '/api', params: params
48
48
  )
49
49
  @talk = Panoptes::Endpoints::JsonApiEndpoint.new(
50
50
  auth: auth, url: talk_url
@@ -1,5 +1,5 @@
1
1
  module Panoptes
2
2
  class Client
3
- VERSION = "0.2.12".freeze
3
+ VERSION = "0.2.13".freeze
4
4
  end
5
5
  end
@@ -5,7 +5,7 @@ require 'faraday/panoptes'
5
5
  module Panoptes
6
6
  module Endpoints
7
7
  class BaseEndpoint
8
- attr_reader :auth, :url, :prefix
8
+ attr_reader :auth, :url, :prefix, :params
9
9
 
10
10
  # @param auth [Hash<token: String, client_id: String, client_secret: String>] Authentication details
11
11
  # * either nothing,
@@ -16,11 +16,12 @@ module Panoptes
16
16
  # @param prefix [String] An optional API url prefix
17
17
  # @yield Allows an optional block to configure the faraday connection
18
18
  # @yieldparam faraday [Faraday::Connection] The faraday connection
19
- def initialize(auth: {}, url: nil, prefix: nil, &config)
19
+ def initialize(auth: {}, url: nil, prefix: nil, params: nil, &config)
20
20
  @auth = auth
21
21
  @url = url
22
22
  @prefix = prefix
23
23
  @config = config
24
+ @params = params
24
25
  end
25
26
 
26
27
  def connection
@@ -82,6 +83,9 @@ module Panoptes
82
83
  faraday.request :json
83
84
  faraday.response :json
84
85
  faraday.adapter Faraday.default_adapter
86
+ if @params
87
+ faraday.params = @params
88
+ end
85
89
  end
86
90
  end
87
91
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panoptes-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.12
4
+ version: 0.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marten Veldthuis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-08 00:00:00.000000000 Z
11
+ date: 2017-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday