monobank-firefly3-bot/monobank/api/client_info/requests/client_info.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
}