Skip to content

Commit

Permalink
feat: twilio-go stream functions also return error channel (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
childish-sambino authored Apr 27, 2022
1 parent 336534e commit ea8f5be
Show file tree
Hide file tree
Showing 295 changed files with 11,469 additions and 8,533 deletions.
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ package main

import (
"github.com/twilio/twilio-go"
"os"
)

func main() {
Expand All @@ -128,7 +127,6 @@ import (
"fmt"
"github.com/twilio/twilio-go"
openapi "github.com/twilio/twilio-go/rest/api/v2010"
"os"
)

func main() {
Expand Down Expand Up @@ -243,7 +241,6 @@ func main() {
fmt.Println(*resp.Sid)
}
}

```

### Create a Studio Flow
Expand All @@ -254,7 +251,6 @@ package main
import (
"encoding/json"
"fmt"
"os"

"github.com/twilio/twilio-go"
openapi "github.com/twilio/twilio-go/rest/studio/v2"
Expand Down Expand Up @@ -309,8 +305,9 @@ receive (limit) and the maximum size you want each page fetch to be (pageSize).
for you.

`List` eagerly fetches all records and returns them as a list, whereas `Stream` streams the records and lazily retrieves
the pages as you iterate over the collection. You can also page manually using the `PageXxx` function in each of the
apis.
the pages as you iterate over the collection. Also, `List` returns no records if any errors are encountered while paging,
whereas `Stream` returns all records up until encountering an error. You can also page manually using the `PageXxx`
function in each of the apis.

```go
package main
Expand Down Expand Up @@ -348,7 +345,6 @@ func main() {
package main

import (
"encoding/json"
"fmt"
"github.com/twilio/twilio-go"
openapi "github.com/twilio/twilio-go/rest/api/v2010"
Expand Down
68 changes: 39 additions & 29 deletions rest/accounts/v1/credentials_aws.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 39 additions & 29 deletions rest/accounts/v1/credentials_public_keys.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 39 additions & 29 deletions rest/api/v2010/accounts.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ea8f5be

Please sign in to comment.