Skip to content

Commit

Permalink
feat: OpenAPI spec update
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Feb 6, 2024
1 parent b161abb commit 6a43f1e
Show file tree
Hide file tree
Showing 214 changed files with 78,590 additions and 30,927 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 122
configured_endpoints: 129
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ import (
func main() {
client := cloudflare.NewClient(
option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), // defaults to os.LookupEnv("CLOUDFLARE_API_KEY")
option.WithEmail("dev@cloudflare.com"), // defaults to os.LookupEnv("CLOUDFLARE_EMAIL")
option.WithAPIEmail("dev@cloudflare.com"), // defaults to os.LookupEnv("CLOUDFLARE_EMAIL")
option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), // defaults to os.LookupEnv("CLOUDFLARE_API_TOKEN")
option.WithUserServiceKey("My User Service Key"),
)
zoneNewResponse, err := client.Zones.New(context.TODO(), cloudflare.ZoneNewParams{
Account: cloudflare.F(cloudflare.ZoneNewParamsAccount{
Expand Down
46 changes: 46 additions & 0 deletions access.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// File generated from our OpenAPI spec by Stainless.

package cloudflare

import (
"github.com/cloudflare/cloudflare-sdk-go/option"
)

// AccessService contains methods and other services that help with interacting
// with the cloudflare API. Note, unlike clients, this service does not read
// variables from the environment automatically. You should not instantiate this
// service directly, and instead use the [NewAccessService] method instead.
type AccessService struct {
Options []option.RequestOption
Apps *AccessAppService
Certificates *AccessCertificateService
Groups *AccessGroupService
IdentityProviders *AccessIdentityProviderService
Organizations *AccessOrganizationService
ServiceTokens *AccessServiceTokenService
Bookmarks *AccessBookmarkService
Keys *AccessKeyService
Logs *AccessLogService
Seats *AccessSeatService
Users *AccessUserService
}

// NewAccessService generates a new service that applies the given options to each
// request. These options are applied after the parent client's options (if there
// is one), and before any request-specific options.
func NewAccessService(opts ...option.RequestOption) (r *AccessService) {
r = &AccessService{}
r.Options = opts
r.Apps = NewAccessAppService(opts...)
r.Certificates = NewAccessCertificateService(opts...)
r.Groups = NewAccessGroupService(opts...)
r.IdentityProviders = NewAccessIdentityProviderService(opts...)
r.Organizations = NewAccessOrganizationService(opts...)
r.ServiceTokens = NewAccessServiceTokenService(opts...)
r.Bookmarks = NewAccessBookmarkService(opts...)
r.Keys = NewAccessKeyService(opts...)
r.Logs = NewAccessLogService(opts...)
r.Seats = NewAccessSeatService(opts...)
r.Users = NewAccessUserService(opts...)
return
}
Loading

0 comments on commit 6a43f1e

Please sign in to comment.