-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package compress | ||
|
||
import ( | ||
"encoding/json" | ||
"fmt" | ||
) | ||
|
||
|
||
func (o *compress) GetCredentials() (ResponseServer, error) { | ||
// | ||
resp, err := o.restyPost(CREDENTIALS, BaseModel{ClientId: o.GetCliendId(), ApiKey: o.apiKey}) | ||
if err != nil { | ||
return nil, err | ||
Check failure on line 13 in compress/api_customer.go GitHub Actions / build (1.18.x)
Check failure on line 13 in compress/api_customer.go GitHub Actions / build (1.19.x)
Check failure on line 13 in compress/api_customer.go GitHub Actions / build (1.20.x)
|
||
} | ||
o.debugPrint(resp) | ||
if resp.IsError() { | ||
return nil, fmt.Errorf("") | ||
Check failure on line 17 in compress/api_customer.go GitHub Actions / build (1.18.x)
Check failure on line 17 in compress/api_customer.go GitHub Actions / build (1.19.x)
Check failure on line 17 in compress/api_customer.go GitHub Actions / build (1.20.x)
|
||
} | ||
var obj ResponseServer | ||
if err := json.Unmarshal(resp.Body(), &obj); err != nil { | ||
return nil, err | ||
Check failure on line 21 in compress/api_customer.go GitHub Actions / build (1.18.x)
Check failure on line 21 in compress/api_customer.go GitHub Actions / build (1.19.x)
Check failure on line 21 in compress/api_customer.go GitHub Actions / build (1.20.x)
|
||
} | ||
o.debugPrint(obj) | ||
return obj, nil | ||
} |