automation-test 1.1 → 1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +21 -12
- data/lib/{apimatic_calculator → coin_gecko_apiv3}/api_helper.rb +2 -2
- data/lib/coin_gecko_apiv3/client.rb +125 -0
- data/lib/{apimatic_calculator → coin_gecko_apiv3}/configuration.rb +5 -6
- data/lib/coin_gecko_apiv3/controllers/asset_platforms_controller.rb +29 -0
- data/lib/{apimatic_calculator → coin_gecko_apiv3}/controllers/base_controller.rb +2 -2
- data/lib/coin_gecko_apiv3/controllers/categories_controller.rb +52 -0
- data/lib/coin_gecko_apiv3/controllers/coins_controller.rb +389 -0
- data/lib/coin_gecko_apiv3/controllers/companies_beta_controller.rb +35 -0
- data/lib/coin_gecko_apiv3/controllers/contract_controller.rb +119 -0
- data/lib/coin_gecko_apiv3/controllers/derivatives_controller.rb +112 -0
- data/lib/coin_gecko_apiv3/controllers/events_controller.rb +89 -0
- data/lib/coin_gecko_apiv3/controllers/exchange_rates_controller.rb +29 -0
- data/lib/coin_gecko_apiv3/controllers/exchanges_controller.rb +192 -0
- data/lib/coin_gecko_apiv3/controllers/finance_controller.rb +71 -0
- data/lib/coin_gecko_apiv3/controllers/global_controller.rb +29 -0
- data/lib/coin_gecko_apiv3/controllers/indexes_controller.rb +79 -0
- data/lib/coin_gecko_apiv3/controllers/ping_controller.rb +29 -0
- data/lib/coin_gecko_apiv3/controllers/simple_controller.rb +126 -0
- data/lib/coin_gecko_apiv3/controllers/status_updates_controller.rb +48 -0
- data/lib/coin_gecko_apiv3/controllers/trending_controller.rb +30 -0
- data/lib/{apimatic_calculator → coin_gecko_apiv3}/exceptions/api_exception.rb +2 -2
- data/lib/{apimatic_calculator → coin_gecko_apiv3}/http/faraday_client.rb +2 -2
- data/lib/{apimatic_calculator → coin_gecko_apiv3}/http/http_call_back.rb +2 -2
- data/lib/{apimatic_calculator → coin_gecko_apiv3}/http/http_client.rb +2 -2
- data/lib/{apimatic_calculator → coin_gecko_apiv3}/http/http_method_enum.rb +2 -2
- data/lib/{apimatic_calculator → coin_gecko_apiv3}/http/http_request.rb +2 -2
- data/lib/{apimatic_calculator → coin_gecko_apiv3}/http/http_response.rb +2 -2
- data/lib/{apimatic_calculator → coin_gecko_apiv3}/models/base_model.rb +2 -2
- data/lib/{apimatic_calculator → coin_gecko_apiv3}/utilities/date_time_helper.rb +2 -2
- data/lib/{apimatic_calculator → coin_gecko_apiv3}/utilities/file_wrapper.rb +2 -2
- data/lib/coin_gecko_apiv3.rb +52 -0
- data/test/controllers/controller_test_base.rb +3 -3
- data/test/controllers/test_asset_platforms_controller.rb +25 -0
- data/test/controllers/test_categories_controller.rb +37 -0
- data/test/controllers/test_coins_controller.rb +27 -0
- data/test/controllers/test_derivatives_controller.rb +51 -0
- data/test/controllers/test_events_controller.rb +55 -0
- data/test/controllers/test_exchange_rates_controller.rb +26 -0
- data/test/controllers/test_exchanges_controller.rb +38 -0
- data/test/controllers/test_finance_controller.rb +43 -0
- data/test/controllers/test_global_controller.rb +26 -0
- data/test/controllers/test_indexes_controller.rb +38 -0
- data/test/controllers/test_ping_controller.rb +26 -0
- data/test/controllers/test_simple_controller.rb +25 -0
- data/test/controllers/test_status_updates_controller.rb +31 -0
- data/test/controllers/test_trending_controller.rb +25 -0
- data/test/http_response_catcher.rb +2 -2
- data/test/test_helper.rb +1 -1
- metadata +49 -22
- data/lib/apimatic_calculator/client.rb +0 -35
- data/lib/apimatic_calculator/controllers/simple_calculator_controller.rb +0 -45
- data/lib/apimatic_calculator/models/operation_type_enum.rb +0 -23
- data/lib/apimatic_calculator.rb +0 -38
- data/test/controllers/test_simple_calculator_controller.rb +0 -34
@@ -0,0 +1,48 @@
|
|
1
|
+
# coin_gecko_apiv3
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module CoinGeckoApiv3
|
7
|
+
# StatusUpdatesController
|
8
|
+
class StatusUpdatesController < BaseController
|
9
|
+
def initialize(config, http_call_back: nil)
|
10
|
+
super(config, http_call_back: http_call_back)
|
11
|
+
end
|
12
|
+
|
13
|
+
# List all status_updates with data (description, category, created_at,
|
14
|
+
# user, user_title and pin)
|
15
|
+
# @param [String] category Optional parameter: Filtered by category (eg.
|
16
|
+
# general, milestone, partnership, exchange_listing, software_release,
|
17
|
+
# fund_movement, new_listings, event)
|
18
|
+
# @param [String] project_type Optional parameter: Filtered by Project Type
|
19
|
+
# (eg. coin, market). If left empty returns both status from coins and
|
20
|
+
# markets.
|
21
|
+
# @param [Integer] per_page Optional parameter: Total results per page
|
22
|
+
# @param [Integer] page Optional parameter: Page through results
|
23
|
+
# @return [void] response from the API call
|
24
|
+
def listallstatus_updateswithdata_description_category_created_at_user_user_titleandpin(category: nil,
|
25
|
+
project_type: nil,
|
26
|
+
per_page: nil,
|
27
|
+
page: nil)
|
28
|
+
# Prepare query url.
|
29
|
+
_query_builder = config.get_base_uri
|
30
|
+
_query_builder << '/status_updates'
|
31
|
+
_query_builder = APIHelper.append_url_with_query_parameters(
|
32
|
+
_query_builder,
|
33
|
+
'category' => category,
|
34
|
+
'project_type' => project_type,
|
35
|
+
'per_page' => per_page,
|
36
|
+
'page' => page
|
37
|
+
)
|
38
|
+
_query_url = APIHelper.clean_url _query_builder
|
39
|
+
|
40
|
+
# Prepare and execute HttpRequest.
|
41
|
+
_request = config.http_client.get(
|
42
|
+
_query_url
|
43
|
+
)
|
44
|
+
_response = execute_request(_request)
|
45
|
+
validate_response(_response)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# coin_gecko_apiv3
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module CoinGeckoApiv3
|
7
|
+
# TrendingController
|
8
|
+
class TrendingController < BaseController
|
9
|
+
def initialize(config, http_call_back: nil)
|
10
|
+
super(config, http_call_back: http_call_back)
|
11
|
+
end
|
12
|
+
|
13
|
+
# Top-7 trending coins on CoinGecko as searched by users in the last 24
|
14
|
+
# hours (Ordered by most popular first)
|
15
|
+
# @return [void] response from the API call
|
16
|
+
def gettrendingsearchcoins_top_7_on_coin_geckointhelast24hours
|
17
|
+
# Prepare query url.
|
18
|
+
_query_builder = config.get_base_uri
|
19
|
+
_query_builder << '/search/trending'
|
20
|
+
_query_url = APIHelper.clean_url _query_builder
|
21
|
+
|
22
|
+
# Prepare and execute HttpRequest.
|
23
|
+
_request = config.http_client.get(
|
24
|
+
_query_url
|
25
|
+
)
|
26
|
+
_response = execute_request(_request)
|
27
|
+
validate_response(_response)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
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
|
6
|
+
module CoinGeckoApiv3
|
7
7
|
# Class for exceptions when there is a network error, status code error, etc.
|
8
8
|
class APIException < StandardError
|
9
9
|
attr_reader :response, :response_code
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# coin_gecko_apiv3
|
2
2
|
#
|
3
3
|
# This file was automatically generated by APIMATIC v2.0
|
4
4
|
# ( https://apimatic.io ).
|
@@ -6,7 +6,7 @@
|
|
6
6
|
require 'faraday/http_cache'
|
7
7
|
require 'faraday_middleware'
|
8
8
|
|
9
|
-
module
|
9
|
+
module CoinGeckoApiv3
|
10
10
|
# An implementation of HttpClient.
|
11
11
|
class FaradayClient < HttpClient
|
12
12
|
# The constructor.
|
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
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
|
6
|
+
module CoinGeckoApiv3
|
7
7
|
# HttpCallBack allows defining callables for pre and post API calls.
|
8
8
|
class HttpCallBack
|
9
9
|
# A controller will call this method before making an HTTP Request.
|
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
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
|
6
|
+
module CoinGeckoApiv3
|
7
7
|
# An interface for the methods that an HTTP Client must implement.
|
8
8
|
#
|
9
9
|
# This class should not be instantiated but should be used as a base class
|
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
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
|
6
|
+
module CoinGeckoApiv3
|
7
7
|
# HTTP Methods Enumeration.
|
8
8
|
class HttpMethodEnum
|
9
9
|
HTTPMETHODENUM = [GET = 'GET'.freeze, POST = 'POST'.freeze,
|
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
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
|
6
|
+
module CoinGeckoApiv3
|
7
7
|
# Represents a single Http Request.
|
8
8
|
class HttpRequest
|
9
9
|
attr_accessor :http_method, :query_url, :headers,
|
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
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
|
6
|
+
module CoinGeckoApiv3
|
7
7
|
# Http response received.
|
8
8
|
class HttpResponse
|
9
9
|
attr_reader :status_code, :reason_phrase, :headers, :raw_body, :request
|
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
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
|
6
|
+
module CoinGeckoApiv3
|
7
7
|
# Base model.
|
8
8
|
class BaseModel
|
9
9
|
# Returns a Hash representation of the current object.
|
@@ -1,10 +1,10 @@
|
|
1
|
-
#
|
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
6
|
require 'date'
|
7
|
-
module
|
7
|
+
module CoinGeckoApiv3
|
8
8
|
# A utility that supports dateTime conversion to different formats
|
9
9
|
class DateTimeHelper
|
10
10
|
# Safely converts a DateTime object into a rfc1123 format string
|
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
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
|
6
|
+
module CoinGeckoApiv3
|
7
7
|
# A utility to allow users to set the content-type for files
|
8
8
|
class FileWrapper
|
9
9
|
attr_reader :content_type, :file
|
@@ -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
|
+
require 'date'
|
7
|
+
require 'json'
|
8
|
+
require 'faraday'
|
9
|
+
require 'certifi'
|
10
|
+
require 'logging'
|
11
|
+
|
12
|
+
require_relative 'coin_gecko_apiv3/api_helper'
|
13
|
+
require_relative 'coin_gecko_apiv3/client'
|
14
|
+
|
15
|
+
# Utilities
|
16
|
+
require_relative 'coin_gecko_apiv3/utilities/file_wrapper'
|
17
|
+
require_relative 'coin_gecko_apiv3/utilities/date_time_helper'
|
18
|
+
|
19
|
+
# Http
|
20
|
+
require_relative 'coin_gecko_apiv3/http/http_call_back'
|
21
|
+
require_relative 'coin_gecko_apiv3/http/http_client'
|
22
|
+
require_relative 'coin_gecko_apiv3/http/faraday_client'
|
23
|
+
require_relative 'coin_gecko_apiv3/http/http_method_enum'
|
24
|
+
require_relative 'coin_gecko_apiv3/http/http_request'
|
25
|
+
require_relative 'coin_gecko_apiv3/http/http_response'
|
26
|
+
|
27
|
+
# Models
|
28
|
+
require_relative 'coin_gecko_apiv3/models/base_model'
|
29
|
+
|
30
|
+
# Exceptions
|
31
|
+
require_relative 'coin_gecko_apiv3/exceptions/api_exception'
|
32
|
+
|
33
|
+
require_relative 'coin_gecko_apiv3/configuration'
|
34
|
+
|
35
|
+
# Controllers
|
36
|
+
require_relative 'coin_gecko_apiv3/controllers/base_controller'
|
37
|
+
require_relative 'coin_gecko_apiv3/controllers/ping_controller'
|
38
|
+
require_relative 'coin_gecko_apiv3/controllers/simple_controller'
|
39
|
+
require_relative 'coin_gecko_apiv3/controllers/coins_controller'
|
40
|
+
require_relative 'coin_gecko_apiv3/controllers/contract_controller'
|
41
|
+
require_relative 'coin_gecko_apiv3/controllers/asset_platforms_controller'
|
42
|
+
require_relative 'coin_gecko_apiv3/controllers/categories_controller'
|
43
|
+
require_relative 'coin_gecko_apiv3/controllers/exchanges_controller'
|
44
|
+
require_relative 'coin_gecko_apiv3/controllers/finance_controller'
|
45
|
+
require_relative 'coin_gecko_apiv3/controllers/indexes_controller'
|
46
|
+
require_relative 'coin_gecko_apiv3/controllers/derivatives_controller'
|
47
|
+
require_relative 'coin_gecko_apiv3/controllers/status_updates_controller'
|
48
|
+
require_relative 'coin_gecko_apiv3/controllers/events_controller'
|
49
|
+
require_relative 'coin_gecko_apiv3/controllers/exchange_rates_controller'
|
50
|
+
require_relative 'coin_gecko_apiv3/controllers/trending_controller'
|
51
|
+
require_relative 'coin_gecko_apiv3/controllers/global_controller'
|
52
|
+
require_relative 'coin_gecko_apiv3/controllers/companies_beta_controller'
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# coin_gecko_apiv3
|
2
2
|
#
|
3
3
|
# This file was automatically generated by APIMATIC v2.0
|
4
4
|
# ( https://apimatic.io ).
|
@@ -8,13 +8,13 @@ require 'minitest/autorun'
|
|
8
8
|
require 'minitest/hell'
|
9
9
|
require 'minitest/pride'
|
10
10
|
require 'minitest/proveit'
|
11
|
-
require '
|
11
|
+
require 'coin_gecko_apiv3'
|
12
12
|
require_relative '../test_helper'
|
13
13
|
require_relative '../http_response_catcher'
|
14
14
|
|
15
15
|
class ControllerTestBase < Minitest::Test
|
16
16
|
parallelize_me!
|
17
|
-
include
|
17
|
+
include CoinGeckoApiv3
|
18
18
|
|
19
19
|
# Create configuration and set any test parameters
|
20
20
|
CONFIG = Configuration.new
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# coin_gecko_apiv3
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require_relative 'controller_test_base'
|
7
|
+
|
8
|
+
class AssetPlatformsControllerTests < ControllerTestBase
|
9
|
+
# Called only once for the class before any test has executed
|
10
|
+
def setup
|
11
|
+
@response_catcher = HttpResponseCatcher.new
|
12
|
+
@controller = AssetPlatformsController.new CONFIG, http_call_back: @response_catcher
|
13
|
+
end
|
14
|
+
|
15
|
+
# List all asset platforms
|
16
|
+
def test_listallassetplatforms_blockchainnetworks()
|
17
|
+
|
18
|
+
# Perform the API call through the SDK function
|
19
|
+
@controller.listallassetplatforms_blockchainnetworks()
|
20
|
+
|
21
|
+
# Test response code
|
22
|
+
assert_equal(200, @response_catcher.response.status_code)
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# coin_gecko_apiv3
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require_relative 'controller_test_base'
|
7
|
+
|
8
|
+
class CategoriesControllerTests < ControllerTestBase
|
9
|
+
# Called only once for the class before any test has executed
|
10
|
+
def setup
|
11
|
+
@response_catcher = HttpResponseCatcher.new
|
12
|
+
@controller = CategoriesController.new CONFIG, http_call_back: @response_catcher
|
13
|
+
end
|
14
|
+
|
15
|
+
# List all categories
|
16
|
+
def test_listallcategories()
|
17
|
+
|
18
|
+
# Perform the API call through the SDK function
|
19
|
+
@controller.listallcategories()
|
20
|
+
|
21
|
+
# Test response code
|
22
|
+
assert_equal(200, @response_catcher.response.status_code)
|
23
|
+
end
|
24
|
+
|
25
|
+
# List all categories with market data
|
26
|
+
def test_listallcategorieswithmarketdata()
|
27
|
+
# Parameters for the API call
|
28
|
+
order = nil
|
29
|
+
|
30
|
+
# Perform the API call through the SDK function
|
31
|
+
@controller.listallcategorieswithmarketdata(order: order)
|
32
|
+
|
33
|
+
# Test response code
|
34
|
+
assert_equal(200, @response_catcher.response.status_code)
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# coin_gecko_apiv3
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require_relative 'controller_test_base'
|
7
|
+
|
8
|
+
class CoinsControllerTests < ControllerTestBase
|
9
|
+
# Called only once for the class before any test has executed
|
10
|
+
def setup
|
11
|
+
@response_catcher = HttpResponseCatcher.new
|
12
|
+
@controller = CoinsController.new CONFIG, http_call_back: @response_catcher
|
13
|
+
end
|
14
|
+
|
15
|
+
# Use this to obtain all the coins' id in order to make API calls
|
16
|
+
def test_listallsupportedcoinsid_nameandsymbol_nopaginationrequired()
|
17
|
+
# Parameters for the API call
|
18
|
+
include_platform = nil
|
19
|
+
|
20
|
+
# Perform the API call through the SDK function
|
21
|
+
@controller.listallsupportedcoinsid_nameandsymbol_nopaginationrequired(include_platform: include_platform)
|
22
|
+
|
23
|
+
# Test response code
|
24
|
+
assert_equal(200, @response_catcher.response.status_code)
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# coin_gecko_apiv3
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require_relative 'controller_test_base'
|
7
|
+
|
8
|
+
class DerivativesControllerTests < ControllerTestBase
|
9
|
+
# Called only once for the class before any test has executed
|
10
|
+
def setup
|
11
|
+
@response_catcher = HttpResponseCatcher.new
|
12
|
+
@controller = DerivativesController.new CONFIG, http_call_back: @response_catcher
|
13
|
+
end
|
14
|
+
|
15
|
+
# List all derivative tickers
|
16
|
+
def test_listallderivativetickers()
|
17
|
+
# Parameters for the API call
|
18
|
+
include_tickers = nil
|
19
|
+
|
20
|
+
# Perform the API call through the SDK function
|
21
|
+
@controller.listallderivativetickers(include_tickers: include_tickers)
|
22
|
+
|
23
|
+
# Test response code
|
24
|
+
assert_equal(200, @response_catcher.response.status_code)
|
25
|
+
end
|
26
|
+
|
27
|
+
# List all derivative exchanges
|
28
|
+
def test_listallderivativeexchanges()
|
29
|
+
# Parameters for the API call
|
30
|
+
order = nil
|
31
|
+
per_page = nil
|
32
|
+
page = nil
|
33
|
+
|
34
|
+
# Perform the API call through the SDK function
|
35
|
+
@controller.listallderivativeexchanges(order: order, per_page: per_page, page: page)
|
36
|
+
|
37
|
+
# Test response code
|
38
|
+
assert_equal(200, @response_catcher.response.status_code)
|
39
|
+
end
|
40
|
+
|
41
|
+
# List all derivative exchanges name and identifier
|
42
|
+
def test_listallderivativeexchangesnameandidentifier()
|
43
|
+
|
44
|
+
# Perform the API call through the SDK function
|
45
|
+
@controller.listallderivativeexchangesnameandidentifier()
|
46
|
+
|
47
|
+
# Test response code
|
48
|
+
assert_equal(200, @response_catcher.response.status_code)
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# coin_gecko_apiv3
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require_relative 'controller_test_base'
|
7
|
+
|
8
|
+
class EventsControllerTests < ControllerTestBase
|
9
|
+
# Called only once for the class before any test has executed
|
10
|
+
def setup
|
11
|
+
@response_catcher = HttpResponseCatcher.new
|
12
|
+
@controller = EventsController.new CONFIG, http_call_back: @response_catcher
|
13
|
+
end
|
14
|
+
|
15
|
+
# Get events, paginated by 100
|
16
|
+
#
|
17
|
+
def test_getevents_paginatedby100()
|
18
|
+
# Parameters for the API call
|
19
|
+
country_code = nil
|
20
|
+
type = nil
|
21
|
+
page = nil
|
22
|
+
upcoming_events_only = nil
|
23
|
+
from_date = nil
|
24
|
+
to_date = nil
|
25
|
+
|
26
|
+
# Perform the API call through the SDK function
|
27
|
+
@controller.getevents_paginatedby100(country_code: country_code, type: type, page: page, upcoming_events_only: upcoming_events_only, from_date: from_date, to_date: to_date)
|
28
|
+
|
29
|
+
# Test response code
|
30
|
+
assert_equal(200, @response_catcher.response.status_code)
|
31
|
+
end
|
32
|
+
|
33
|
+
# Get list of event countries
|
34
|
+
#
|
35
|
+
def test_getlistofeventcountries()
|
36
|
+
|
37
|
+
# Perform the API call through the SDK function
|
38
|
+
@controller.getlistofeventcountries()
|
39
|
+
|
40
|
+
# Test response code
|
41
|
+
assert_equal(200, @response_catcher.response.status_code)
|
42
|
+
end
|
43
|
+
|
44
|
+
# Get list of event types
|
45
|
+
#
|
46
|
+
def test_getlistofeventstypes()
|
47
|
+
|
48
|
+
# Perform the API call through the SDK function
|
49
|
+
@controller.getlistofeventstypes()
|
50
|
+
|
51
|
+
# Test response code
|
52
|
+
assert_equal(200, @response_catcher.response.status_code)
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# coin_gecko_apiv3
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require_relative 'controller_test_base'
|
7
|
+
|
8
|
+
class ExchangeRatesControllerTests < ControllerTestBase
|
9
|
+
# Called only once for the class before any test has executed
|
10
|
+
def setup
|
11
|
+
@response_catcher = HttpResponseCatcher.new
|
12
|
+
@controller = ExchangeRatesController.new CONFIG, http_call_back: @response_catcher
|
13
|
+
end
|
14
|
+
|
15
|
+
# Get BTC-to-Currency exchange rates
|
16
|
+
#
|
17
|
+
def test_get_btc_to_currencyexchangerates()
|
18
|
+
|
19
|
+
# Perform the API call through the SDK function
|
20
|
+
@controller.get_btc_to_currencyexchangerates()
|
21
|
+
|
22
|
+
# Test response code
|
23
|
+
assert_equal(200, @response_catcher.response.status_code)
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# coin_gecko_apiv3
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require_relative 'controller_test_base'
|
7
|
+
|
8
|
+
class ExchangesControllerTests < ControllerTestBase
|
9
|
+
# Called only once for the class before any test has executed
|
10
|
+
def setup
|
11
|
+
@response_catcher = HttpResponseCatcher.new
|
12
|
+
@controller = ExchangesController.new CONFIG, http_call_back: @response_catcher
|
13
|
+
end
|
14
|
+
|
15
|
+
# List all exchanges
|
16
|
+
def test_listallexchanges()
|
17
|
+
# Parameters for the API call
|
18
|
+
per_page = nil
|
19
|
+
page = nil
|
20
|
+
|
21
|
+
# Perform the API call through the SDK function
|
22
|
+
@controller.listallexchanges(per_page: per_page, page: page)
|
23
|
+
|
24
|
+
# Test response code
|
25
|
+
assert_equal(200, @response_catcher.response.status_code)
|
26
|
+
end
|
27
|
+
|
28
|
+
# Use this to obtain all the markets' id in order to make API calls
|
29
|
+
def test_listallsupportedmarketsidandname_nopaginationrequired()
|
30
|
+
|
31
|
+
# Perform the API call through the SDK function
|
32
|
+
@controller.listallsupportedmarketsidandname_nopaginationrequired()
|
33
|
+
|
34
|
+
# Test response code
|
35
|
+
assert_equal(200, @response_catcher.response.status_code)
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# coin_gecko_apiv3
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require_relative 'controller_test_base'
|
7
|
+
|
8
|
+
class FinanceControllerTests < ControllerTestBase
|
9
|
+
# Called only once for the class before any test has executed
|
10
|
+
def setup
|
11
|
+
@response_catcher = HttpResponseCatcher.new
|
12
|
+
@controller = FinanceController.new CONFIG, http_call_back: @response_catcher
|
13
|
+
end
|
14
|
+
|
15
|
+
# List all finance platforms
|
16
|
+
def test_listallfinanceplatforms()
|
17
|
+
# Parameters for the API call
|
18
|
+
per_page = nil
|
19
|
+
page = nil
|
20
|
+
|
21
|
+
# Perform the API call through the SDK function
|
22
|
+
@controller.listallfinanceplatforms(per_page: per_page, page: page)
|
23
|
+
|
24
|
+
# Test response code
|
25
|
+
assert_equal(200, @response_catcher.response.status_code)
|
26
|
+
end
|
27
|
+
|
28
|
+
# List all finance products
|
29
|
+
def test_listallfinanceproducts()
|
30
|
+
# Parameters for the API call
|
31
|
+
per_page = nil
|
32
|
+
page = nil
|
33
|
+
start_at = nil
|
34
|
+
end_at = nil
|
35
|
+
|
36
|
+
# Perform the API call through the SDK function
|
37
|
+
@controller.listallfinanceproducts(per_page: per_page, page: page, start_at: start_at, end_at: end_at)
|
38
|
+
|
39
|
+
# Test response code
|
40
|
+
assert_equal(200, @response_catcher.response.status_code)
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# coin_gecko_apiv3
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require_relative 'controller_test_base'
|
7
|
+
|
8
|
+
class GlobalControllerTests < ControllerTestBase
|
9
|
+
# Called only once for the class before any test has executed
|
10
|
+
def setup
|
11
|
+
@response_catcher = HttpResponseCatcher.new
|
12
|
+
@controller = GlobalController.new CONFIG, http_call_back: @response_catcher
|
13
|
+
end
|
14
|
+
|
15
|
+
# Get cryptocurrency global data
|
16
|
+
#
|
17
|
+
def test_getcryptocurrencyglobaldata()
|
18
|
+
|
19
|
+
# Perform the API call through the SDK function
|
20
|
+
@controller.getcryptocurrencyglobaldata()
|
21
|
+
|
22
|
+
# Test response code
|
23
|
+
assert_equal(200, @response_catcher.response.status_code)
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# coin_gecko_apiv3
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require_relative 'controller_test_base'
|
7
|
+
|
8
|
+
class IndexesControllerTests < ControllerTestBase
|
9
|
+
# Called only once for the class before any test has executed
|
10
|
+
def setup
|
11
|
+
@response_catcher = HttpResponseCatcher.new
|
12
|
+
@controller = IndexesController.new CONFIG, http_call_back: @response_catcher
|
13
|
+
end
|
14
|
+
|
15
|
+
# List all market indexes
|
16
|
+
def test_listallmarketindexes()
|
17
|
+
# Parameters for the API call
|
18
|
+
per_page = nil
|
19
|
+
page = nil
|
20
|
+
|
21
|
+
# Perform the API call through the SDK function
|
22
|
+
@controller.listallmarketindexes(per_page: per_page, page: page)
|
23
|
+
|
24
|
+
# Test response code
|
25
|
+
assert_equal(200, @response_catcher.response.status_code)
|
26
|
+
end
|
27
|
+
|
28
|
+
# list market indexes id and name
|
29
|
+
def test_listmarketindexesidandname()
|
30
|
+
|
31
|
+
# Perform the API call through the SDK function
|
32
|
+
@controller.listmarketindexesidandname()
|
33
|
+
|
34
|
+
# Test response code
|
35
|
+
assert_equal(200, @response_catcher.response.status_code)
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|