coinmarketcap_client 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +20 -9
- data/docs/{Info.md → CryptocurrencyInfo.md} +2 -2
- data/docs/{InfoUrls.md → CryptocurrencyInfoUrls.md} +1 -1
- data/docs/{MarketData.md → CryptocurrencyListings.md} +1 -1
- data/docs/{Map.md → CryptocurrencyMap.md} +1 -1
- data/docs/DefaultApi.md +146 -22
- data/docs/GlobalMetricsHistoricalQuote.md +10 -0
- data/docs/GlobalMetricsQuote.md +10 -0
- data/docs/GlobalMetricsQuotesHistorical.md +10 -0
- data/docs/GlobalMetricsQuotesLatest.md +14 -0
- data/docs/InlineResponse200.md +1 -1
- data/docs/InlineResponse2001.md +1 -1
- data/docs/InlineResponse2002.md +1 -1
- data/docs/InlineResponse2003.md +1 -1
- data/docs/InlineResponse2004.md +1 -1
- data/docs/InlineResponse2004Data.md +8 -0
- data/docs/InlineResponse2005.md +1 -1
- data/docs/InlineResponse2006.md +9 -0
- data/docs/InlineResponse2007.md +9 -0
- data/docs/InlineResponse2008.md +9 -0
- data/docs/InlineResponse2009.md +9 -0
- data/docs/Quote.md +1 -1
- data/lib/coinmarketcap_client.rb +13 -4
- data/lib/coinmarketcap_client/api/default_api.rb +150 -26
- data/lib/coinmarketcap_client/models/{info.rb → cryptocurrency_info.rb} +2 -2
- data/lib/coinmarketcap_client/models/{info_urls.rb → cryptocurrency_info_urls.rb} +1 -1
- data/lib/coinmarketcap_client/models/{market_data.rb → cryptocurrency_listings.rb} +1 -1
- data/lib/coinmarketcap_client/models/{map.rb → cryptocurrency_map.rb} +1 -1
- data/lib/coinmarketcap_client/models/global_metrics_historical_quote.rb +202 -0
- data/lib/coinmarketcap_client/models/global_metrics_quote.rb +202 -0
- data/lib/{coinmarketcap_api/models/inline_response_200_3.rb → coinmarketcap_client/models/global_metrics_quotes_historical.rb} +30 -11
- data/lib/{coinmarketcap_api/models/map.rb → coinmarketcap_client/models/global_metrics_quotes_latest.rb} +49 -55
- data/lib/coinmarketcap_client/models/inline_response_200.rb +1 -1
- data/lib/coinmarketcap_client/models/inline_response_200_1.rb +1 -1
- data/lib/coinmarketcap_client/models/inline_response_200_2.rb +1 -1
- data/lib/coinmarketcap_client/models/inline_response_200_3.rb +2 -4
- data/lib/coinmarketcap_client/models/inline_response_200_4.rb +2 -4
- data/lib/{coinmarketcap_api/models/inline_response_200_1.rb → coinmarketcap_client/models/inline_response_200_4_data.rb} +11 -11
- data/lib/coinmarketcap_client/models/inline_response_200_5.rb +1 -1
- data/lib/{coinmarketcap_api/models/inline_response_200_2.rb → coinmarketcap_client/models/inline_response_200_6.rb} +5 -5
- data/lib/{coinmarketcap_api/models/inline_response_200.rb → coinmarketcap_client/models/inline_response_200_7.rb} +4 -4
- data/lib/{coinmarketcap_api/models/inline_response_default_1.rb → coinmarketcap_client/models/inline_response_200_8.rb} +13 -4
- data/lib/{coinmarketcap_api/models/inline_response_default.rb → coinmarketcap_client/models/inline_response_200_9.rb} +13 -4
- data/lib/coinmarketcap_client/models/quote.rb +1 -1
- data/lib/coinmarketcap_client/version.rb +1 -1
- data/spec/api/default_api_spec.rb +71 -6
- data/spec/api_client_spec.rb +29 -29
- data/spec/configuration_spec.rb +3 -3
- data/spec/models/{info_spec.rb → cryptocurrency_info_spec.rb} +6 -6
- data/spec/models/{info_urls_spec.rb → cryptocurrency_info_urls_spec.rb} +6 -6
- data/spec/models/{market_data_spec.rb → cryptocurrency_listings_spec.rb} +6 -6
- data/spec/models/{map_spec.rb → cryptocurrency_map_spec.rb} +6 -6
- data/spec/models/global_metrics_historical_quote_spec.rb +53 -0
- data/spec/models/global_metrics_quote_spec.rb +53 -0
- data/spec/models/global_metrics_quotes_historical_spec.rb +53 -0
- data/spec/models/global_metrics_quotes_latest_spec.rb +77 -0
- data/spec/models/inline_response_200_1_spec.rb +9 -3
- data/spec/models/inline_response_200_2_spec.rb +3 -3
- data/spec/models/inline_response_200_3_spec.rb +9 -3
- data/spec/models/inline_response_200_4_data_spec.rb +41 -0
- data/spec/models/inline_response_200_4_spec.rb +3 -3
- data/spec/models/inline_response_200_5_spec.rb +3 -3
- data/spec/models/inline_response_200_6_spec.rb +47 -0
- data/spec/models/inline_response_200_7_spec.rb +47 -0
- data/spec/models/inline_response_200_8_spec.rb +47 -0
- data/spec/models/inline_response_200_9_spec.rb +47 -0
- data/spec/models/inline_response_200_spec.rb +3 -3
- data/spec/models/inline_response_default_1_spec.rb +3 -3
- data/spec/models/inline_response_default_spec.rb +3 -3
- data/spec/models/platform_spec.rb +3 -3
- data/spec/models/quote_spec.rb +3 -3
- data/spec/models/status_spec.rb +3 -3
- data/spec/spec_helper.rb +1 -1
- metadata +54 -34
- data/lib/coinmarketcap_api.rb +0 -50
- data/lib/coinmarketcap_api/api/default_api.rb +0 -145
- data/lib/coinmarketcap_api/api_client.rb +0 -389
- data/lib/coinmarketcap_api/api_error.rb +0 -38
- data/lib/coinmarketcap_api/configuration.rb +0 -209
- data/lib/coinmarketcap_api/models/info.rb +0 -276
- data/lib/coinmarketcap_api/models/info_urls.rb +0 -263
- data/lib/coinmarketcap_api/models/status.rb +0 -219
- data/lib/coinmarketcap_api/version.rb +0 -15
@@ -14,13 +14,13 @@ require 'spec_helper'
|
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
16
|
|
17
|
-
# Unit tests for
|
17
|
+
# Unit tests for CoinmarketcapClient::InlineResponse200
|
18
18
|
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
19
|
# Please update as you see appropriate
|
20
20
|
describe 'InlineResponse200' do
|
21
21
|
before do
|
22
22
|
# run before each test
|
23
|
-
@instance =
|
23
|
+
@instance = CoinmarketcapClient::InlineResponse200.new
|
24
24
|
end
|
25
25
|
|
26
26
|
after do
|
@@ -29,7 +29,7 @@ describe 'InlineResponse200' do
|
|
29
29
|
|
30
30
|
describe 'test an instance of InlineResponse200' do
|
31
31
|
it 'should create an instance of InlineResponse200' do
|
32
|
-
expect(@instance).to be_instance_of(
|
32
|
+
expect(@instance).to be_instance_of(CoinmarketcapClient::InlineResponse200)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
describe 'test attribute "data"' do
|
@@ -14,13 +14,13 @@ require 'spec_helper'
|
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
16
|
|
17
|
-
# Unit tests for
|
17
|
+
# Unit tests for CoinmarketcapClient::InlineResponseDefault1
|
18
18
|
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
19
|
# Please update as you see appropriate
|
20
20
|
describe 'InlineResponseDefault1' do
|
21
21
|
before do
|
22
22
|
# run before each test
|
23
|
-
@instance =
|
23
|
+
@instance = CoinmarketcapClient::InlineResponseDefault1.new
|
24
24
|
end
|
25
25
|
|
26
26
|
after do
|
@@ -29,7 +29,7 @@ describe 'InlineResponseDefault1' do
|
|
29
29
|
|
30
30
|
describe 'test an instance of InlineResponseDefault1' do
|
31
31
|
it 'should create an instance of InlineResponseDefault1' do
|
32
|
-
expect(@instance).to be_instance_of(
|
32
|
+
expect(@instance).to be_instance_of(CoinmarketcapClient::InlineResponseDefault1)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
describe 'test attribute "status"' do
|
@@ -14,13 +14,13 @@ require 'spec_helper'
|
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
16
|
|
17
|
-
# Unit tests for
|
17
|
+
# Unit tests for CoinmarketcapClient::InlineResponseDefault
|
18
18
|
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
19
|
# Please update as you see appropriate
|
20
20
|
describe 'InlineResponseDefault' do
|
21
21
|
before do
|
22
22
|
# run before each test
|
23
|
-
@instance =
|
23
|
+
@instance = CoinmarketcapClient::InlineResponseDefault.new
|
24
24
|
end
|
25
25
|
|
26
26
|
after do
|
@@ -29,7 +29,7 @@ describe 'InlineResponseDefault' do
|
|
29
29
|
|
30
30
|
describe 'test an instance of InlineResponseDefault' do
|
31
31
|
it 'should create an instance of InlineResponseDefault' do
|
32
|
-
expect(@instance).to be_instance_of(
|
32
|
+
expect(@instance).to be_instance_of(CoinmarketcapClient::InlineResponseDefault)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
describe 'test attribute "status"' do
|
@@ -14,13 +14,13 @@ require 'spec_helper'
|
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
16
|
|
17
|
-
# Unit tests for
|
17
|
+
# Unit tests for CoinmarketcapClient::Platform
|
18
18
|
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
19
|
# Please update as you see appropriate
|
20
20
|
describe 'Platform' do
|
21
21
|
before do
|
22
22
|
# run before each test
|
23
|
-
@instance =
|
23
|
+
@instance = CoinmarketcapClient::Platform.new
|
24
24
|
end
|
25
25
|
|
26
26
|
after do
|
@@ -29,7 +29,7 @@ describe 'Platform' do
|
|
29
29
|
|
30
30
|
describe 'test an instance of Platform' do
|
31
31
|
it 'should create an instance of Platform' do
|
32
|
-
expect(@instance).to be_instance_of(
|
32
|
+
expect(@instance).to be_instance_of(CoinmarketcapClient::Platform)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
describe 'test attribute "id"' do
|
data/spec/models/quote_spec.rb
CHANGED
@@ -14,13 +14,13 @@ require 'spec_helper'
|
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
16
|
|
17
|
-
# Unit tests for
|
17
|
+
# Unit tests for CoinmarketcapClient::Quote
|
18
18
|
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
19
|
# Please update as you see appropriate
|
20
20
|
describe 'Quote' do
|
21
21
|
before do
|
22
22
|
# run before each test
|
23
|
-
@instance =
|
23
|
+
@instance = CoinmarketcapClient::Quote.new
|
24
24
|
end
|
25
25
|
|
26
26
|
after do
|
@@ -29,7 +29,7 @@ describe 'Quote' do
|
|
29
29
|
|
30
30
|
describe 'test an instance of Quote' do
|
31
31
|
it 'should create an instance of Quote' do
|
32
|
-
expect(@instance).to be_instance_of(
|
32
|
+
expect(@instance).to be_instance_of(CoinmarketcapClient::Quote)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
describe 'test attribute "price"' do
|
data/spec/models/status_spec.rb
CHANGED
@@ -14,13 +14,13 @@ require 'spec_helper'
|
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
16
|
|
17
|
-
# Unit tests for
|
17
|
+
# Unit tests for CoinmarketcapClient::Status
|
18
18
|
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
19
|
# Please update as you see appropriate
|
20
20
|
describe 'Status' do
|
21
21
|
before do
|
22
22
|
# run before each test
|
23
|
-
@instance =
|
23
|
+
@instance = CoinmarketcapClient::Status.new
|
24
24
|
end
|
25
25
|
|
26
26
|
after do
|
@@ -29,7 +29,7 @@ describe 'Status' do
|
|
29
29
|
|
30
30
|
describe 'test an instance of Status' do
|
31
31
|
it 'should create an instance of Status' do
|
32
|
-
expect(@instance).to be_instance_of(
|
32
|
+
expect(@instance).to be_instance_of(CoinmarketcapClient::Status)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
describe 'test attribute "timestamp"' do
|
data/spec/spec_helper.rb
CHANGED
@@ -11,7 +11,7 @@ Swagger Codegen version: 2.4.4
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
# load the gem
|
14
|
-
require '
|
14
|
+
require 'coinmarketcap_client'
|
15
15
|
|
16
16
|
# The following was generated by the `rspec --init` command. Conventionally, all
|
17
17
|
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coinmarketcap_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Wilkosz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04
|
11
|
+
date: 2019-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -201,56 +201,58 @@ files:
|
|
201
201
|
- README.md
|
202
202
|
- Rakefile
|
203
203
|
- coinmarketcap_client.gemspec
|
204
|
+
- docs/CryptocurrencyInfo.md
|
205
|
+
- docs/CryptocurrencyInfoUrls.md
|
206
|
+
- docs/CryptocurrencyListings.md
|
207
|
+
- docs/CryptocurrencyMap.md
|
204
208
|
- docs/DefaultApi.md
|
205
|
-
- docs/
|
206
|
-
- docs/
|
209
|
+
- docs/GlobalMetricsHistoricalQuote.md
|
210
|
+
- docs/GlobalMetricsQuote.md
|
211
|
+
- docs/GlobalMetricsQuotesHistorical.md
|
212
|
+
- docs/GlobalMetricsQuotesLatest.md
|
207
213
|
- docs/InlineResponse200.md
|
208
214
|
- docs/InlineResponse2001.md
|
209
215
|
- docs/InlineResponse2002.md
|
210
216
|
- docs/InlineResponse2003.md
|
211
217
|
- docs/InlineResponse2004.md
|
218
|
+
- docs/InlineResponse2004Data.md
|
212
219
|
- docs/InlineResponse2005.md
|
220
|
+
- docs/InlineResponse2006.md
|
221
|
+
- docs/InlineResponse2007.md
|
222
|
+
- docs/InlineResponse2008.md
|
223
|
+
- docs/InlineResponse2009.md
|
213
224
|
- docs/InlineResponseDefault.md
|
214
225
|
- docs/InlineResponseDefault1.md
|
215
|
-
- docs/Map.md
|
216
|
-
- docs/MarketData.md
|
217
226
|
- docs/Platform.md
|
218
227
|
- docs/Quote.md
|
219
228
|
- docs/Status.md
|
220
229
|
- git_push.sh
|
221
|
-
- lib/coinmarketcap_api.rb
|
222
|
-
- lib/coinmarketcap_api/api/default_api.rb
|
223
|
-
- lib/coinmarketcap_api/api_client.rb
|
224
|
-
- lib/coinmarketcap_api/api_error.rb
|
225
|
-
- lib/coinmarketcap_api/configuration.rb
|
226
|
-
- lib/coinmarketcap_api/models/info.rb
|
227
|
-
- lib/coinmarketcap_api/models/info_urls.rb
|
228
|
-
- lib/coinmarketcap_api/models/inline_response_200.rb
|
229
|
-
- lib/coinmarketcap_api/models/inline_response_200_1.rb
|
230
|
-
- lib/coinmarketcap_api/models/inline_response_200_2.rb
|
231
|
-
- lib/coinmarketcap_api/models/inline_response_200_3.rb
|
232
|
-
- lib/coinmarketcap_api/models/inline_response_default.rb
|
233
|
-
- lib/coinmarketcap_api/models/inline_response_default_1.rb
|
234
|
-
- lib/coinmarketcap_api/models/map.rb
|
235
|
-
- lib/coinmarketcap_api/models/status.rb
|
236
|
-
- lib/coinmarketcap_api/version.rb
|
237
230
|
- lib/coinmarketcap_client.rb
|
238
231
|
- lib/coinmarketcap_client/api/default_api.rb
|
239
232
|
- lib/coinmarketcap_client/api_client.rb
|
240
233
|
- lib/coinmarketcap_client/api_error.rb
|
241
234
|
- lib/coinmarketcap_client/configuration.rb
|
242
|
-
- lib/coinmarketcap_client/models/
|
243
|
-
- lib/coinmarketcap_client/models/
|
235
|
+
- lib/coinmarketcap_client/models/cryptocurrency_info.rb
|
236
|
+
- lib/coinmarketcap_client/models/cryptocurrency_info_urls.rb
|
237
|
+
- lib/coinmarketcap_client/models/cryptocurrency_listings.rb
|
238
|
+
- lib/coinmarketcap_client/models/cryptocurrency_map.rb
|
239
|
+
- lib/coinmarketcap_client/models/global_metrics_historical_quote.rb
|
240
|
+
- lib/coinmarketcap_client/models/global_metrics_quote.rb
|
241
|
+
- lib/coinmarketcap_client/models/global_metrics_quotes_historical.rb
|
242
|
+
- lib/coinmarketcap_client/models/global_metrics_quotes_latest.rb
|
244
243
|
- lib/coinmarketcap_client/models/inline_response_200.rb
|
245
244
|
- lib/coinmarketcap_client/models/inline_response_200_1.rb
|
246
245
|
- lib/coinmarketcap_client/models/inline_response_200_2.rb
|
247
246
|
- lib/coinmarketcap_client/models/inline_response_200_3.rb
|
248
247
|
- lib/coinmarketcap_client/models/inline_response_200_4.rb
|
248
|
+
- lib/coinmarketcap_client/models/inline_response_200_4_data.rb
|
249
249
|
- lib/coinmarketcap_client/models/inline_response_200_5.rb
|
250
|
+
- lib/coinmarketcap_client/models/inline_response_200_6.rb
|
251
|
+
- lib/coinmarketcap_client/models/inline_response_200_7.rb
|
252
|
+
- lib/coinmarketcap_client/models/inline_response_200_8.rb
|
253
|
+
- lib/coinmarketcap_client/models/inline_response_200_9.rb
|
250
254
|
- lib/coinmarketcap_client/models/inline_response_default.rb
|
251
255
|
- lib/coinmarketcap_client/models/inline_response_default_1.rb
|
252
|
-
- lib/coinmarketcap_client/models/map.rb
|
253
|
-
- lib/coinmarketcap_client/models/market_data.rb
|
254
256
|
- lib/coinmarketcap_client/models/platform.rb
|
255
257
|
- lib/coinmarketcap_client/models/quote.rb
|
256
258
|
- lib/coinmarketcap_client/models/status.rb
|
@@ -258,18 +260,27 @@ files:
|
|
258
260
|
- spec/api/default_api_spec.rb
|
259
261
|
- spec/api_client_spec.rb
|
260
262
|
- spec/configuration_spec.rb
|
261
|
-
- spec/models/
|
262
|
-
- spec/models/
|
263
|
+
- spec/models/cryptocurrency_info_spec.rb
|
264
|
+
- spec/models/cryptocurrency_info_urls_spec.rb
|
265
|
+
- spec/models/cryptocurrency_listings_spec.rb
|
266
|
+
- spec/models/cryptocurrency_map_spec.rb
|
267
|
+
- spec/models/global_metrics_historical_quote_spec.rb
|
268
|
+
- spec/models/global_metrics_quote_spec.rb
|
269
|
+
- spec/models/global_metrics_quotes_historical_spec.rb
|
270
|
+
- spec/models/global_metrics_quotes_latest_spec.rb
|
263
271
|
- spec/models/inline_response_200_1_spec.rb
|
264
272
|
- spec/models/inline_response_200_2_spec.rb
|
265
273
|
- spec/models/inline_response_200_3_spec.rb
|
274
|
+
- spec/models/inline_response_200_4_data_spec.rb
|
266
275
|
- spec/models/inline_response_200_4_spec.rb
|
267
276
|
- spec/models/inline_response_200_5_spec.rb
|
277
|
+
- spec/models/inline_response_200_6_spec.rb
|
278
|
+
- spec/models/inline_response_200_7_spec.rb
|
279
|
+
- spec/models/inline_response_200_8_spec.rb
|
280
|
+
- spec/models/inline_response_200_9_spec.rb
|
268
281
|
- spec/models/inline_response_200_spec.rb
|
269
282
|
- spec/models/inline_response_default_1_spec.rb
|
270
283
|
- spec/models/inline_response_default_spec.rb
|
271
|
-
- spec/models/map_spec.rb
|
272
|
-
- spec/models/market_data_spec.rb
|
273
284
|
- spec/models/platform_spec.rb
|
274
285
|
- spec/models/quote_spec.rb
|
275
286
|
- spec/models/status_spec.rb
|
@@ -302,18 +313,27 @@ test_files:
|
|
302
313
|
- spec/api_client_spec.rb
|
303
314
|
- spec/configuration_spec.rb
|
304
315
|
- spec/models/inline_response_200_2_spec.rb
|
305
|
-
- spec/models/
|
316
|
+
- spec/models/cryptocurrency_map_spec.rb
|
306
317
|
- spec/models/inline_response_200_3_spec.rb
|
318
|
+
- spec/models/global_metrics_quote_spec.rb
|
319
|
+
- spec/models/global_metrics_quotes_latest_spec.rb
|
320
|
+
- spec/models/inline_response_200_8_spec.rb
|
307
321
|
- spec/models/inline_response_200_1_spec.rb
|
308
|
-
- spec/models/
|
322
|
+
- spec/models/cryptocurrency_info_urls_spec.rb
|
323
|
+
- spec/models/global_metrics_quotes_historical_spec.rb
|
324
|
+
- spec/models/inline_response_200_9_spec.rb
|
309
325
|
- spec/models/platform_spec.rb
|
310
326
|
- spec/models/status_spec.rb
|
311
327
|
- spec/models/inline_response_200_5_spec.rb
|
312
328
|
- spec/models/inline_response_default_1_spec.rb
|
329
|
+
- spec/models/cryptocurrency_listings_spec.rb
|
313
330
|
- spec/models/inline_response_200_4_spec.rb
|
331
|
+
- spec/models/global_metrics_historical_quote_spec.rb
|
314
332
|
- spec/models/inline_response_200_spec.rb
|
315
|
-
- spec/models/
|
316
|
-
- spec/models/
|
333
|
+
- spec/models/inline_response_200_6_spec.rb
|
334
|
+
- spec/models/inline_response_200_4_data_spec.rb
|
317
335
|
- spec/models/quote_spec.rb
|
318
336
|
- spec/models/inline_response_default_spec.rb
|
337
|
+
- spec/models/cryptocurrency_info_spec.rb
|
338
|
+
- spec/models/inline_response_200_7_spec.rb
|
319
339
|
- spec/spec_helper.rb
|
data/lib/coinmarketcap_api.rb
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Coinmarketcap API Swagger Implementation
|
3
|
-
|
4
|
-
#Define coinmarketcap's api in swagger 2.0 openapi standard
|
5
|
-
|
6
|
-
OpenAPI spec version: 1.0.0
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.4
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
# Common files
|
14
|
-
require 'coinmarketcap_api/api_client'
|
15
|
-
require 'coinmarketcap_api/api_error'
|
16
|
-
require 'coinmarketcap_api/version'
|
17
|
-
require 'coinmarketcap_api/configuration'
|
18
|
-
|
19
|
-
# Models
|
20
|
-
require 'coinmarketcap_api/models/info'
|
21
|
-
require 'coinmarketcap_api/models/info_urls'
|
22
|
-
require 'coinmarketcap_api/models/inline_response_200'
|
23
|
-
require 'coinmarketcap_api/models/inline_response_200_1'
|
24
|
-
require 'coinmarketcap_api/models/inline_response_200_2'
|
25
|
-
require 'coinmarketcap_api/models/inline_response_200_3'
|
26
|
-
require 'coinmarketcap_api/models/inline_response_default'
|
27
|
-
require 'coinmarketcap_api/models/inline_response_default_1'
|
28
|
-
require 'coinmarketcap_api/models/map'
|
29
|
-
require 'coinmarketcap_api/models/status'
|
30
|
-
|
31
|
-
# APIs
|
32
|
-
require 'coinmarketcap_api/api/default_api'
|
33
|
-
|
34
|
-
module CoinmarketcapAPI
|
35
|
-
class << self
|
36
|
-
# Customize default settings for the SDK using block.
|
37
|
-
# CoinmarketcapAPI.configure do |config|
|
38
|
-
# config.username = "xxx"
|
39
|
-
# config.password = "xxx"
|
40
|
-
# end
|
41
|
-
# If no block given, return the default Configuration object.
|
42
|
-
def configure
|
43
|
-
if block_given?
|
44
|
-
yield(Configuration.default)
|
45
|
-
else
|
46
|
-
Configuration.default
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
@@ -1,145 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Coinmarketcap API Swagger Implementation
|
3
|
-
|
4
|
-
#Define coinmarketcap's api in swagger 2.0 openapi standard
|
5
|
-
|
6
|
-
OpenAPI spec version: 1.0.0
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.4
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'uri'
|
14
|
-
|
15
|
-
module CoinmarketcapAPI
|
16
|
-
class DefaultApi
|
17
|
-
attr_accessor :api_client
|
18
|
-
|
19
|
-
def initialize(api_client = ApiClient.default)
|
20
|
-
@api_client = api_client
|
21
|
-
end
|
22
|
-
# Get metadata
|
23
|
-
# Returns all static metadata for one or more cryptocurrencies including name, symbol, logo, and its various registered URLs.
|
24
|
-
# @param [Hash] opts the optional parameters
|
25
|
-
# @option opts [String] :id One or more comma-separated CoinMarketCap cryptocurrency IDs. Example: \"1,2\"
|
26
|
-
# @option opts [String] :symbol Alternatively pass one or more comma-separated cryptocurrency symbols. Example: \"BTC,ETH\". At least one \"id\" or \"symbol\" is required.
|
27
|
-
# @return [InlineResponse2003]
|
28
|
-
def cryptocurrency_info_get(opts = {})
|
29
|
-
data, _status_code, _headers = cryptocurrency_info_get_with_http_info(opts)
|
30
|
-
data
|
31
|
-
end
|
32
|
-
|
33
|
-
# Get metadata
|
34
|
-
# Returns all static metadata for one or more cryptocurrencies including name, symbol, logo, and its various registered URLs.
|
35
|
-
# @param [Hash] opts the optional parameters
|
36
|
-
# @option opts [String] :id One or more comma-separated CoinMarketCap cryptocurrency IDs. Example: \"1,2\"
|
37
|
-
# @option opts [String] :symbol Alternatively pass one or more comma-separated cryptocurrency symbols. Example: \"BTC,ETH\". At least one \"id\" or \"symbol\" is required.
|
38
|
-
# @return [Array<(InlineResponse2003, Fixnum, Hash)>] InlineResponse2003 data, response status code and response headers
|
39
|
-
def cryptocurrency_info_get_with_http_info(opts = {})
|
40
|
-
if @api_client.config.debugging
|
41
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.cryptocurrency_info_get ...'
|
42
|
-
end
|
43
|
-
# resource path
|
44
|
-
local_var_path = '/cryptocurrency/info'
|
45
|
-
|
46
|
-
# query parameters
|
47
|
-
query_params = {}
|
48
|
-
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
49
|
-
query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil?
|
50
|
-
|
51
|
-
# header parameters
|
52
|
-
header_params = {}
|
53
|
-
# HTTP header 'Accept' (if needed)
|
54
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
-
|
56
|
-
# form parameters
|
57
|
-
form_params = {}
|
58
|
-
|
59
|
-
# http body (model)
|
60
|
-
post_body = nil
|
61
|
-
auth_names = ['ApiKeyAuth']
|
62
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
63
|
-
:header_params => header_params,
|
64
|
-
:query_params => query_params,
|
65
|
-
:form_params => form_params,
|
66
|
-
:body => post_body,
|
67
|
-
:auth_names => auth_names,
|
68
|
-
:return_type => 'InlineResponse2003')
|
69
|
-
if @api_client.config.debugging
|
70
|
-
@api_client.config.logger.debug "API called: DefaultApi#cryptocurrency_info_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
71
|
-
end
|
72
|
-
return data, status_code, headers
|
73
|
-
end
|
74
|
-
# Get CoinMarketCap ID map
|
75
|
-
# Returns a paginated list of all cryptocurrencies by CoinMarketCap ID. We recommend using this convenience endpoint to lookup and utilize our unique cryptocurrency id across all endpoints as typical identifiers like ticker symbols can match multiple cryptocurrencies and change over time. As a convenience you may pass a comma-separated list of cryptocurrency symbols as symbol to filter this list to only those you require.
|
76
|
-
# @param [Hash] opts the optional parameters
|
77
|
-
# @option opts [String] :listing_status Only active coins are returned by default. Pass 'inactive' to get a list of coins that are no longer active. (default to active)
|
78
|
-
# @option opts [Integer] :start Optionally offset the start (1-based index) of the paginated list of items to return. (default to 1)
|
79
|
-
# @option opts [Integer] :limit Optionally specify the number of results to return. Use this parameter and the \"start\" parameter to determine your own pagination size.
|
80
|
-
# @option opts [String] :symbol Optionally pass a comma-separated list of cryptocurrency symbols to return CoinMarketCap IDs for. If this option is passed, other options will be ignored.
|
81
|
-
# @return [InlineResponse2002]
|
82
|
-
def cryptocurrency_map_get(opts = {})
|
83
|
-
data, _status_code, _headers = cryptocurrency_map_get_with_http_info(opts)
|
84
|
-
data
|
85
|
-
end
|
86
|
-
|
87
|
-
# Get CoinMarketCap ID map
|
88
|
-
# Returns a paginated list of all cryptocurrencies by CoinMarketCap ID. We recommend using this convenience endpoint to lookup and utilize our unique cryptocurrency id across all endpoints as typical identifiers like ticker symbols can match multiple cryptocurrencies and change over time. As a convenience you may pass a comma-separated list of cryptocurrency symbols as symbol to filter this list to only those you require.
|
89
|
-
# @param [Hash] opts the optional parameters
|
90
|
-
# @option opts [String] :listing_status Only active coins are returned by default. Pass 'inactive' to get a list of coins that are no longer active.
|
91
|
-
# @option opts [Integer] :start Optionally offset the start (1-based index) of the paginated list of items to return.
|
92
|
-
# @option opts [Integer] :limit Optionally specify the number of results to return. Use this parameter and the \"start\" parameter to determine your own pagination size.
|
93
|
-
# @option opts [String] :symbol Optionally pass a comma-separated list of cryptocurrency symbols to return CoinMarketCap IDs for. If this option is passed, other options will be ignored.
|
94
|
-
# @return [Array<(InlineResponse2002, Fixnum, Hash)>] InlineResponse2002 data, response status code and response headers
|
95
|
-
def cryptocurrency_map_get_with_http_info(opts = {})
|
96
|
-
if @api_client.config.debugging
|
97
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.cryptocurrency_map_get ...'
|
98
|
-
end
|
99
|
-
if @api_client.config.client_side_validation && !opts[:'start'].nil? && opts[:'start'] < 1
|
100
|
-
fail ArgumentError, 'invalid value for "opts[:"start"]" when calling DefaultApi.cryptocurrency_map_get, must be greater than or equal to 1.'
|
101
|
-
end
|
102
|
-
|
103
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 5000
|
104
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DefaultApi.cryptocurrency_map_get, must be smaller than or equal to 5000.'
|
105
|
-
end
|
106
|
-
|
107
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
108
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DefaultApi.cryptocurrency_map_get, must be greater than or equal to 1.'
|
109
|
-
end
|
110
|
-
|
111
|
-
# resource path
|
112
|
-
local_var_path = '/cryptocurrency/map'
|
113
|
-
|
114
|
-
# query parameters
|
115
|
-
query_params = {}
|
116
|
-
query_params[:'listing_status'] = opts[:'listing_status'] if !opts[:'listing_status'].nil?
|
117
|
-
query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
|
118
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
119
|
-
query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil?
|
120
|
-
|
121
|
-
# header parameters
|
122
|
-
header_params = {}
|
123
|
-
# HTTP header 'Accept' (if needed)
|
124
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
125
|
-
|
126
|
-
# form parameters
|
127
|
-
form_params = {}
|
128
|
-
|
129
|
-
# http body (model)
|
130
|
-
post_body = nil
|
131
|
-
auth_names = ['ApiKeyAuth']
|
132
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
133
|
-
:header_params => header_params,
|
134
|
-
:query_params => query_params,
|
135
|
-
:form_params => form_params,
|
136
|
-
:body => post_body,
|
137
|
-
:auth_names => auth_names,
|
138
|
-
:return_type => 'InlineResponse2002')
|
139
|
-
if @api_client.config.debugging
|
140
|
-
@api_client.config.logger.debug "API called: DefaultApi#cryptocurrency_map_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
141
|
-
end
|
142
|
-
return data, status_code, headers
|
143
|
-
end
|
144
|
-
end
|
145
|
-
end
|