Use common EncodeURLValues function where possible

This commit is contained in:
Adrian Gallagher
2015-11-01 18:34:44 +11:00
parent b2e39f17f5
commit e5b27492bd
6 changed files with 14 additions and 88 deletions

View File

@@ -262,17 +262,9 @@ func (b *Bitstamp) GetOrderbook() (BitstampOrderbook, error) {
}
func (b *Bitstamp) GetTransactions(values url.Values) ([]BitstampTransactions, error) {
path := EncodeURLValues(BITSTAMP_API_URL+BITSTAMP_API_TRANSACTIONS, values)
transactions := []BitstampTransactions{}
path := BITSTAMP_API_URL + BITSTAMP_API_TRANSACTIONS
if len(values) > 0 {
path += "?" + values.Encode()
}
log.Println(path)
err := SendHTTPGetRequest(path, true, &transactions)
if err != nil {
return nil, err
}