Skip to content

Commit ea8f5be

Browse files
author
childish-sambino
authored
feat: twilio-go stream functions also return error channel (#162)
1 parent 336534e commit ea8f5be

File tree

295 files changed

+11469
-8533
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

295 files changed

+11469
-8533
lines changed

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ package main
104104

105105
import (
106106
"github.com/twilio/twilio-go"
107-
"os"
108107
)
109108

110109
func main() {
@@ -128,7 +127,6 @@ import (
128127
"fmt"
129128
"github.com/twilio/twilio-go"
130129
openapi "github.com/twilio/twilio-go/rest/api/v2010"
131-
"os"
132130
)
133131

134132
func main() {
@@ -243,7 +241,6 @@ func main() {
243241
fmt.Println(*resp.Sid)
244242
}
245243
}
246-
247244
```
248245

249246
### Create a Studio Flow
@@ -254,7 +251,6 @@ package main
254251
import (
255252
"encoding/json"
256253
"fmt"
257-
"os"
258254

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

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

315312
```go
316313
package main
@@ -348,7 +345,6 @@ func main() {
348345
package main
349346

350347
import (
351-
"encoding/json"
352348
"fmt"
353349
"github.com/twilio/twilio-go"
354350
openapi "github.com/twilio/twilio-go/rest/api/v2010"

rest/accounts/v1/credentials_aws.go

Lines changed: 39 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rest/accounts/v1/credentials_public_keys.go

Lines changed: 39 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rest/api/v2010/accounts.go

Lines changed: 39 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)