github.com/kevinburke/twilio-go (go): Package twilio simplifies interaction with the Twilio API.  The twilio-go library should be your first choice for interacting with the Twilio API; it offers forward compatibility, very fine-grained control of API access, best-in-class control over how long to wait for requests to complete, and great debuggability when things go wrong. Get started by creating a Client:  All of the Twilio resources are available as properties on the Client. Let's walk through some of the example use cases.  Resources that can create new methods take a url.Values as an argument, and pass all arguments to the Twilio API. This method ensures forward compatibility; any new arguments that get invented can be added in client-side code.  Call Get() with a particular sid.  Call Update() with a particular sid and a url.Values.  There are two flavors of interaction. First, if all you want is a single Page of resources, optionally with filters:  To control the page size, set "PageSize": "N" in the url.Values{} field. Twilio defaults to returning 50 results per page if this is not set.  Alternatively you can get a PageIterator and call Next() to repeatedly retrieve pages.  Twilio Monitor subresources are available on the Client under the Monitor field, e.g.  There are several custom types and helper functions designed to make your job easier. Where possible, we try to parse values from the Twilio API into a datatype that makes more sense. For example, we try to parse timestamps into Time values, durations into time.Duration, integer values into uints, even if the API returns them as strings, e.g. "3".  All phone numbers have type PhoneNumber. By default these are E.164, but can be printed in Friendly()/Local() variations as well.  Any times returned from the Twilio API are of type TwilioTime, which has two properties - Valid (a bool), and Time (a time.Time). Check Valid before using the related Time.  There are constants for every Status in the API, for example StatusQueued, which has the value "queued". You can call Friendly() on any Status to get an uppercase version of the status, e.g.
Keywords: api|client|golang|http|twilio