Skip to content

Commit

Permalink
Merge pull request #1 from speakeasy-sdks/speakeasy-sdk-regen-1720802802
Browse files Browse the repository at this point in the history
chore: 🐝 Update SDK - Generate
  • Loading branch information
chase-crumbaugh authored Jul 12, 2024
2 parents e558a47 + f8c814e commit 0cc9b04
Show file tree
Hide file tree
Showing 21 changed files with 1,141 additions and 206 deletions.
5 changes: 5 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

<div align="center">
<a href="https://codespaces.new/speakeasy-sdks/loops-go.git/tree/main"><img src="https://github.com/codespaces/badge.svg" /></a>
</div>
<br>

> **Remember to shutdown a GitHub Codespace when it is not in use!**
# Dev Containers Quick Start
Expand Down
16 changes: 11 additions & 5 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ id: d1780f98-50f7-4933-a201-d999ab031ea9
management:
docChecksum: 620ba0a28705b9e7ccae57fed6545728
docVersion: 1.3.0
speakeasyVersion: 1.330.2
generationVersion: 2.361.10
releaseVersion: 0.0.1
configChecksum: 8a55154bfbe7ae9742c1b8eaa4a1631f
speakeasyVersion: 1.334.1
generationVersion: 2.370.1
releaseVersion: 0.1.0
configChecksum: f0d4ac33307371024185816cfe5d1690
repoURL: https://github.com/speakeasy-sdks/loops-go.git
installationURL: https://github.com/speakeasy-sdks/loops-go
features:
go:
additionalDependencies: 0.1.0
core: 3.4.14
core: 3.4.15
defaultEnabledRetries: 0.2.0
devContainers: 2.90.0
errorUnions: 0.1.0
flattening: 2.81.1
Expand All @@ -20,6 +23,7 @@ features:
globalServerURLs: 2.82.2
intellisenseMarkdownSupport: 0.1.0
responseFormat: 0.1.2
retries: 2.83.0
sdkHooks: 0.1.0
unions: 2.85.8
generatedFiles:
Expand Down Expand Up @@ -110,12 +114,14 @@ generatedFiles:
- docs/models/sdkerrors/error.md
- docs/models/sdkerrors/transactionalfailure2response.md
- docs/sdks/loops/README.md
- docs/models/operations/option.md
- docs/sdks/contacts/README.md
- docs/sdks/mailinglists/README.md
- docs/sdks/events/README.md
- docs/sdks/transactionalemails/README.md
- docs/sdks/customfields/README.md
- USAGE.md
- models/operations/options.go
- .gitattributes
- .devcontainer/README.md
- .devcontainer/devcontainer.json
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
go:
version: 0.0.1
version: 0.1.0
additionalDependencies: {}
allowUnknownFieldsInWeakUnions: false
clientServerStatusCodesAsErrors: true
Expand Down
14 changes: 8 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
speakeasyVersion: 1.330.2
speakeasyVersion: 1.334.1
sources:
loops-oas:
sourceNamespace: loops-oas
sourceRevisionDigest: sha256:e6d730e0e787dec691853a0c6affac22f7a22c5b27edd3c1f25567fbcc979dbb
sourceBlobDigest: sha256:662c87694a3e867d81369ac184ce87ca83a8e7cbb6b492a7287fa7552b614286
sourceRevisionDigest: sha256:c088663ae984ed7c9204d6aaa47b3662cda730bc2eb5b9e72bccaa27e9a0b9da
sourceBlobDigest: sha256:170ba04377dd77115725dd43e5b4350a16a3a69e12499e923e3afafbccc1e4ff
tags:
- latest
- main
targets:
loops:
source: loops-oas
sourceNamespace: loops-oas
sourceRevisionDigest: sha256:e6d730e0e787dec691853a0c6affac22f7a22c5b27edd3c1f25567fbcc979dbb
sourceBlobDigest: sha256:662c87694a3e867d81369ac184ce87ca83a8e7cbb6b492a7287fa7552b614286
outLocation: /Users/robertcrumbaugh/code/customers/loops-go
sourceRevisionDigest: sha256:c088663ae984ed7c9204d6aaa47b3662cda730bc2eb5b9e72bccaa27e9a0b9da
sourceBlobDigest: sha256:170ba04377dd77115725dd43e5b4350a16a3a69e12499e923e3afafbccc1e4ff
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
sources:
loops-oas:
inputs:
Expand Down
1 change: 1 addition & 0 deletions .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
workflowVersion: 1.0.0
speakeasyVersion: latest
sources:
loops-oas:
inputs:
Expand Down
92 changes: 92 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,98 @@ func main() {

<!-- End Special Types [types] -->

<!-- Start Retries [retries] -->
## Retries

Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.

To change the default retry strategy for a single API call, simply provide a `retry.Config` object to the call by using the `WithRetries` option:
```go
package main

import (
"context"
loopsgo "github.com/speakeasy-sdks/loops-go"
"github.com/speakeasy-sdks/loops-go/models/components"
"github.com/speakeasy-sdks/loops-go/retry"
"log"
"models/operations"
)

func main() {
s := loopsgo.New(
loopsgo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
request := components.ContactRequest{
Email: "[email protected]",
MailingLists: &components.MailingLists{},
}
ctx := context.Background()
res, err := s.Contacts.PostContactsCreate(ctx, request, operations.WithRetries(
retry.Config{
Strategy: "backoff",
Backoff: &retry.BackoffStrategy{
InitialInterval: 1,
MaxInterval: 50,
Exponent: 1.1,
MaxElapsedTime: 100,
},
RetryConnectionErrors: false,
}))
if err != nil {
log.Fatal(err)
}
if res.ContactSuccessResponse != nil {
// handle response
}
}

```

If you'd like to override the default retry strategy for all operations that support retries, you can use the `WithRetryConfig` option at SDK initialization:
```go
package main

import (
"context"
loopsgo "github.com/speakeasy-sdks/loops-go"
"github.com/speakeasy-sdks/loops-go/models/components"
"github.com/speakeasy-sdks/loops-go/retry"
"log"
)

func main() {
s := loopsgo.New(
loopsgo.WithRetryConfig(
retry.Config{
Strategy: "backoff",
Backoff: &retry.BackoffStrategy{
InitialInterval: 1,
MaxInterval: 50,
Exponent: 1.1,
MaxElapsedTime: 100,
},
RetryConnectionErrors: false,
}),
loopsgo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
request := components.ContactRequest{
Email: "[email protected]",
MailingLists: &components.MailingLists{},
}
ctx := context.Background()
res, err := s.Contacts.PostContactsCreate(ctx, request)
if err != nil {
log.Fatal(err)
}
if res.ContactSuccessResponse != nil {
// handle response
}
}

```
<!-- End Retries [retries] -->

<!-- Placeholder for Future Speakeasy SDK Sections -->

# Development
Expand Down
11 changes: 11 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@


## 2024-07-12 16:46:40
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.334.1 (2.370.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.1.0] .
### Releases
- [Go v0.1.0] https://github.com/speakeasy-sdks/loops-go/releases/tag/v0.1.0 - .
Loading

0 comments on commit 0cc9b04

Please sign in to comment.