automation-test 1.1 → 1.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -12
  3. data/lib/{apimatic_calculator → coin_gecko_apiv3}/api_helper.rb +2 -2
  4. data/lib/coin_gecko_apiv3/client.rb +125 -0
  5. data/lib/{apimatic_calculator → coin_gecko_apiv3}/configuration.rb +5 -6
  6. data/lib/coin_gecko_apiv3/controllers/asset_platforms_controller.rb +29 -0
  7. data/lib/{apimatic_calculator → coin_gecko_apiv3}/controllers/base_controller.rb +2 -2
  8. data/lib/coin_gecko_apiv3/controllers/categories_controller.rb +52 -0
  9. data/lib/coin_gecko_apiv3/controllers/coins_controller.rb +389 -0
  10. data/lib/coin_gecko_apiv3/controllers/companies_beta_controller.rb +35 -0
  11. data/lib/coin_gecko_apiv3/controllers/contract_controller.rb +119 -0
  12. data/lib/coin_gecko_apiv3/controllers/derivatives_controller.rb +112 -0
  13. data/lib/coin_gecko_apiv3/controllers/events_controller.rb +89 -0
  14. data/lib/coin_gecko_apiv3/controllers/exchange_rates_controller.rb +29 -0
  15. data/lib/coin_gecko_apiv3/controllers/exchanges_controller.rb +192 -0
  16. data/lib/coin_gecko_apiv3/controllers/finance_controller.rb +71 -0
  17. data/lib/coin_gecko_apiv3/controllers/global_controller.rb +29 -0
  18. data/lib/coin_gecko_apiv3/controllers/indexes_controller.rb +79 -0
  19. data/lib/coin_gecko_apiv3/controllers/ping_controller.rb +29 -0
  20. data/lib/coin_gecko_apiv3/controllers/simple_controller.rb +126 -0
  21. data/lib/coin_gecko_apiv3/controllers/status_updates_controller.rb +48 -0
  22. data/lib/coin_gecko_apiv3/controllers/trending_controller.rb +30 -0
  23. data/lib/{apimatic_calculator → coin_gecko_apiv3}/exceptions/api_exception.rb +2 -2
  24. data/lib/{apimatic_calculator → coin_gecko_apiv3}/http/faraday_client.rb +2 -2
  25. data/lib/{apimatic_calculator → coin_gecko_apiv3}/http/http_call_back.rb +2 -2
  26. data/lib/{apimatic_calculator → coin_gecko_apiv3}/http/http_client.rb +2 -2
  27. data/lib/{apimatic_calculator → coin_gecko_apiv3}/http/http_method_enum.rb +2 -2
  28. data/lib/{apimatic_calculator → coin_gecko_apiv3}/http/http_request.rb +2 -2
  29. data/lib/{apimatic_calculator → coin_gecko_apiv3}/http/http_response.rb +2 -2
  30. data/lib/{apimatic_calculator → coin_gecko_apiv3}/models/base_model.rb +2 -2
  31. data/lib/{apimatic_calculator → coin_gecko_apiv3}/utilities/date_time_helper.rb +2 -2
  32. data/lib/{apimatic_calculator → coin_gecko_apiv3}/utilities/file_wrapper.rb +2 -2
  33. data/lib/coin_gecko_apiv3.rb +52 -0
  34. data/test/controllers/controller_test_base.rb +3 -3
  35. data/test/controllers/test_asset_platforms_controller.rb +25 -0
  36. data/test/controllers/test_categories_controller.rb +37 -0
  37. data/test/controllers/test_coins_controller.rb +27 -0
  38. data/test/controllers/test_derivatives_controller.rb +51 -0
  39. data/test/controllers/test_events_controller.rb +55 -0
  40. data/test/controllers/test_exchange_rates_controller.rb +26 -0
  41. data/test/controllers/test_exchanges_controller.rb +38 -0
  42. data/test/controllers/test_finance_controller.rb +43 -0
  43. data/test/controllers/test_global_controller.rb +26 -0
  44. data/test/controllers/test_indexes_controller.rb +38 -0
  45. data/test/controllers/test_ping_controller.rb +26 -0
  46. data/test/controllers/test_simple_controller.rb +25 -0
  47. data/test/controllers/test_status_updates_controller.rb +31 -0
  48. data/test/controllers/test_trending_controller.rb +25 -0
  49. data/test/http_response_catcher.rb +2 -2
  50. data/test/test_helper.rb +1 -1
  51. metadata +49 -22
  52. data/lib/apimatic_calculator/client.rb +0 -35
  53. data/lib/apimatic_calculator/controllers/simple_calculator_controller.rb +0 -45
  54. data/lib/apimatic_calculator/models/operation_type_enum.rb +0 -23
  55. data/lib/apimatic_calculator.rb +0 -38
  56. data/test/controllers/test_simple_calculator_controller.rb +0 -34
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 789696a83c0f7f031dc78d6533e93ac90fd0d93c6f2b2e0a15e25022919c35e5
4
- data.tar.gz: 3a9ba4945fe67fe8663b19188a45806e19dfe6e42145a50db22218e8190b04f9
3
+ metadata.gz: abf9db8c83300af74dabc17cc1d334580a5eadf21ff08e663421c2a5988c0db4
4
+ data.tar.gz: afaa3c8da5161b062b58441a7e3beebb37e3c412896b26705a1173e4287b6ac7
5
5
  SHA512:
