Skip to content

Commit

Permalink
Merge pull request #1521 from cloudflare/release-please--branches--v2…
Browse files Browse the repository at this point in the history
…--changes--next

release: 2.0.0-beta.1
  • Loading branch information
jacobbednarz authored Mar 8, 2024
2 parents f1c775a + 16053b9 commit 9b665e0
Show file tree
Hide file tree
Showing 2,040 changed files with 312,295 additions and 391,273 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0"
".": "2.0.0-beta.1"
}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 2.0.0-beta.1 (2024-03-08)

Full Changelog: [v0.1.0...v2.0.0-beta.1](https://github.com/cloudflare/cloudflare-go/compare/v0.1.0...v2.0.0-beta.1)

### Features

* OpenAPI spec update via Stainless API ([#1523](https://github.com/cloudflare/cloudflare-go/issues/1523)) ([9755602](https://github.com/cloudflare/cloudflare-go/commit/9755602b83ed9dd548303600021539a951795043))
* OpenAPI spec update via Stainless API ([#1524](https://github.com/cloudflare/cloudflare-go/issues/1524)) ([c9e201a](https://github.com/cloudflare/cloudflare-go/commit/c9e201aa36b25699cfb966a79de8b9b552dd73e8))
* update via SDK Studio ([#1520](https://github.com/cloudflare/cloudflare-go/issues/1520)) ([cdaf537](https://github.com/cloudflare/cloudflare-go/commit/cdaf5374ea14b7e9df99a8a38783381ebfae8b63))

## 0.1.0 (2024-03-08)

Full Changelog: [v0.0.1...v0.1.0](https://github.com/cloudflare/cloudflare-go/compare/v0.0.1...v0.1.0)
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/cloudflare/cloudflare-go@v0.1.0'
go get -u 'github.com/cloudflare/cloudflare-go@v2.0.0-beta.1'
```

<!-- x-release-please-end -->
Expand All @@ -44,19 +44,20 @@ import (

"github.com/cloudflare/cloudflare-go"
"github.com/cloudflare/cloudflare-go/option"
"github.com/cloudflare/cloudflare-go/zones"
)

func main() {
client := cloudflare.NewClient(
option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), // defaults to os.LookupEnv("CLOUDFLARE_API_KEY")
option.WithAPIEmail("[email protected]"), // defaults to os.LookupEnv("CLOUDFLARE_EMAIL")
)
zoneNewResponse, err := client.Zones.New(context.TODO(), cloudflare.ZoneNewParams{
Account: cloudflare.F(cloudflare.ZoneNewParamsAccount{
zoneNewResponse, err := client.Zones.New(context.TODO(), zones.ZoneNewParams{
Account: cloudflare.F(zones.ZoneNewParamsAccount{
ID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
}),
Name: cloudflare.F("example.com"),
Type: cloudflare.F(cloudflare.ZoneNewParamsTypeFull),
Type: cloudflare.F(zones.ZoneNewParamsTypeFull),
})
if err != nil {
panic(err.Error())
Expand Down Expand Up @@ -187,7 +188,7 @@ When the API returns a non-success status code, we return an error with type
To handle errors, we recommend that you use the `errors.As` pattern:

```go
_, err := client.Zones.Get(context.TODO(), cloudflare.ZoneGetParams{
_, err := client.Zones.Get(context.TODO(), zones.ZoneGetParams{
ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
})
if err != nil {
Expand Down Expand Up @@ -216,7 +217,7 @@ ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
client.Zones.Edit(
ctx,
cloudflare.ZoneEditParams{
zones.ZoneEditParams{
ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
},
// This sets the per-retry timeout
Expand All @@ -241,7 +242,7 @@ client := cloudflare.NewClient(
// Override per-request:
client.Zones.Get(
context.TODO(),
cloudflare.ZoneGetParams{
zones.ZoneGetParams{
ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
},
option.WithMaxRetries(5),
Expand Down
Loading

0 comments on commit 9b665e0

Please sign in to comment.