apimatic_core_interfaces 0.2.0 → 0.2.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01a4e34ebafdba39e2611a2b683cd55dfc9e28d1ba990680b247e82e0258eebb
|
4
|
+
data.tar.gz: 100242792ff4890d5a68fd9ec72dea9027583630b42db0791156cb26cc88dcb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 416839b0980056003f53c6a9329edd837ffb7c4ce0e01cd8a5580a9e19fcb142c76a14dd77b082fbc6741167fe92a62f166902d77fae1b46710c2089d93871fc
|
7
|
+
data.tar.gz: 9b056e3bde0d308e524b526b597d32e0289c3ad3594f5f070479b80ad782d7905f31eac1b25a6833c1a9079f892eedf761dda0d0ad3cef8b3d4a07b6fca34337
|
data/README.md
CHANGED
@@ -30,7 +30,8 @@ gem 'apimatic_core_interfaces'
|
|
30
30
|
| [`ResponseFactory`](lib/apimatic-core-interfaces/factories/response_factory.rb) | To convert the client-adapter response into a custom HTTP response |
|
31
31
|
| [`Authentication`](lib/apimatic-core-interfaces/types/authentication.rb) | To setup methods for the validation and application of the required authentication scheme |
|
32
32
|
| [`UnionType`](lib/apimatic-core-interfaces/types/union_type.rb) | To setup methods for the validation, serialization and deserialization of OneOf/AnyOf union types |
|
33
|
-
| [`
|
33
|
+
| [`ApiLogger`](lib/apimatic-core-interfaces/logger/api_logger.rb) | An interface for logging API requests and responses. |
|
34
|
+
| [`Logger`](lib/apimatic-core-interfaces/logger/logger.rb) | An interface for the generic logger facade |
|
34
35
|
|
35
36
|
|
36
37
|
## Enumerations
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module CoreLibrary
|
2
|
+
# An interface for logging API requests and responses.
|
3
|
+
# This class should not be instantiated but should be used as a base class
|
4
|
+
# for API logger class.
|
5
|
+
class ApiLogger
|
6
|
+
# Logs the details of an HTTP request.
|
7
|
+
# @param request [HttpRequest] The HTTP request to log.
|
8
|
+
def log_request(request)
|
9
|
+
raise NotImplementedError, 'This method needs to be implemented in a child class.'
|
10
|
+
end
|
11
|
+
|
12
|
+
# Logs the details of an HTTP response.
|
13
|
+
# @param response [HttpResponse] The HTTP response to log.
|
14
|
+
def log_response(response)
|
15
|
+
raise NotImplementedError, 'This method needs to be implemented in a child class.'
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module CoreLibrary
|
2
|
+
# An interface for the generic logger facade.
|
3
|
+
# This class should not be instantiated but should be used as a base class
|
4
|
+
# for Logger class.
|
5
|
+
class Logger
|
6
|
+
# Logs a message with a specified log level and additional parameters.
|
7
|
+
# @param level [Symbol] The log level of the message.
|
8
|
+
# @param message [String] The message to log.
|
9
|
+
# @param params [Hash] Additional parameters to include in the log message.
|
10
|
+
def log(level, message, params)
|
11
|
+
raise NotImplementedError, 'This method needs to be implemented in a child class.'
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -3,6 +3,9 @@ require_relative 'apimatic-core-interfaces/client/client_configuration'
|
|
3
3
|
|
4
4
|
require_relative 'apimatic-core-interfaces/factories/response_factory'
|
5
5
|
|
6
|
+
require_relative 'apimatic-core-interfaces/logger/logger'
|
7
|
+
require_relative 'apimatic-core-interfaces/logger/api_logger'
|
8
|
+
|
6
9
|
require_relative 'apimatic-core-interfaces/types/authentication'
|
7
10
|
require_relative 'apimatic-core-interfaces/types/union_type'
|
8
11
|
require_relative 'apimatic-core-interfaces/types/http_callback'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apimatic_core_interfaces
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- APIMatic Ltd.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This project contains the abstract layer for APIMatic's core library.
|
14
14
|
The purpose of creating interfaces is to separate out the functionalities needed
|
@@ -25,6 +25,8 @@ files:
|
|
25
25
|
- lib/apimatic-core-interfaces/client/client_configuration.rb
|
26
26
|
- lib/apimatic-core-interfaces/client/http_client.rb
|
27
27
|
- lib/apimatic-core-interfaces/factories/response_factory.rb
|
28
|
+
- lib/apimatic-core-interfaces/logger/api_logger.rb
|
29
|
+
- lib/apimatic-core-interfaces/logger/logger.rb
|
28
30
|
- lib/apimatic-core-interfaces/types/array_serialization_format.rb
|
29
31
|
- lib/apimatic-core-interfaces/types/authentication.rb
|
30
32
|
- lib/apimatic-core-interfaces/types/datetime_format.rb
|
@@ -51,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
51
53
|
- !ruby/object:Gem::Version
|
52
54
|
version: '0'
|
53
55
|
requirements: []
|
54
|
-
rubygems_version: 3.4.
|
56
|
+
rubygems_version: 3.4.19
|
55
57
|
signing_key:
|
56
58
|
specification_version: 4
|
57
59
|
summary: An abstract layer of the functionalities provided by apimatic-core, faraday-client-adapter
|