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 +4 -4
- data/lib/panoptes/client.rb +2 -2
- data/lib/panoptes/client/version.rb +1 -1
- data/lib/panoptes/endpoints/base_endpoint.rb +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a4f89360a5623d28bf5063de56281eb5d02d5a8
|
4
|
+
data.tar.gz: 8c0af61836ce34866f7f165b9dc9b49d8e0a1d6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc8939caf69cbd400c529da5862bf794fb2d7aecb134566dcb7490efaf8e6adb7ca32a8b11475f789efbadf4f252ab4cc1b3e36d15dc0506e95c6ec0b975e615
|
7
|
+
data.tar.gz: 3c214a1393d9d5caf0aa5680e337a6c4b1e9f1937250794fbafa15eba0cd097a8e8a88bc0a1b3879acf8cd11feeea1d1060244ff8f35eabaefdb4770e539ada4
|
data/lib/panoptes/client.rb
CHANGED
@@ -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
|
@@ -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.
|
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-
|
11
|
+
date: 2017-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|