6
- metadata.gz: a6a62c6cf3bdfa6fb0591b2aa31b7515ff61e869694f71d987922fcc3817fce3f2fb518b5c2fd4a720b168c4696b914ffe89b7c4af8ebe72f0f36fb03f643c4d
7
- data.tar.gz: ba90546aa1721551369c5da62c526021dd5e9affbbe468bf6d2254e8e542e2c07f2515186cdc91fc26209576509dc3561f8b8ac26801f124fb5631455f6c3d7d
6
+ metadata.gz: 120710b46f761dad68d384ebc22076fdce03de5e2d2ec93a7aef3145f6eac5f2e5bef3460f1ddd1f275a3bc0c560715f0d042f168ed1dc085bf0cb2b65dc3b06
7
+ data.tar.gz: 181c1fda44c1ecc34d84253842487614515b4d1f974532065c6668953466a9641aa236725ae7784a0729822d62940709f728cb2150cde61d49f8c709bb6f46fd
data/README.md CHANGED
@@ -1,25 +1,21 @@
1
1
 
2
- # Getting Started with APIMATIC Calculator
3
-
4
- ## Introduction
5
-
6
- Simple calculator API hosted on APIMATIC
2
+ # Getting Started with CoinGecko API V3
7
3
 
8
4
  ## Install the Package
9
5
 
10
6
  Install the gem from the command line:
11
7
 
12
8
  ```ruby
13
- gem install automation-test -v 1.1
9
+ gem install automation-test -v 1.14
14
10
  ```
15
11
 
16
12
  Or add the gem to your Gemfile and run `bundle`:
17
13
 
18
14
  ```ruby
19
- gem 'automation-test', '1.1'
15
+ gem 'automation-test', '1.14'
20
16
  ```
21
17
 
