weconnect 0.1.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.
data/lib/weconnect.rb ADDED
@@ -0,0 +1,24 @@
1
+ require "wrapi"
2
+ require File.expand_path('weconnect/client', __dir__)
3
+ require File.expand_path('weconnect/pagination', __dir__)
4
+ require File.expand_path('weconnect/version', __dir__)
5
+
6
+ module WeConnect
7
+ extend WrAPI::Configuration
8
+ extend WrAPI::RespondTo
9
+
10
+ DEFAULT_UA = "WeConnect/3 CFNetwork/1331.0.7 Darwin/21.4.0 Ruby WeConnect Client #{WeConnect::VERSION}".freeze
11
+ DEFAULT_ENDPOINT = 'https://emea.bff.cariad.digital/login/v1/idk/openid-configuration'.freeze
12
+ #
13
+ # @return [WeConnect::Client]
14
+ def self.client(options = {})
15
+ WeConnect::Client.new({ user_agent: DEFAULT_UA, endpoint: DEFAULT_ENDPOINT, pagination_class: RequestPagination::DefaultPager }.merge(options))
16
+ end
17
+
18
+ def self.reset
19
+ super
20
+ self.user_agent = DEFAULT_UA
21
+ self.endpoint = DEFAULT_ENDPOINT
22
+ self.pagination_class = RequestPagination::DefaultPager
23
+ end
24
+ end