Volodymyr Tkach 17efff2b41 Create FUNDING.yml | 2 years ago | |
---|---|---|
.github | 2 years ago | |
donatello | 2 years ago | |
.gitignore | 2 years ago | |
LICENSE | 2 years ago | |
Makefile | 2 years ago | |
README.md | 2 years ago | |
go.mod | 2 years ago | |
go.sum | 2 years ago | |
main.go | 2 years ago |
Go API client for ukrainian donate platform donatello.to
Example is here: https://github.com/vladimirok5959/golang-donatello/blob/main/main.go
export TOKEN="YOUR-TOKEN"
go run main.go
client.Me:
respMe: &v1.ResponseMe{
Success: true,
Message: "",
NickName: "NickName",
PubID: "A1B-A123456",
Page: "https://donatello.to/nickname",
IsActive: true,
IsPublic: true,
Donates: v1.ResponseMeDonates{
TotalAmount: 10,
TotalCount: 1
},
CreatedAt: "2022-10-20 00:30:50"
}
err: <nil>
client.Donates:
respDonates: &v1.ResponseDonates{
Success: true,
Message: "",
Content: []v1.ResponseDonatesContent{
v1.ResponseDonatesContent{
PubID: "A1B-A123456",
ClientName: "ClientName",
Message: "Message",
Amount: "100",
Currency: "UAH",
Goal: "",
IsPublished: false,
CreatedAt: "2022-10-20 00:30:50"
}
},
Page: 1,
Size: 20,
Pages: 1,
First: true,
Last: true,
Total: 1
}
err: <nil>
client.Clients:
respClients: &v1.ResponseClients{
Success: true,
Message: "",
Clients: []v1.ResponseClientsClients{
v1.ResponseClientsClients{
ClientName: "ClientName",
TotalAmount: 100
}
}
}
err: <nil>
client.EachDonate:
EachDonate: &v1.ResponseDonatesContent{
PubID: "A1B-A123456",
ClientName: "ClientName",
Message: "Message",
Amount: "100",
Currency: "UAH",
Goal: "",
IsPublished: false,
CreatedAt: "2022-10-20 00:30:50"
}
API faker included, see: https://github.com/vladimirok5959/golang-donatello/blob/main/donatello/v1/client_fake_api.go