bridgeapi_client 1.0.1 → 1.0.3
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 +6 -0
- data/lib/bridge_api/api/client.rb +9 -4
- data/lib/bridge_api/configuration.rb +2 -1
- data/lib/bridge_api/version.rb +1 -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: 7a10482e9da1b5df10f9db165afa451b01adacbccc4bf5b00abbe3f3c72b3ee4
|
|
4
|
+
data.tar.gz: 45d64a4e917964f892e62be5f280926498cfa174b3a764c24e60de6948c3de6b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 35db91fdae4f9c0fae372209a98ccd5102604f9b97632789f5bfa1bfdd59276a33b4931f340826053f98cb42b93d04afcd401f725551a7a098d960f3c009d152
|
|
7
|
+
data.tar.gz: 4e3ec85a01f3adb9a9705eb4302334658f0197199a4edb774c62529538f3e93f8e35884ec438876b1c14789e7b35e5f6f758a706290d9c30bf5753bbc5a0adbf
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.2] - 2026-02-07
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- `locale` configuration option (default: `"fr"`) for `Accept-Language` header
|
|
7
|
+
- `Accept-Language` header sent on all API requests for localized status descriptions
|
|
8
|
+
|
|
3
9
|
## [1.0.1] - 2026-02-07
|
|
4
10
|
|
|
5
11
|
### Changed
|
|
@@ -144,11 +144,15 @@ module BridgeApi
|
|
|
144
144
|
BridgeApi.configuration.debug
|
|
145
145
|
end
|
|
146
146
|
|
|
147
|
-
def handle_paging(data)
|
|
147
|
+
def handle_paging(data, original_params = {})
|
|
148
148
|
page_uri = URI.parse(data[:pagination][:next_uri])
|
|
149
|
-
|
|
149
|
+
next_page_params = URI.decode_www_form(page_uri.query).to_h.symbolize_keys
|
|
150
|
+
|
|
151
|
+
# Merge original params (like filters) with next page params (pagination cursor)
|
|
152
|
+
# Next page params take precedence
|
|
153
|
+
merged_params = original_params.merge(next_page_params)
|
|
150
154
|
|
|
151
|
-
next_page_data = get(page_uri.path, **
|
|
155
|
+
next_page_data = get(page_uri.path, **merged_params)
|
|
152
156
|
|
|
153
157
|
next_page_data[:resources] = data[:resources] + next_page_data[:resources]
|
|
154
158
|
next_page_data
|
|
@@ -161,7 +165,8 @@ module BridgeApi
|
|
|
161
165
|
"Client-Id" => BridgeApi.configuration.api_client_id,
|
|
162
166
|
"Client-Secret" => BridgeApi.configuration.api_client_secret,
|
|
163
167
|
"Content-Type" => "application/json",
|
|
164
|
-
"Accept" => "application/json"
|
|
168
|
+
"Accept" => "application/json",
|
|
169
|
+
"Accept-Language" => BridgeApi.configuration.locale
|
|
165
170
|
}
|
|
166
171
|
|
|
167
172
|
return headers unless access_token
|
|
@@ -21,7 +21,7 @@ module BridgeApi
|
|
|
21
21
|
#
|
|
22
22
|
class Configuration
|
|
23
23
|
attr_reader :api_base_url, :api_version
|
|
24
|
-
attr_accessor :api_client_id, :api_client_secret, :follow_pages, :debug
|
|
24
|
+
attr_accessor :api_client_id, :api_client_secret, :follow_pages, :debug, :locale
|
|
25
25
|
|
|
26
26
|
#
|
|
27
27
|
# Initializes Configuration
|
|
@@ -33,6 +33,7 @@ module BridgeApi
|
|
|
33
33
|
@api_client_secret = ""
|
|
34
34
|
@follow_pages = false
|
|
35
35
|
@debug = false
|
|
36
|
+
@locale = "fr"
|
|
36
37
|
end
|
|
37
38
|
end
|
|
38
39
|
end
|
data/lib/bridge_api/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bridgeapi_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Olivier Buffon
|
|
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
91
91
|
- !ruby/object:Gem::Version
|
|
92
92
|
version: '0'
|
|
93
93
|
requirements: []
|
|
94
|
-
rubygems_version: 4.0.
|
|
94
|
+
rubygems_version: 4.0.7
|
|
95
95
|
specification_version: 4
|
|
96
96
|
summary: Ruby client for the Bridge API
|
|
97
97
|
test_files: []
|