Skip to content

Commit

Permalink
v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelmota committed May 13, 2019
1 parent 6361b22 commit eaf9423
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.0] - 2019-05-12
### Added
- Added CoinGecko API support

### Changed
- Default API from CoinMarketCap to CoinGecko

## [1.1.6] - 2019-04-23
### Added
- Prompt for CoinMarketCap Pro API Key
Expand Down
2 changes: 1 addition & 1 deletion cmd/cointop.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func Run() {
flag.BoolVar(&reset, "reset", false, "Reset config")
flag.StringVar(&config, "config", "", "Config filepath")
flag.StringVar(&cmcAPIKey, "coinmarketcap-api-key", "", "CoinMarketCap API key")
flag.StringVar(&apiChoice, "api", cointop.CoinMarketCap, "API choice")
flag.StringVar(&apiChoice, "api", cointop.CoinGecko, "API choice")
flag.Parse()
if v || ver {
fmt.Printf("cointop v%s", cointop.Version())
Expand Down
1 change: 1 addition & 0 deletions cointop/common/api/impl/coingecko/coingecko.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ func (s *Service) GetGlobalMarketData(convert string) (apitypes.GlobalMarketData
ActiveAssets: 0,
ActiveMarkets: int(market.Markets),
}

return ret, nil
}

Expand Down
4 changes: 3 additions & 1 deletion cointop/marketbar.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ func (ct *Cointop) updateMarketbar() error {
if ok {
ct.debuglog("soft cache hit")
}
} else {
}

if market.TotalMarketCapUSD == 0 {
market, err = ct.api.GetGlobalMarketData(ct.currencyconversion)
if err != nil {
filecache.Get(cachekey, &market)
Expand Down
2 changes: 1 addition & 1 deletion cointop/version.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cointop

// TODO: make dynamic based on git tag
const version = "1.1.6"
const version = "1.2.0"

func (ct *Cointop) version() string {
return version
Expand Down

0 comments on commit eaf9423

Please sign in to comment.