Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
Lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
onuryilmaz committed Jul 5, 2016
1 parent a524ae0 commit 0350c73
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions btce.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package btce
// TODO package level documentation
// Include example usage
package btce
Expand Down
10 changes: 5 additions & 5 deletions public.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
// PublicAPI provides access to such information as tickers of currency pairs, active orders on different pairs, the latest trades for each pair etc.
type PublicAPI struct{}

const API_URL = "https://btc-e.com/api/3/"
const apiURL = "https://btc-e.com/api/3/"

// Info provides all the information about currently active pairs, such as the maximum number of digits after the decimal point, the minimum price, the maximum price, the minimum transaction size, whether the pair is hidden, the commission for each pair.
func (api *PublicAPI) Info() (Info, error) {

url := API_URL + "info"
url := apiURL + "info"
r, err := http.Get(url)

if err == nil {
Expand All @@ -29,7 +29,7 @@ func (api *PublicAPI) Info() (Info, error) {
// All information is provided over the past 24 hours.
func (api *PublicAPI) Ticker(currency []string) (Ticker, error) {

url := API_URL + "ticker/"
url := apiURL + "ticker/"
for _, c := range currency {
url = url + c + "-"
}
Expand All @@ -47,7 +47,7 @@ func (api *PublicAPI) Ticker(currency []string) (Ticker, error) {
// Depth provides the information about active orders on the pair.
func (api *PublicAPI) Depth(currency []string, limit int) (Depth, error) {

url := API_URL + "depth/"
url := apiURL + "depth/"
for _, c := range currency {
url = url + c + "-"
}
Expand All @@ -69,7 +69,7 @@ func (api *PublicAPI) Depth(currency []string, limit int) (Depth, error) {
// Trades provides the information about the last trades.
func (api *PublicAPI) Trades(currency []string, limit int) (Trades, error) {

url := API_URL + "trades/"
url := apiURL + "trades/"
for _, c := range currency {
url = url + c + "-"
}
Expand Down
7 changes: 3 additions & 4 deletions trade.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type TradeAPI struct {
lastNonce int64
}

const trade_URL = "https://btc-e.com/tapi"
const tradeURL = "https://btc-e.com/tapi"

// Auth provides API key and secret setting for Trade API
func (tapi *TradeAPI) Auth(key string, secret string) {
Expand All @@ -41,9 +41,8 @@ func (tapi *TradeAPI) GetInfo() (AccountInfo, error) {
err := tapi.call("getInfo", &info, nil)
if err == nil {
return info, nil
} else {
return info, err
}
return info, err
}

// GetInfoAuth provides GetInfo capability with authorization
Expand Down Expand Up @@ -295,7 +294,7 @@ func (tapi *TradeAPI) call(method string, v interface{}, params map[string]strin

postData := tapi.encodePostData(method, params)

req, err := http.NewRequest("POST", trade_URL, bytes.NewBufferString(postData))
req, err := http.NewRequest("POST", tradeURL, bytes.NewBufferString(postData))
req.Header.Add("Key", tapi.API_KEY)
req.Header.Add("Sign", sign(tapi.API_SECRET, postData))
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
Expand Down

0 comments on commit 0350c73

Please sign in to comment.