apimatic_core_interfaces 0.2.0 → 0.2.2

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: aaf47cc9c42b3a20af7fa3b74bdabd33852f43d29e7f2fe426ee17f51fb0ff42
4
- data.tar.gz: 4d9200846000fa6492e05d04d4dbc51b27ff7a3e077b583f96af5e9d89c8a420
3
+ metadata.gz: bb1641a899a871a9ce535ef8f0067428fadfeef40a4225caf6e2888f4efe2bba
4
+ data.tar.gz: 96cea708ad59e88a0d2f3058a2411718032fd1d68528ee374755b93f4fb90fe4
5
5
  SHA512:
6
- metadata.gz: b9a7ca20453fd54f0342271f1a4173fe3165c0cb53a45e1bbdff5e8379d0c9edd6a7b5135cb960ecb23ec97543d7d4f196290645ca11bafe23bf36c4490099bc
7
- data.tar.gz: be574e6033423b730fe3e8a4e5f5c3d9b5167e0e4bfa376645cdee46310ea692a15cb297c82d42894bcd790647d2517d735afc0b630b45d601ba23aed08fa1bf
6
+ metadata.gz: 1c8ef44909e9ad1bd2b9fa303610b4b0850355b5d15f31544255fcc0857b8ba02115f36ca99d06fdbda44af94d53b2bb4aa99d46a75512c97e6f0734c3f1acb7
7
+ data.tar.gz: 831893359497ca2843612c9d3ff6b31b867e282e0c1483b4b145986963e9dd623157e3b82eb925a7a33e4debcc4539003a5d04997e67a1add8dbdb45453e5d9e
data/README.md CHANGED
@@ -3,7 +3,8 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/apimatic_core_interfaces.svg)](https://badge.fury.io/rb/apimatic_core_interfaces)
4
4
  [![Linting][lint-badge]][lint-url]
5
5
  [![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop/rubocop)
6
- [![Maintainability][maintainability-url]][code-climate-url]
6
+ [![Maintainability Rating][maintainability-badge]][maintainability-url]
7
+ [![Vulnerabilities][vulnerabilities-badge]][vulnerabilities-url]
7
8
  [![Licence][license-badge]][license-url]
8
9
 
9
10
  ## Introduction
@@ -30,7 +31,8 @@ gem 'apimatic_core_interfaces'
30
31
  | [`ResponseFactory`](lib/apimatic-core-interfaces/factories/response_factory.rb) | To convert the client-adapter response into a custom HTTP response |
31
32
  | [`Authentication`](lib/apimatic-core-interfaces/types/authentication.rb) | To setup methods for the validation and application of the required authentication scheme |
32
33
  | [`UnionType`](lib/apimatic-core-interfaces/types/union_type.rb) | To setup methods for the validation, serialization and deserialization of OneOf/AnyOf union types |
33
- | [`ClientConfiguration`](lib/apimatic-core-interfaces/client/client_configuration.rb) | To setup the http client configurations including retries, timeouts and connections etc. |
34
+ | [`ApiLogger`](lib/apimatic-core-interfaces/logger/api_logger.rb) | An interface for logging API requests and responses. |
35
+ | [`Logger`](lib/apimatic-core-interfaces/logger/logger.rb) | An interface for the generic logger facade |
34
36
 
35
37
 
36
38
  ## Enumerations
@@ -42,7 +44,9 @@ gem 'apimatic_core_interfaces'
42
44
 
43
45
  [lint-badge]: https://github.com/apimatic/core-interfaces-ruby/actions/workflows/lint-runner.yml/badge.svg
44
46
  [lint-url]: https://github.com/apimatic/core-interfaces-ruby/actions/workflows/lint-runner.yml
45
- [code-climate-url]: https://codeclimate.com/github/apimatic/core-interfaces-ruby
46
- [maintainability-url]: https://api.codeclimate.com/v1/badges/6557a25e71f7e97e4bb5/maintainability
47
+ [maintainability-badge]: https://sonarcloud.io/api/project_badges/measure?project=apimatic_core-interfaces-ruby&metric=sqale_rating
48
+ [maintainability-url]: https://sonarcloud.io/summary/new_code?id=apimatic_core-interfaces-ruby
49
+ [vulnerabilities-badge]: https://sonarcloud.io/api/project_badges/measure?project=apimatic_core-interfaces-ruby&metric=vulnerabilities
50
+ [vulnerabilities-url]: https://sonarcloud.io/summary/new_code?id=apimatic_core-interfaces-ruby
47
51
  [license-badge]: https://img.shields.io/badge/licence-MIT-blue
48
52
  [license-url]: LICENSE
@@ -4,6 +4,7 @@ module CoreLibrary
4
4
  # for HTTP Client Configuration class.
5
5
  class ClientConfiguration
6
6
  attr_reader :timeout, :max_retries, :retry_interval, :backoff_factor, :retry_statuses,
7
- :retry_methods, :connection, :adapter, :response_factory, :cache, :verify
7
+ :retry_methods, :connection, :adapter, :response_factory, :cache, :verify,
8
+ :proxy_settings
8
9
  end
9
10
  end
@@ -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.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - APIMatic Ltd.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-04 00:00:00.000000000 Z
11
+ date: 2025-08-12 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
@@ -36,7 +38,7 @@ homepage: https://apimatic.io
36
38
  licenses:
37
39
  - MIT
38
40
  metadata: {}
39
- post_install_message:
41
+ post_install_message:
40
42
  rdoc_options: []
41
43
  require_paths:
42
44
  - lib
@@ -51,8 +53,8 @@ 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.10
55
- signing_key:
56
+ rubygems_version: 3.4.19
57
+ signing_key:
56
58
  specification_version: 4
57
59
  summary: An abstract layer of the functionalities provided by apimatic-core, faraday-client-adapter
58
60
  and APIMatic SDKs.