22
- For additional gem details, see the [RubyGems page for the automation-test gem](https://rubygems.org/gems/automation-test/versions/1.1).
18
+ For additional gem details, see the [RubyGems page for the automation-test gem](https://rubygems.org/gems/automation-test/versions/1.14).
23
19
 
24
20
  ## Test the SDK
25
21
 
@@ -37,7 +33,6 @@ The following parameters are configurable for the API Client:
37
33
 
38
34
  | Parameter | Type | Description |
39
35
  | --- | --- | --- |
40
- | `environment` | Environment | The API environment. <br> **Default: `Environment.PRODUCTION`** |
41
36
  | `timeout` | `Float` | The value to use for connection timeout. <br> **Default: 60** |
42
37
  | `max_retries` | `Integer` | The number of times to retry an endpoint call if it fails. <br> **Default: 0** |
43
38
  | `retry_interval` | `Float` | Pause in seconds between retries. <br> **Default: 1** |
@@ -48,14 +43,28 @@ The following parameters are configurable for the API Client:
48
43
  The API client can be initialized as follows:
49
44
 
50
45
  ```ruby
51
- client = ApimaticCalculator::Client.new(
52
- environment: Environment::PRODUCTION,
46
+ client = CoinGeckoApiv3::Client.new(
53
47
  )
54
48
  ```
55
49
 
56
50
  ## List of APIs
57
51
 
58
- * [Simple Calculator](/doc/controllers/simple-calculator.md)
52
+ * [Ping](/doc/controllers/ping.md)
53
+ * [Simple](/doc/controllers/simple.md)
54
+ * [Coins](/doc/controllers/coins.md)
55
+ * [Contract](/doc/controllers/contract.md)
56
+ * [Asset Platforms](/doc/controllers/asset-platforms.md)
57
+ * [Categories](/doc/controllers/categories.md)
58
+ * [Exchanges](/doc/controllers/exchanges.md)
59
+ * [Finance](/doc/controllers/finance.md)
60
+ * [Indexes](/doc/controllers/indexes.md)
61
+ * [Derivatives](/doc/controllers/derivatives.md)
62
+ * [Status Updates](/doc/controllers/status-updates.md)
63
+ * [Events](/doc/controllers/events.md)
64
+ * [Exchange Rates](/doc/controllers/exchange-rates.md)
65
+ * [Trending](/doc/controllers/trending.md)
66
+ * [Global](/doc/controllers/global.md)
67
+ * [Companies Beta](/doc/controllers/companies-beta.md)
59
68
 
60
69
  ## Classes Documentation
61
70
 
@@ -1,9 +1,9 @@
1
- # apimatic_calculator
1
+ # coin_gecko_apiv3
2
2
  #
3
3
  # This file was automatically generated by APIMATIC v2.0
4
4
  # ( https://apimatic.io ).
5
5
 
6
- module ApimaticCalculator
6
+ module CoinGeckoApiv3
7
7
  # API utility class
8
8
  class APIHelper
9
9
  # Serializes an array parameter (creates key value pairs).
@@ -0,0 +1,125 @@
1
+ # coin_gecko_apiv3
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CoinGeckoApiv3
7
+ # coin_gecko_apiv3 client class.
8
+ class Client
9
+ attr_reader :config
10
+
11
+ # Access to ping controller.
12
+ # @return [PingController] Returns the controller instance.
13
+ def ping
14
+ @ping ||= PingController.new config
15
+ end
16
+
17
+ # Access to simple controller.
18
+ # @return [SimpleController] Returns the controller instance.
19
+ def simple
20
+ @simple ||= SimpleController.new config
21
+ end
22
+
23
+ # Access to coins controller.
24
+ # @return [CoinsController] Returns the controller instance.
25
+ def coins
26
+ @coins ||= CoinsController.new config
27
+ end
28
+
29
+ # Access to contract controller.
30
+ # @return [ContractController] Returns the controller instance.
31
+ def contract
32
+ @contract ||= ContractController.new config
33
+ end
34
+
35
+ # Access to asset_platforms controller.
36
+ # @return [AssetPlatformsController] Returns the controller instance.
37
+ def asset_platforms
38
+ @asset_platforms ||= AssetPlatformsController.new config
39
+ end
40
+
41
+ # Access to categories controller.
42
+ # @return [CategoriesController] Returns the controller instance.
43
+ def categories
44
+ @categories ||= CategoriesController.new config
45
+ end
46
+
47
+ # Access to exchanges controller.
48
+ # @return [ExchangesController] Returns the controller instance.
49
+ def exchanges
50
+ @exchanges ||= ExchangesController.new config
51
+ end
52
+
53
+ # Access to finance controller.
54
+ # @return [FinanceController] Returns the controller instance.
55
+ def finance
56
+ @finance ||= FinanceController.new config
57
+ end
58
+
59
+ # Access to indexes controller.
60
+ # @return [IndexesController] Returns the controller instance.
61
+ def indexes
62
+ @indexes ||= IndexesController.new config
63
+ end
64
+
65
+ # Access to derivatives controller.
66
+ # @return [DerivativesController] Returns the controller instance.
67
+ def derivatives
68
+ @derivatives ||= DerivativesController.new config
69
+ end
70
+
71
+ # Access to status_updates controller.
72
+ # @return [StatusUpdatesController] Returns the controller instance.
73
+ def status_updates
74
+ @status_updates ||= StatusUpdatesController.new config
75
+ end
76
+
77
+ # Access to events controller.
78
+ # @return [EventsController] Returns the controller instance.
79
+ def events
80
+ @events ||= EventsController.new config
81
+ end
82
+
83
+ # Access to exchange_rates controller.
84
+ # @return [ExchangeRatesController] Returns the controller instance.
85
+ def exchange_rates
86
+ @exchange_rates ||= ExchangeRatesController.new config
87
+ end
88
+
89
+ # Access to trending controller.
90
+ # @return [TrendingController] Returns the controller instance.
91
+ def trending
92
+ @trending ||= TrendingController.new config
93
+ end
94
+
95
+ # Access to global controller.
96
+ # @return [GlobalController] Returns the controller instance.
97
+ def global
98
+ @global ||= GlobalController.new config
99
+ end
100
+
101
+ # Access to companies_beta controller.
102
+ # @return [CompaniesBetaController] Returns the controller instance.
103
+ def companies_beta
104
+ @companies_beta ||= CompaniesBetaController.new config
105
+ end
106
+
107
+ def initialize(http_client_instance: nil, timeout: 60, max_retries: 0,
108
+ retry_interval: 1, backoff_factor: 2,
109
+ retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
110
+ retry_methods: %i[get put],
111
+ environment: Environment::PRODUCTION, config: nil)
112
+ @config = if config.nil?
113
+ Configuration.new(http_client_instance: http_client_instance,
114
+ timeout: timeout, max_retries: max_retries,
115
+ retry_interval: retry_interval,
116
+ backoff_factor: backoff_factor,
117
+ retry_statuses: retry_statuses,
118
+ retry_methods: retry_methods,
119
+ environment: environment)
120
+ else
121
+ config
122
+ end
123
+ end
124
+ end
125
+ end
@@ -1,12 +1,11 @@
1
- # apimatic_calculator
1
+ # coin_gecko_apiv3
2
2
  #
3
3
  # This file was automatically generated by APIMATIC v2.0
4
4
  # ( https://apimatic.io ).
5
5
 
6
- module ApimaticCalculator
6
+ module CoinGeckoApiv3
7
7
  # An enum for SDK environments.
8
8
  class Environment
9
- # PRODUCTION: This environment connect to the LIVE calculator API
10
9
  ENVIRONMENT = [
11
10
  PRODUCTION = 'production'.freeze
12
11
  ].freeze
@@ -15,7 +14,7 @@ module ApimaticCalculator
15
14
  # An enum for API servers.
16
15
  class Server
17
16
  SERVER = [
18
- CALCULATOR = 'Calculator'.freeze
17
+ DEFAULT = 'default'.freeze
19
18
  ].freeze
20
19
  end
21
20
 
@@ -96,7 +95,7 @@ module ApimaticCalculator
96
95
  # All the environments the SDK can run in.
97
96
  ENVIRONMENTS = {
98
97
  Environment::PRODUCTION => {
99
- Server::CALCULATOR => 'https://examples.apimatic.io/apps/calculator'
98
+ Server::DEFAULT => 'https://api.coingecko.com/api/v3'
100
99
  }
101
100
  }.freeze
102
101
 
@@ -104,7 +103,7 @@ module ApimaticCalculator
104
103
  # @param [Configuration::Server] The server enum for which the base URI is
105
104
  # required.
106
105
  # @return [String] The base URI.
107
- def get_base_uri(server = Server::CALCULATOR)
106
+ def get_base_uri(server = Server::DEFAULT)
108
107
  ENVIRONMENTS[environment][server].clone
109
108
  end
110
109
  end
@@ -0,0 +1,29 @@
1
+ # coin_gecko_apiv3
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CoinGeckoApiv3
7
+ # AssetPlatformsController
8
+ class AssetPlatformsController < BaseController
9
+ def initialize(config, http_call_back: nil)
10
+ super(config, http_call_back: http_call_back)
11
+ end
12
+
13
+ # List all asset platforms
14
+ # @return [void] response from the API call
15
+ def listallassetplatforms_blockchainnetworks
16
+ # Prepare query url.
17
+ _query_builder = config.get_base_uri
18
+ _query_builder << '/asset_platforms'
19
+ _query_url = APIHelper.clean_url _query_builder
20
+
21
+ # Prepare and execute HttpRequest.
22
+ _request = config.http_client.get(
23
+ _query_url
24
+ )
25
+ _response = execute_request(_request)
26
+ validate_response(_response)
27
+ end
28
+ end
29
+ end
@@ -1,9 +1,9 @@
1
- # apimatic_calculator
1
+ # coin_gecko_apiv3
2
2
  #
3
3
  # This file was automatically generated by APIMATIC v2.0
4
4
  # ( https://apimatic.io ).
5
5
 
6
- module ApimaticCalculator
6
+ module CoinGeckoApiv3
7
7
  # BaseController.
8
8
  class BaseController
9
9
  attr_accessor :config, :http_call_back
@@ -0,0 +1,52 @@
1
+ # coin_gecko_apiv3
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module CoinGeckoApiv3
7
+ # CategoriesController
8
+ class CategoriesController < BaseController
9
+ def initialize(config, http_call_back: nil)
10
+ super(config, http_call_back: http_call_back)
11
+ end
12
+
13
+ # List all categories
14
+ # @return [void] response from the API call
15
+ def listallcategories
16
+ # Prepare query url.
17
+ _query_builder = config.get_base_uri
18
+ _query_builder << '/coins/categories/list'
19
+ _query_url = APIHelper.clean_url _query_builder
20
+
21
+ # Prepare and execute HttpRequest.
22
+ _request = config.http_client.get(
23
+ _query_url
24
+ )
25
+ _response = execute_request(_request)
26
+ validate_response(_response)
27
+ end
28
+
29
+ # List all categories with market data
30
+ # @param [String] order Optional parameter: valid values: <b>market_cap_desc
31
+ # (default), market_cap_asc, name_desc, name_asc, market_cap_change_24h_desc
32
+ # and market_cap_change_24h_asc</b>
33
+ # @return [void] response from the API call
34
+ def listallcategorieswithmarketdata(order: nil)
35
+ # Prepare query url.
36
+ _query_builder = config.get_base_uri
37
+ _query_builder << '/coins/categories'
38
+ _query_builder = APIHelper.append_url_with_query_parameters(
39
+ _query_builder,
40
+ 'order' => order
41
+ )
42
+ _query_url = APIHelper.clean_url _query_builder
43
+
44
+ # Prepare and execute HttpRequest.
45
+ _request = config.http_client.get(
46
+ _query_url
47
+ )
48
+ _response = execute_request(_request)
49
+ validate_response(_response)
50
+ end
51
+ end
52
+ end