mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-22 15:25:19 +00:00
Amend examples (#211)
This commit is contained in:
16
examples/crypto/news/go/getCryptocurrencyNews.go
Executable file
16
examples/crypto/news/go/getCryptocurrencyNews.go
Executable file
@@ -0,0 +1,16 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/crypto"
|
||||
"os"
|
||||
)
|
||||
|
||||
// Get news related to a currency
|
||||
func GetCryptocurrencyNews() {
|
||||
cryptoService := crypto.NewCryptoService(os.Getenv("MICRO_API_TOKEN"))
|
||||
rsp, err := cryptoService.News(&crypto.NewsRequest{
|
||||
Symbol: "BTCUSD",
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
}
|
||||
Reference in New Issue
Block a user