2024-03-25 11:55:01 +02:00
|
|
|
package requests
|
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/json"
|
|
|
|
"main/monobank"
|
|
|
|
models2 "main/monobank/api/client_info/models"
|
|
|
|
)
|
|
|
|
|
|
|
|
func ClientInfo() (models2.ClientInfo, error) {
|
|
|
|
data := models2.ClientInfo{}
|
|
|
|
|
2024-03-27 19:06:44 +02:00
|
|
|
responseJson, err := monobank.Request("GET", "https://api.monobank.ua/personal/client-info", struct{}{})
|
2024-03-25 11:55:01 +02:00
|
|
|
if err != nil {
|
|
|
|
return data, err
|
|
|
|
}
|
|
|
|
json.Unmarshal([]byte(responseJson), &data)
|
|
|
|
|
|
|
|
return data, nil
|
|
|
|
}
|