twilio / twilio-go

A Go package for communicating with the Twilio API.
MIT License
278 stars 40 forks source link

Double check the usability on the README #107

Closed kevinburke closed 2 years ago

kevinburke commented 3 years ago

It's weird that the example for creating a message requires JSON marshaling of the response (??), but the example for creating a call does not.

Also, not an expert but guessing that the message/call examples are going to be relevant to a lot more people than the info on how to set the region or edge, and should maybe go higher up on the page.

Also I guess it's bizarre that errors are being printed and then ignored.

shwetha-manvinkurke commented 3 years ago

Hi @kevinburke These are merely examples that show you what you could do with the response/error but there is always room for improvement. Setting edge/region should happen at the client initialization and hence it makes to specify that in the examples before any call is made. You are also welcome to suggest any improvements by submitting a PR.