-
Notifications
You must be signed in to change notification settings - Fork 610
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2749 from cloudflare/release-please--branches--v2…
…--changes--next release: 3.0.0
- Loading branch information
Showing
1,157 changed files
with
54,834 additions
and
41,630 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
".": "2.4.0" | ||
".": "3.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
configured_endpoints: 1256 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-923d8c7667b68c786e6c026c4f4851798943c7d68ea055c0043d9253413c5847.yml | ||
configured_endpoints: 1342 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-932e649ab74f46cde6d135f1b54042c6f66f7ebc74a874ec9c11e127dc14d590.yml |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Cloudflare Go API Library | ||
|
||
<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2"><img src="https://pkg.go.dev/badge/github.com/cloudflare/cloudflare-go/v2.svg" alt="Go Reference"></a> | ||
<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3"><img src="https://pkg.go.dev/badge/github.com/cloudflare/cloudflare-go/v3.svg" alt="Go Reference"></a> | ||
|
||
The Cloudflare Go library provides convenient access to [the Cloudflare REST | ||
API](https://developers.cloudflare.com/api) from applications written in Go. The full API of this library can be found in [api.md](api.md). | ||
|
@@ -11,7 +11,7 @@ API](https://developers.cloudflare.com/api) from applications written in Go. The | |
|
||
```go | ||
import ( | ||
"github.com/cloudflare/cloudflare-go/v2" // imported as cloudflare | ||
"github.com/cloudflare/cloudflare-go/v3" // imported as cloudflare | ||
) | ||
``` | ||
|
||
|
@@ -22,7 +22,7 @@ Or to pin the version: | |
<!-- x-release-please-start-version --> | ||
|
||
```sh | ||
go get -u 'github.com/cloudflare/cloudflare-go/[email protected]' | ||
go get -u 'github.com/cloudflare/cloudflare-go/v3' | ||
``` | ||
|
||
<!-- x-release-please-end --> | ||
|
@@ -42,9 +42,9 @@ import ( | |
"context" | ||
"fmt" | ||
|
||
"github.com/cloudflare/cloudflare-go/v2" | ||
"github.com/cloudflare/cloudflare-go/v2/option" | ||
"github.com/cloudflare/cloudflare-go/v2/zones" | ||
"github.com/cloudflare/cloudflare-go/v3" | ||
"github.com/cloudflare/cloudflare-go/v3/option" | ||
"github.com/cloudflare/cloudflare-go/v3/zones" | ||
) | ||
|
||
func main() { | ||
|
@@ -159,7 +159,7 @@ client.Zones.New(context.TODO(), ..., | |
) | ||
``` | ||
|
||
See the [full list of request options](https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/option). | ||
See the [full list of request options](https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/option). | ||
|
||
### Pagination | ||
|
||
|
@@ -171,8 +171,8 @@ You can use `.ListAutoPaging()` methods to iterate through items across all page | |
iter := client.Accounts.ListAutoPaging(context.TODO(), accounts.AccountListParams{}) | ||
// Automatically fetches more pages as needed. | ||
for iter.Next() { | ||
accountListResponse := iter.Current() | ||
fmt.Printf("%+v\n", accountListResponse) | ||
account := iter.Current() | ||
fmt.Printf("%+v\n", account) | ||
} | ||
if err := iter.Err(); err != nil { | ||
panic(err.Error()) | ||
|
Oops, something went wrong.