Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add standalone usage example #81

Merged
merged 2 commits into from
May 21, 2021
Merged

docs: add standalone usage example #81

merged 2 commits into from
May 21, 2021

Conversation

eshanholtz
Copy link
Contributor

Add documentation for how to use standalone product API services.

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, please file a support ticket, or create a GitHub Issue in this repository.

README.md Show resolved Hide resolved
@@ -337,6 +335,35 @@ func main() {
For more descriptive exception types, please see the [Twilio documentation](https://www.twilio.com/docs/libraries/go/usage-guide#exceptions).

## Advanced Usage
### Using Standalone Products
Don't want to import the top-level Twilio RestClient with access to the full suite of Twilio products? Use standalone product services instead:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!!

@@ -337,6 +335,35 @@ func main() {
For more descriptive exception types, please see the [Twilio documentation](https://www.twilio.com/docs/libraries/go/usage-guide#exceptions).

## Advanced Usage
### Using Standalone Products
Don't want to import the top-level Twilio RestClient with access to the full suite of Twilio products? Use standalone product services instead:
```go
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I try to run this example, I'm getting:

./main.go:19:15: defaultClient.SetAccountSid undefined (type *client.Client has no field or method SetAccountSid)
./main.go:21:20: undefined: "github.com/twilio/twilio-go/rest/api/v2010".NewDefaultApiServiceWithClient
./main.go:22:26: undefined: "github.com/twilio/twilio-go/rest/serverless/v1".NewDefaultApiServiceWithClient

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you using the main branch or pulling a released version? These changes haven't been released yet.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I think I'm pulling the released version v0.8.0. Will test against main. Thanks!

@eshanholtz eshanholtz merged commit 42775f5 into main May 21, 2021
@eshanholtz eshanholtz deleted the docs branch May 21, 2021 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants