Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make coinmarketcap's number of pages configurable #1802

Merged
merged 4 commits into from
Apr 22, 2019

Conversation

ayrat555
Copy link
Contributor

We couldn't fetch coin price for some coins

Changelog

  • make coinmarketcap's number of pages configurable

@ghost ghost assigned ayrat555 Apr 22, 2019
@ghost ghost added the in progress label Apr 22, 2019
@coveralls
Copy link

Pull Request Test Coverage Report for Build 744e9f41-eebb-48f6-8972-7dd307e123a8

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.5%) to 82.848%

Changes Missing Coverage Covered Lines Changed/Added Lines %
apps/explorer/lib/explorer/exchange_rates/source/coin_market_cap.ex 0 1 0.0%
Totals Coverage Status
Change from base Build faf84012-286d-44a1-98e3-3d2c78274a7a: 0.5%
Covered Lines: 4434
Relevant Lines: 5352

💛 - Coveralls

@coveralls
Copy link

coveralls commented Apr 22, 2019

Pull Request Test Coverage Report for Build 3da6d5de-d469-41c6-b29c-1569c5e8828d

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.6%) to 82.922%

Changes Missing Coverage Covered Lines Changed/Added Lines %
apps/explorer/lib/explorer/exchange_rates/source/coin_market_cap.ex 0 1 0.0%
Totals Coverage Status
Change from base Build 15a61072-3ae7-4c25-bae6-91403ad4d7d7: 0.6%
Covered Lines: 4438
Relevant Lines: 5352

💛 - Coveralls

@ghost ghost assigned vbaranov Apr 22, 2019
@@ -38,7 +38,7 @@ defmodule Explorer.ExchangeRates.Source.CoinMarketCap do
"#{base_url()}/v1/ticker/?start=#{page - 1}00"
end

def max_page_number, do: 10
def max_page_number, do: config(:pages) || 10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ayrat555

Btw, do we need to convert config(:pages) to integer here and do we need the second fallback to 10 at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need a fallback. value is converted to integer in config

@vbaranov vbaranov merged commit f609a3b into master Apr 22, 2019
@vbaranov vbaranov deleted the ab-make-number-of-pages-of-coinmarketcap-config branch April 22, 2019 13:40
@ghost ghost removed the in progress label Apr 22, 2019
@vbaranov vbaranov mentioned this pull request Apr 29, 2019
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants