Updates Containerize
This commit is contained in:
7
api.go
7
api.go
@@ -14,7 +14,9 @@ const (
|
||||
// TastytradeAPI represents the Tastytrade API client
|
||||
type TastytradeAPI struct {
|
||||
httpClient *http.Client
|
||||
user string
|
||||
authToken string
|
||||
authExpire time.Time
|
||||
remToken string
|
||||
host string
|
||||
}
|
||||
@@ -31,6 +33,11 @@ func NewTastytradeAPI(hosts ...string) *TastytradeAPI {
|
||||
}
|
||||
}
|
||||
|
||||
// get logged in User
|
||||
func (api *TastytradeAPI) User() string {
|
||||
return api.user
|
||||
}
|
||||
|
||||
// fetchData sends a GET request to the specified URL with authorization
|
||||
func (api *TastytradeAPI) fetchData(url string) (map[string]interface{}, error) {
|
||||
req, err := http.NewRequest("GET", url, nil)
|
||||
|
||||
Reference in New Issue
Block a user