voximplant / apiclient-go Goto Github PK
View Code? Open in Web Editor NEWVoximplant Management API Go client library
License: Apache License 2.0
Voximplant Management API Go client library
License: Apache License 2.0
Hello, may you add sample file config (vox_key_jwt.json)?
Does the following code works incorrect or am I doing something wrong?
Config := config.NewConfig().WithKeyPath("key.json")
Client, err := methods.NewClient(Config) // Error happens here. There were two differently
// generated json keys by API request and admin panel, but the problem remains
if err != nil {
println(err.Error())
}
fromDate, toDate := &structure.Timestamp{}, &structure.Timestamp{}
fromDate.UnmarshalJSON([]byte("2019-09-01 00:00:00"))
toDate.UnmarshalJSON([]byte("2019-09-01 00:00:00"))
Params := methods.GetCallHistoryParams{
FromDate: fromDate,
ToDate: toDate,
}
result, verr, err := Client.History.GetCallHistory(Params)
println(result.Count, verr.Error.Msg, err.Error())
Ребята, сделайте указателями булевые поля фильтра, например тут:
type GetPhoneNumbersParams struct {
...
IsBoundToApplication bool `json:"is_bound_to_application,string,omitempty"`
Canceled bool `json:"canceled,string,omitempty"`
Deactivated bool `json:"deactivated,string,omitempty"`
AutoCharge bool `json:"auto_charge,string,omitempty"`
ChildrenPhonesOnly bool `json:"children_phones_only,string,omitempty"`
CanBeUsed bool `json:"can_be_used,string,omitempty"`
SmsSupported bool `json:"sms_supported,string,omitempty"`
IsBoundToRule bool `json:"is_bound_to_rule,string,omitempty"`
}
Из-за того, что сейчас булево поле не указатель и указан omitempty
нельзя фильтровать результат по значению false
:
filter := methods.GetPhoneNumbersParams{
Canceled: false,
}
Hello, please add example how to create call list.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.