Skip to content

Commit

Permalink
feat(api): update via SDK Studio
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed May 14, 2024
1 parent 7b5fdbd commit f452dbd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 2
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/terminal%2Fterminal-a31fc06da5df2a05395e63df9d4fcf6e92094d039d44f2b9cbb606be98b0ebca.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/terminal%2Fterminal-f4a3aca8ff2474533240c82b76ea4f1f7870485abbbf7d8d4caccc707f1a506d.yml
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import (
func main() {
client := terminal.NewClient(
option.WithBearerToken("My Bearer Token"), // defaults to os.LookupEnv("TERMINAL_BEARER_TOKEN")
option.WithEnvironmentDev(), // defaults to option.WithEnvironmentProduction()
)
productGetResponse, err := client.Product.Get(context.TODO())
if err != nil {
Expand Down
7 changes: 7 additions & 0 deletions option/requestoption.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,13 @@ func WithEnvironmentProduction() RequestOption {
return WithBaseURL("https://openapi.terminal.shop//")
}

// WithEnvironmentDev returns a RequestOption that sets the current
// environment to be the "dev" environment. An environment specifies which base URL
// to use by default.
func WithEnvironmentDev() RequestOption {
return WithBaseURL("https://openapi.dev.terminal.shop//")
}

// WithBearerToken returns a RequestOption that sets the client setting "bearer_token".
func WithBearerToken(value string) RequestOption {
return func(r *requestconfig.RequestConfig) error {
Expand Down

0 comments on commit f452dbd

Please sign in to comment.