2
0
mirror of https://github.com/miguelmota/cointop synced 2024-11-18 15:25:31 +00:00
cointop/pkg/api/api.go

25 lines
466 B
Go
Raw Normal View History

package api
import (
2021-09-30 06:17:58 +00:00
cg "github.com/cointop-sh/cointop/pkg/api/impl/coingecko"
cmc "github.com/cointop-sh/cointop/pkg/api/impl/coinmarketcap"
)
2018-05-09 08:24:31 +00:00
// NewCMC new CoinMarketCap API
2019-04-22 02:39:07 +00:00
func NewCMC(apiKey string) Interface {
2019-05-13 02:24:10 +00:00
return cmc.NewCMC(apiKey)
}
2018-05-09 08:24:31 +00:00
// NewCC new CryptoCompare API
func NewCC() {
2018-12-24 09:10:36 +00:00
// TODO
2018-05-09 08:24:31 +00:00
}
2018-12-31 23:30:23 +00:00
// NewCG new CoinGecko API
2021-02-23 08:05:34 +00:00
func NewCG(perPage, maxPages uint) Interface {
return cg.NewCoinGecko(&cg.Config{
PerPage: perPage,
MaxPages: maxPages,
})
2018-12-31 23:30:23 +00:00
}