20 lines
402 B
Go
20 lines
402 B
Go
package requests
|
|
|
|
import (
|
|
"encoding/json"
|
|
"main/monobank"
|
|
models2 "main/monobank/api/client_info/models"
|
|
)
|
|
|
|
func ClientInfo() (models2.ClientInfo, error) {
|
|
data := models2.ClientInfo{}
|
|
|
|
responseJson, err := monobank.Request("GET", "https://api.monobank.ua/personal/client-info", struct{}{})
|
|
if err != nil {
|
|
return data, err
|
|
}
|
|
json.Unmarshal([]byte(responseJson), &data)
|
|
|
|
return data, nil
|
|
}
|