incognia_api 3.2.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/README.md +14 -4
- data/lib/incognia_api/configuration.rb +1 -1
- data/lib/incognia_api/version.rb +1 -1
- data/lib/incognia_api.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d68f4d6839a251feef3d35c6549916f85b61722d3d884c0f01088c55ffdad522
|
|
4
|
+
data.tar.gz: 94ceea8dfb16ace08e710082e511b724eb46e615f747bebcdad53283d58ababd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2323ebadda00bfe03ce0d5fe15eb8bd8a504460a40170822c67f839c0785a942cb926fba49191236adfbbd7c88f60c7cc122372642fd8faf28d27459f65bff0b
|
|
7
|
+
data.tar.gz: 9c85a5715c2f295cd6072f41853fc3664f8624a575dbe78b0df09e333668ec9155d7b54b4a1599c6c6cb03f58b607effbdc8b2a0e2afa9b525329e42a9b6808b
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -45,19 +45,29 @@ Incognia.configure(
|
|
|
45
45
|
)
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
`max_connections` sets the maximum number of concurrent persistent
|
|
50
|
-
|
|
48
|
+
HTTP connection reuse is enabled by default. When connection reuse is enabled,
|
|
49
|
+
`max_connections` sets the maximum number of concurrent persistent connections
|
|
50
|
+
used by the client.
|
|
51
51
|
|
|
52
52
|
```ruby
|
|
53
53
|
Incognia.configure(
|
|
54
54
|
client_id: ENV['INCOGNIA_CLIENT_ID'],
|
|
55
55
|
client_secret: ENV['INCOGNIA_CLIENT_SECRET'],
|
|
56
|
-
keep_alive: true,
|
|
57
56
|
max_connections: 5
|
|
58
57
|
)
|
|
59
58
|
```
|
|
60
59
|
|
|
60
|
+
To disable persistent connections, set `keep_alive: false`. `max_connections`
|
|
61
|
+
can only be configured when `keep_alive` is enabled.
|
|
62
|
+
|
|
63
|
+
```ruby
|
|
64
|
+
Incognia.configure(
|
|
65
|
+
client_id: ENV['INCOGNIA_CLIENT_ID'],
|
|
66
|
+
client_secret: ENV['INCOGNIA_CLIENT_SECRET'],
|
|
67
|
+
keep_alive: false
|
|
68
|
+
)
|
|
69
|
+
```
|
|
70
|
+
|
|
61
71
|
For sandbox credentials, refer to the [API testing guide](https://developer.incognia.com/).
|
|
62
72
|
|
|
63
73
|
:bulb: For Rails applications it's recommended to create an initializer file, for example `config/initializers/incognia.rb`.
|
|
@@ -6,7 +6,7 @@ module Incognia
|
|
|
6
6
|
|
|
7
7
|
attr_accessor :client_id, :client_secret, :host, :keep_alive, :max_connections
|
|
8
8
|
|
|
9
|
-
def configure(client_id:, client_secret:, host: nil, keep_alive:
|
|
9
|
+
def configure(client_id:, client_secret:, host: nil, keep_alive: true, max_connections: nil)
|
|
10
10
|
validate_connection_settings!(keep_alive: keep_alive, max_connections: max_connections)
|
|
11
11
|
|
|
12
12
|
@client_id = client_id
|
data/lib/incognia_api/version.rb
CHANGED
data/lib/incognia_api.rb
CHANGED
|
@@ -29,7 +29,9 @@ module Incognia
|
|
|
29
29
|
class APIError < StandardError
|
|
30
30
|
attr_reader :message, :errors, :status
|
|
31
31
|
|
|
32
|
-
def initialize(message, response_info =
|
|
32
|
+
def initialize(message, response_info = nil)
|
|
33
|
+
response_info ||= {}
|
|
34
|
+
|
|
33
35
|
@status = response_info[:status]
|
|
34
36
|
@errors = response_info[:body]
|
|
35
37
|
@message = format_message(message)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: incognia_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 4.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Guilherme Cavalcanti
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-05-
|
|
11
|
+
date: 2026-05-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|