gds-api-adapters 98.1.0 → 98.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2b9f52394507921888ca9abe107c764de4af4da163dc2609f9909559f31e288
4
- data.tar.gz: 94ff2e4bfb6f7a6b015e0049f82bc609cdbe416ee6355fdcc757b3d8d3177668
3
+ metadata.gz: 51c7c6ffe18c5c3e712794c4d3fe5e3ae59009d4b48aa0b271ef3603aae8c12e
4
+ data.tar.gz: 18eef9cf5a8ff6a3a5f4378ae5ae312c4480c5ed959a4f482202422fe30228f0
5
5
  SHA512:
6
- metadata.gz: b1cdf84bd90af029ea2c0ca24cc091cdc3b69b9c261ee6ec2632b4587e4c7db454fb56de499d0e499b110ac39567c013313f6ee6440368fe46dbf67f0ed07e74
7
- data.tar.gz: 53ad365fffa3ac456e7e77412c986af8e6403dabb63c571a3327db5ac16fbcf573605d901c8ca29bf6cea9f1e9573320299c8e40050a0d7d9e4ea17ec2ca73b3
6
+ metadata.gz: 978ddb8ee98fa3b2d077d293c35fd483e5316e3eb687f0cb7cd9f60f49687f136721b43eda266dbb963429ad1365aad7e327a744aa5d67a9beee295a525456d5
7
+ data.tar.gz: 4f6f6407912450e38293d8c9014c38898df6902701ab0319784cef83bbe8e951da77e623e345a29e12802ecb518f788a1f859945ae1d569dd5ab5c812f23a1ab
@@ -0,0 +1,17 @@
1
+ require_relative "base"
2
+
3
+ class GdsApi::SignonApi < GdsApi::Base
4
+ # Get users with specific UUIDs
5
+ #
6
+ # @param uuids [Array]
7
+ #
8
+ # signon_api.users(
9
+ # ["7ac47b33-c09c-4c1d-a9a7-0cfef99081ac"],
10
+ # )
11
+ #
12
+ # @return [GdsApi::Response] A response containing a list of users with the specified UUIDs
13
+ def get_users(uuids:)
14
+ query = query_string(uuids:)
15
+ get_json("#{endpoint}/api/users#{query}")
16
+ end
17
+ end
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = "98.1.0".freeze
2
+ VERSION = "98.2.0".freeze
3
3
  end
data/lib/gds_api.rb CHANGED
@@ -16,6 +16,7 @@ require "gds_api/organisations"
16
16
  require "gds_api/publishing_api"
17
17
  require "gds_api/search"
18
18
  require "gds_api/search_api_v2"
19
+ require "gds_api/signon_api"
19
20
  require "gds_api/support"
20
21
  require "gds_api/support_api"
21
22
  require "gds_api/worldwide"
@@ -154,6 +155,19 @@ module GdsApi
154
155
  )
155
156
  end
156
157
 
158
+ # Creates a GdsApi::SignonApi adapter
159
+ #
160
+ # This will set a bearer token if a PUBLISHING_API_BEARER_TOKEN environment
161
+ # variable is set
162
+ #
163
+ # @return [GdsApi::SignonApi]
164
+ def self.signon_api(options = {})
165
+ GdsApi::SignonApi.new(
166
+ Plek.find("signon"),
167
+ { bearer_token: ENV["SIGNON_API_BEARER_TOKEN"] }.merge(options),
168
+ )
169
+ end
170
+
157
171
  # Creates a GdsApi::Search adapter to access via a search.* hostname
158
172
  #
159
173
  # @return [GdsApi::Search]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gds-api-adapters
3
3
  version: !ruby/object:Gem::Version
4
- version: 98.1.0
4
+ version: 98.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2024-12-18 00:00:00.000000000 Z
10
+ date: 2025-01-06 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: addressable
@@ -267,14 +267,14 @@ dependencies:
267
267
  requirements:
268
268
  - - '='
269
269
  - !ruby/object:Gem::Version
270
- version: 5.0.5
270
+ version: 5.0.7
271
271
  type: :development
272
272
  prerelease: false
273
273
  version_requirements: !ruby/object:Gem::Requirement
274
274
  requirements:
275
275
  - - '='
276
276
  - !ruby/object:Gem::Version
277
- version: 5.0.5
277
+ version: 5.0.7
278
278
  - !ruby/object:Gem::Dependency
279
279
  name: simplecov
280
280
  requirement: !ruby/object:Gem::Requirement
@@ -352,6 +352,7 @@ files:
352
352
  - lib/gds_api/response.rb
353
353
  - lib/gds_api/search.rb
354
354
  - lib/gds_api/search_api_v2.rb
355
+ - lib/gds_api/signon_api.rb
355
356
  - lib/gds_api/support.rb
356
357
  - lib/gds_api/support_api.rb
357
358
  - lib/gds_api/test_helpers/account_api.rb
@@ -398,7 +399,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
398
399
  - !ruby/object:Gem::Version
399
400
  version: '0'
400
401
  requirements: []
401
- rubygems_version: 3.6.1
402
+ rubygems_version: 3.6.2
402
403
  specification_version: 4
403
404
  summary: Adapters to work with GDS APIs
404
405
  test_files: []