userplex 0.9.0 → 0.10.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 +8 -0
- data/README.md +6 -6
- data/lib/userplex/client.rb +9 -0
- data/lib/userplex/internal/transport/base_client.rb +6 -0
- data/lib/userplex/version.rb +1 -1
- data/rbi/userplex/client.rbi +5 -0
- data/rbi/userplex/internal/transport/base_client.rbi +5 -0
- data/sig/userplex/client.rbs +2 -0
- data/sig/userplex/internal/transport/base_client.rbs +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e502616a2af232f8ae57aed98a20b63cbb2692c63d605b767daa98c405ae1f79
|
|
4
|
+
data.tar.gz: 4f0c7af74f7ef8360334bab9b3f95b080017fc54ed8bcf048aec0f9713f55b57
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4f81a8ae1df9d5dc2dbacdd9b4fedb8f92d452c5dd51dfd6b573d7e130ef084876a66b33831a9687a0b95434fbb9bee627aa988a5b70fb462cae15b8e17197ef
|
|
7
|
+
data.tar.gz: 9a231d973f6c51f82982fc6daf5c82c30a7eb9609c543f454c9358e41953b904f050a1d28ade6285f125eaaed8708ea3e9bdd55fb53b1c98e2dc03db5d8b62c0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.0 (2025-12-23)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.9.0...v0.10.0](https://github.com/dqnamo/userplex-ruby/compare/v0.9.0...v0.10.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([8469f14](https://github.com/dqnamo/userplex-ruby/commit/8469f14d559a6c989951efbf344740ba46b2018b))
|
|
10
|
+
|
|
3
11
|
## 0.9.0 (2025-12-23)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.8.0...v0.9.0](https://github.com/dqnamo/userplex-ruby/compare/v0.8.0...v0.9.0)
|
data/README.md
CHANGED
|
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
|
15
15
|
<!-- x-release-please-start-version -->
|
|
16
16
|
|
|
17
17
|
```ruby
|
|
18
|
-
gem "userplex", "~> 0.
|
|
18
|
+
gem "userplex", "~> 0.10.0"
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
<!-- x-release-please-end -->
|
|
@@ -26,7 +26,9 @@ gem "userplex", "~> 0.9.0"
|
|
|
26
26
|
require "bundler/setup"
|
|
27
27
|
require "userplex"
|
|
28
28
|
|
|
29
|
-
userplex = Userplex::Client.new(
|
|
29
|
+
userplex = Userplex::Client.new(
|
|
30
|
+
api_key: ENV["USERPLEX_API_KEY"] # This is the default and can be omitted
|
|
31
|
+
)
|
|
30
32
|
|
|
31
33
|
response = userplex.logs.new(name: "REPLACE_ME")
|
|
32
34
|
|
|
@@ -78,8 +80,7 @@ You can use the `max_retries` option to configure or disable this:
|
|
|
78
80
|
```ruby
|
|
79
81
|
# Configure the default for all requests:
|
|
80
82
|
userplex = Userplex::Client.new(
|
|
81
|
-
max_retries: 0
|
|
82
|
-
api_key: "My API Key"
|
|
83
|
+
max_retries: 0 # default is 2
|
|
83
84
|
)
|
|
84
85
|
|
|
85
86
|
# Or, configure per-request:
|
|
@@ -93,8 +94,7 @@ By default, requests will time out after 60 seconds. You can use the timeout opt
|
|
|
93
94
|
```ruby
|
|
94
95
|
# Configure the default for all requests:
|
|
95
96
|
userplex = Userplex::Client.new(
|
|
96
|
-
timeout: nil
|
|
97
|
-
api_key: "My API Key"
|
|
97
|
+
timeout: nil # default is 60
|
|
98
98
|
)
|
|
99
99
|
|
|
100
100
|
# Or, configure per-request:
|
data/lib/userplex/client.rb
CHANGED
|
@@ -25,6 +25,15 @@ module Userplex
|
|
|
25
25
|
# @return [Userplex::Resources::Logs]
|
|
26
26
|
attr_reader :logs
|
|
27
27
|
|
|
28
|
+
# @api private
|
|
29
|
+
#
|
|
30
|
+
# @return [Hash{String=>String}]
|
|
31
|
+
private def auth_headers
|
|
32
|
+
return {} if @api_key.nil?
|
|
33
|
+
|
|
34
|
+
{"authorization" => "Bearer #{@api_key}"}
|
|
35
|
+
end
|
|
36
|
+
|
|
28
37
|
# Creates and returns a new client for interacting with the API.
|
|
29
38
|
#
|
|
30
39
|
# @param api_key [String, nil] Enter your API key from your project settings Defaults to
|
|
@@ -215,6 +215,11 @@ module Userplex
|
|
|
215
215
|
@max_retry_delay = max_retry_delay
|
|
216
216
|
end
|
|
217
217
|
|
|
218
|
+
# @api private
|
|
219
|
+
#
|
|
220
|
+
# @return [Hash{String=>String}]
|
|
221
|
+
private def auth_headers = {}
|
|
222
|
+
|
|
218
223
|
# @api private
|
|
219
224
|
#
|
|
220
225
|
# @return [String]
|
|
@@ -271,6 +276,7 @@ module Userplex
|
|
|
271
276
|
|
|
272
277
|
headers = Userplex::Internal::Util.normalized_headers(
|
|
273
278
|
@headers,
|
|
279
|
+
auth_headers,
|
|
274
280
|
req[:headers].to_h,
|
|
275
281
|
opts[:extra_headers].to_h
|
|
276
282
|
)
|
data/lib/userplex/version.rb
CHANGED
data/rbi/userplex/client.rbi
CHANGED
|
@@ -20,6 +20,11 @@ module Userplex
|
|
|
20
20
|
sig { returns(Userplex::Resources::Logs) }
|
|
21
21
|
attr_reader :logs
|
|
22
22
|
|
|
23
|
+
# @api private
|
|
24
|
+
sig { override.returns(T::Hash[String, String]) }
|
|
25
|
+
private def auth_headers
|
|
26
|
+
end
|
|
27
|
+
|
|
23
28
|
# Creates and returns a new client for interacting with the API.
|
|
24
29
|
sig do
|
|
25
30
|
params(
|
data/sig/userplex/client.rbs
CHANGED