From 785c63530a0f2924f40c38d8c911cc2c9cccdd0b Mon Sep 17 00:00:00 2001 From: "kayos@tcp.direct" Date: Sun, 22 May 2022 18:34:15 -0700 Subject: [PATCH] Fix #1 --- actions.go | 1 - api.go | 18 +++++++++++------- example/cmd/getpackages/main.go | 2 +- example/cmd/resetauthips/main.go | 1 - example/common.go | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/actions.go b/actions.go index f64cb90..5426e9a 100644 --- a/actions.go +++ b/actions.go @@ -11,7 +11,6 @@ import ( "strconv" ) - func (api *APIClient) debugPrintf(format string, obj ...interface{}) { if api.Debug { fmt.Println(fmt.Sprintf(format, obj...)) diff --git a/api.go b/api.go index b5e3d96..285dc54 100644 --- a/api.go +++ b/api.go @@ -81,13 +81,17 @@ type pagination struct { // UserPackage represents a proxy package purchased from proxybonanza.com. type UserPackage struct { - ID int `json:"id"` - CustomName interface{} `json:"custom_name"` - Login string `json:"login"` - Password string `json:"password"` - Expires time.Time `json:"expires"` - Bandwidth int64 `json:"bandwidth"` - LastIPChange time.Time `json:"last_ip_change"` + ID int `json:"id"` + CustomName interface{} `json:"custom_name"` + Login string `json:"login"` + Password string `json:"password"` + Expires time.Time `json:"expires"` + Bandwidth int64 `json:"bandwidth"` + + // FIXME: + // See https://github.com/yunginnanet/ProxyGonanza/issues/1 + // LastIPChange time.Time `json:"last_ip_change"` + LowBanwidthNotificationPercent int `json:"low_banwidth_notification_percent"` Package PackageDetails `json:"package"` BandwidthGb float64 `json:"bandwidth_gb"` diff --git a/example/cmd/getpackages/main.go b/example/cmd/getpackages/main.go index 456a039..408caa1 100644 --- a/example/cmd/getpackages/main.go +++ b/example/cmd/getpackages/main.go @@ -37,6 +37,6 @@ func main() { fmt.Printf("\nfound %d auth IPs\n", len(authips)) for _, i := range authips { pretty, _ := json.MarshalIndent(i, "", "\t") - fmt.Print(string(pretty)+"\n") + fmt.Print(string(pretty) + "\n") } } diff --git a/example/cmd/resetauthips/main.go b/example/cmd/resetauthips/main.go index cca24ff..a7b77f2 100644 --- a/example/cmd/resetauthips/main.go +++ b/example/cmd/resetauthips/main.go @@ -24,7 +24,6 @@ func main() { println("deleted " + strconv.Itoa(deleted) + " IPs successfully") - println("adding current IP to all packages...") count := c.AddCurrentIPtoAllPackages() if count == 0 { diff --git a/example/common.go b/example/common.go index e80857c..1fdcee0 100644 --- a/example/common.go +++ b/example/common.go @@ -6,7 +6,7 @@ import ( ) var ( - Debug = false + Debug = false APIKey string )