Skip to content

Commit

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

release: 3.0.0
  • Loading branch information
jacobbednarz authored Sep 20, 2024
2 parents e5b84aa + afb01ca commit 62fead2
Show file tree
Hide file tree
Showing 1,157 changed files with 54,834 additions and 41,630 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:

- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod

- name: Run lints
run: ./scripts/lint
Expand All @@ -36,6 +38,8 @@ jobs:

- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod

- name: Bootstrap
run: ./scripts/bootstrap
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/release-doctor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.4.0"
".": "3.0.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
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
286 changes: 286 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ Install go by following relevant directions [here](https://go.dev/doc/install).

## Modifying/Adding code

Most of the SDK is generated code, and any modified code will be overridden on the next generation. The
`examples/` directory is an exception and will never be overridden.
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may
result in merge conflicts between manual patches and changes from the generator. The generator will never
modify the contents of the `lib/` and `examples/` directories.

## Adding and running examples

All files in the `examples/` directory are not modified by the Stainless generator and can be freely edited or
added to.
All files in the `examples/` directory are not modified by the generator and can be freely edited or added to.

```bash
# add an example to examples/<your-example>/main.go
Expand Down
18 changes: 9 additions & 9 deletions README.md
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).
Expand All @@ -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
)
```

Expand All @@ -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 -->
Expand All @@ -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() {
Expand Down Expand Up @@ -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

Expand All @@ -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())
Expand Down
Loading

0 comments on commit 62fead2

Please sign in to comment.