api_six_client 1.1.1 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/api_six_client/base.rb +5 -1
- data/lib/api_six_client/base_int.rb +13 -0
- data/lib/api_six_client/base_v2.rb +13 -0
- data/lib/api_six_client/config.rb +2 -5
- data/lib/api_six_client/version.rb +1 -1
- data/lib/api_six_client.rb +5 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e84fe93bc2ec65ca6414bc18743702d075122ed1b5200650bb2ebdcf606448bc
|
4
|
+
data.tar.gz: 8668933ceb8853d2dd01a6d3f94c3c3a58e64fbe3f97f041c25ef1f034c62a60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 667bfc03efc5579aaa0774fa8d1b867f2e0c649e8b8023fe01d8f0beb76ae5789cb7dcb61cd8c2138c249bf1e53aead12b9a3e45fcb2bab1c66a3aa36017855b
|
7
|
+
data.tar.gz: 66139955352a4afbe2e031ca0f4ac6ff1d5366dd7b7e47da1939adf24440ed14f460fab7d770971f5a5727715bbc75677437c108296dc4a80691ee8d1e52563b
|
data/Gemfile.lock
CHANGED
data/lib/api_six_client/base.rb
CHANGED
@@ -31,10 +31,14 @@ module ApiSixClient
|
|
31
31
|
request __method__, path, params, headers
|
32
32
|
end
|
33
33
|
|
34
|
+
def delete(path, params = {}, headers = {})
|
35
|
+
request __method__, path, params, headers
|
36
|
+
end
|
37
|
+
|
34
38
|
private
|
35
39
|
|
36
40
|
def service_path
|
37
|
-
self.class.name.
|
41
|
+
self.class.name.demodulize.underscore
|
38
42
|
end
|
39
43
|
|
40
44
|
def request(method, path, params = {}, headers = {})
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ApiSixClient
|
4
|
+
class BaseInt < Base
|
5
|
+
def initialize(endpoint: nil, auth_token: nil)
|
6
|
+
@endpoint = ApiSixClient.config.endpoint_int
|
7
|
+
@auth_token = ApiSixClient.config.auth_token_int
|
8
|
+
|
9
|
+
raise Errors::EndpointIsEmpty unless @endpoint
|
10
|
+
raise Errors::AuthTokenIsEmpty unless @auth_token
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ApiSixClient
|
4
|
+
class BaseV2 < Base
|
5
|
+
def initialize(endpoint: nil, auth_token: nil)
|
6
|
+
@endpoint = ApiSixClient.config.endpoint_v2
|
7
|
+
@auth_token = ApiSixClient.config.auth_token_v2
|
8
|
+
|
9
|
+
raise Errors::EndpointIsEmpty unless @endpoint
|
10
|
+
raise Errors::AuthTokenIsEmpty unless @auth_token
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -3,10 +3,7 @@
|
|
3
3
|
module ApiSixClient
|
4
4
|
class Config
|
5
5
|
attr_accessor :endpoint, :auth_token
|
6
|
-
|
7
|
-
|
8
|
-
@endpoint = endpoint
|
9
|
-
@auth_token = auth_token
|
10
|
-
end
|
6
|
+
attr_accessor :endpoint_v2, :auth_token_v2
|
7
|
+
attr_accessor :endpoint_int, :auth_token_int
|
11
8
|
end
|
12
9
|
end
|
data/lib/api_six_client.rb
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
require 'api_six_client/version'
|
4
4
|
require 'api_six_client/config'
|
5
5
|
require 'api_six_client/base'
|
6
|
+
require 'api_six_client/base_v2'
|
7
|
+
require 'api_six_client/base_int'
|
6
8
|
require 'api_six_client/errors'
|
7
9
|
|
8
10
|
module ApiSixClient
|
@@ -24,4 +26,7 @@ module ApiSixClient
|
|
24
26
|
class Fin < Base; end
|
25
27
|
class Olc < Base; end
|
26
28
|
class Eno < Base; end
|
29
|
+
|
30
|
+
class AuthInt < BaseInt; end
|
31
|
+
class OlcInt < BaseInt; end
|
27
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: api_six_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eugene Dobrorodnov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -42,6 +42,8 @@ files:
|
|
42
42
|
- bin/setup
|
43
43
|
- lib/api_six_client.rb
|
44
44
|
- lib/api_six_client/base.rb
|
45
|
+
- lib/api_six_client/base_int.rb
|
46
|
+
- lib/api_six_client/base_v2.rb
|
45
47
|
- lib/api_six_client/config.rb
|
46
48
|
- lib/api_six_client/errors.rb
|
47
49
|
- lib/api_six_client/version.rb
|