Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.376.0
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Aug 20, 2024
1 parent 10ebbde commit 1b7130e
Show file tree
Hide file tree
Showing 22 changed files with 482 additions and 87 deletions.
27 changes: 17 additions & 10 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
lockVersion: 2.0.0
id: d1780f98-50f7-4933-a201-d999ab031ea9
management:
docChecksum: b9d1bc42be42f277618d09d9a732fd47
docVersion: 1.3.1
speakeasyVersion: 1.358.0
generationVersion: 2.390.6
releaseVersion: 0.3.0
configChecksum: f9082f7fbcc29075d2ad0ec8ad3d86fa
docChecksum: c35bcf300f97562722c2b0f49bbd90e6
docVersion: 1.3.2
speakeasyVersion: 1.376.0
generationVersion: 2.402.5
releaseVersion: 0.3.1
configChecksum: 3b88b1f6ca2b3287bf377812a3a592ec
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.5.3
core: 3.5.5
defaultEnabledRetries: 0.2.0
devContainers: 2.90.0
envVarSecurityUsage: 0.3.0
Expand All @@ -26,8 +26,9 @@ features:
responseFormat: 0.1.2
retries: 2.83.0
sdkHooks: 0.1.0
unions: 2.85.8
unions: 2.85.9
generatedFiles:
- apikey.go
- contacts.go
- mailinglists.go
- events.go
Expand All @@ -52,6 +53,7 @@ generatedFiles:
- internal/utils/retries.go
- internal/utils/security.go
- internal/utils/utils.go
- /models/operations/getapikey.go
- /models/operations/postcontactscreate.go
- /models/operations/putcontactsupdate.go
- /models/operations/getcontactsfind.go
Expand All @@ -60,8 +62,8 @@ generatedFiles:
- /models/operations/posteventssend.go
- /models/operations/posttransactional.go
- /models/operations/getcontactscustomfields.go
- /models/components/contactsuccessresponse.go
- /models/components/httpmetadata.go
- /models/components/contactsuccessresponse.go
- /models/components/contactrequest.go
- /models/components/contact.go
- /models/components/contactdeleteresponse.go
Expand All @@ -75,10 +77,13 @@ generatedFiles:
- /models/components/transactionalrequest.go
- /models/components/customfield.go
- /models/components/security.go
- /models/sdkerrors/getapikey.go
- /models/sdkerrors/contactfailureresponse.go
- /models/sdkerrors/eventfailureresponse.go
- /models/sdkerrors/posttransactional.go
- /models/sdkerrors/transactionalfailure2response.go
- docs/models/operations/getapikeyresponsebody.md
- docs/models/operations/getapikeyresponse.md
- docs/models/operations/postcontactscreateresponse.md
- docs/models/operations/putcontactsupdateresponse.md
- docs/models/operations/getcontactsfindrequest.md
Expand All @@ -88,8 +93,8 @@ generatedFiles:
- docs/models/operations/posteventssendresponse.md
- docs/models/operations/posttransactionalresponse.md
- docs/models/operations/getcontactscustomfieldsresponse.md
- docs/models/components/contactsuccessresponse.md
- docs/models/components/httpmetadata.md
- docs/models/components/contactsuccessresponse.md
- docs/models/components/mailinglists.md
- docs/models/components/contactrequest.md
- docs/models/components/contact.md
Expand All @@ -106,13 +111,15 @@ generatedFiles:
- docs/models/components/transactionalrequest.md
- docs/models/components/customfield.md
- docs/models/components/security.md
- docs/models/sdkerrors/getapikeyresponsebody.md
- docs/models/sdkerrors/contactfailureresponse.md
- docs/models/sdkerrors/eventfailureresponse.md
- docs/models/sdkerrors/posttransactionalresponsebody.md
- docs/models/sdkerrors/error.md
- docs/models/sdkerrors/transactionalfailure2response.md
- docs/sdks/loops/README.md
- docs/models/operations/option.md
- docs/sdks/apikey/README.md
- docs/sdks/contacts/README.md
- docs/sdks/mailinglists/README.md
- docs/sdks/events/README.md
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.3.0
version: 0.3.1
additionalDependencies: {}
allowUnknownFieldsInWeakUnions: false
clientServerStatusCodesAsErrors: true
Expand Down
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
speakeasyVersion: 1.358.0
speakeasyVersion: 1.376.0
sources:
loops-oas:
sourceNamespace: loops-oas
sourceRevisionDigest: sha256:3e3a0b4a60a67d1ada2aa2bcc43e7412b2e02ec4042fea95798478dab055cb73
sourceBlobDigest: sha256:476977346936cc88e0f4e9177b7531d84318c42c94f5abac23d8f86af9197aee
sourceRevisionDigest: sha256:b732cf711575d2d06c3c5add7ce07802b808794040bc838998f5592ee86eebf1
sourceBlobDigest: sha256:9dfa9e6feb6f9f2f75842a75e2551555a8053ea9afcf6393f8359bfbe1f365f1
tags:
- latest
- main
targets:
loops:
source: loops-oas
sourceNamespace: loops-oas
sourceRevisionDigest: sha256:3e3a0b4a60a67d1ada2aa2bcc43e7412b2e02ec4042fea95798478dab055cb73
sourceBlobDigest: sha256:476977346936cc88e0f4e9177b7531d84318c42c94f5abac23d8f86af9197aee
sourceRevisionDigest: sha256:b732cf711575d2d06c3c5add7ce07802b808794040bc838998f5592ee86eebf1
sourceBlobDigest: sha256:9dfa9e6feb6f9f2f75842a75e2551555a8053ea9afcf6393f8359bfbe1f365f1
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0
Expand Down
82 changes: 29 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,20 @@ package main
import (
"context"
loopsgo "github.com/speakeasy-sdks/loops-go"
"github.com/speakeasy-sdks/loops-go/models/components"
"log"
)

func main() {
s := loopsgo.New(
loopsgo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
request := components.ContactRequest{
Email: "Ashtyn_Beer@gmail.com",
MailingLists: &components.MailingLists{},
}

ctx := context.Background()
res, err := s.Contacts.PostContactsCreate(ctx, request)
res, err := s.APIKey.GetAPIKey(ctx)
if err != nil {
log.Fatal(err)
}
if res.ContactSuccessResponse != nil {
if res.Object != nil {
// handle response
}
}
Expand All @@ -63,6 +59,10 @@ func main() {
<!-- Start Available Resources and Operations [operations] -->
## Available Resources and Operations

### [APIKey](docs/sdks/apikey/README.md)

* [GetAPIKey](docs/sdks/apikey/README.md#getapikey) - Test your API key

### [Contacts](docs/sdks/contacts/README.md)

* [PostContactsCreate](docs/sdks/contacts/README.md#postcontactscreate) - Create a contact
Expand Down Expand Up @@ -92,10 +92,10 @@ func main() {

Handling errors in this SDK should largely match your expectations. All operations return a response object or an error, they will never return both. When specified by the OpenAPI spec document, the SDK will return the appropriate subclass.

| Error Object | Status Code | Content Type |
| -------------------------------- | -------------------------------- | -------------------------------- |
| sdkerrors.ContactFailureResponse | 400,405,409 | application/json |
| sdkerrors.SDKError | 4xx-5xx | */* |
| Error Object | Status Code | Content Type |
| ------------------------------- | ------------------------------- | ------------------------------- |
| sdkerrors.GetAPIKeyResponseBody | 401 | application/json |
| sdkerrors.SDKError | 4xx-5xx | */* |

### Example

Expand All @@ -106,7 +106,6 @@ import (
"context"
"errors"
loopsgo "github.com/speakeasy-sdks/loops-go"
"github.com/speakeasy-sdks/loops-go/models/components"
"github.com/speakeasy-sdks/loops-go/models/sdkerrors"
"log"
)
Expand All @@ -115,15 +114,12 @@ func main() {
s := loopsgo.New(
loopsgo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
request := components.ContactRequest{
Email: "Ashtyn_Beer@gmail.com",
MailingLists: &components.MailingLists{},
}

ctx := context.Background()
res, err := s.Contacts.PostContactsCreate(ctx, request)
res, err := s.APIKey.GetAPIKey(ctx)
if err != nil {

var e *sdkerrors.ContactFailureResponse
var e *sdkerrors.GetAPIKeyResponseBody
if errors.As(err, &e) {
// handle error
log.Fatal(e.Error())
Expand Down Expand Up @@ -159,7 +155,6 @@ package main
import (
"context"
loopsgo "github.com/speakeasy-sdks/loops-go"
"github.com/speakeasy-sdks/loops-go/models/components"
"log"
)

Expand All @@ -168,16 +163,13 @@ func main() {
loopsgo.WithServerIndex(0),
loopsgo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
request := components.ContactRequest{
Email: "Ashtyn_Beer@gmail.com",
MailingLists: &components.MailingLists{},
}

ctx := context.Background()
res, err := s.Contacts.PostContactsCreate(ctx, request)
res, err := s.APIKey.GetAPIKey(ctx)
if err != nil {
log.Fatal(err)
}
if res.ContactSuccessResponse != nil {
if res.Object != nil {
// handle response
}
}
Expand All @@ -194,7 +186,6 @@ package main
import (
"context"
loopsgo "github.com/speakeasy-sdks/loops-go"
"github.com/speakeasy-sdks/loops-go/models/components"
"log"
)

Expand All @@ -203,16 +194,13 @@ func main() {
loopsgo.WithServerURL("https://app.loops.so/api/v1"),
loopsgo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
request := components.ContactRequest{
Email: "Ashtyn_Beer@gmail.com",
MailingLists: &components.MailingLists{},
}

ctx := context.Background()
res, err := s.Contacts.PostContactsCreate(ctx, request)
res, err := s.APIKey.GetAPIKey(ctx)
if err != nil {
log.Fatal(err)
}
if res.ContactSuccessResponse != nil {
if res.Object != nil {
// handle response
}
}
Expand Down Expand Up @@ -267,24 +255,20 @@ package main
import (
"context"
loopsgo "github.com/speakeasy-sdks/loops-go"
"github.com/speakeasy-sdks/loops-go/models/components"
"log"
)

func main() {
s := loopsgo.New(
loopsgo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
request := components.ContactRequest{
Email: "Ashtyn_Beer@gmail.com",
MailingLists: &components.MailingLists{},
}

ctx := context.Background()
res, err := s.Contacts.PostContactsCreate(ctx, request)
res, err := s.APIKey.GetAPIKey(ctx)
if err != nil {
log.Fatal(err)
}
if res.ContactSuccessResponse != nil {
if res.Object != nil {
// handle response
}
}
Expand All @@ -310,7 +294,6 @@ 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"
Expand All @@ -320,12 +303,9 @@ func main() {
s := loopsgo.New(
loopsgo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
request := components.ContactRequest{
Email: "Ashtyn_Beer@gmail.com",
MailingLists: &components.MailingLists{},
}

ctx := context.Background()
res, err := s.Contacts.PostContactsCreate(ctx, request, operations.WithRetries(
res, err := s.APIKey.GetAPIKey(ctx, operations.WithRetries(
retry.Config{
Strategy: "backoff",
Backoff: &retry.BackoffStrategy{
Expand All @@ -339,7 +319,7 @@ func main() {
if err != nil {
log.Fatal(err)
}
if res.ContactSuccessResponse != nil {
if res.Object != nil {
// handle response
}
}
Expand All @@ -353,7 +333,6 @@ 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"
)
Expand All @@ -373,16 +352,13 @@ func main() {
}),
loopsgo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
request := components.ContactRequest{
Email: "Ashtyn_Beer@gmail.com",
MailingLists: &components.MailingLists{},
}

ctx := context.Background()
res, err := s.Contacts.PostContactsCreate(ctx, request)
res, err := s.APIKey.GetAPIKey(ctx)
if err != nil {
log.Fatal(err)
}
if res.ContactSuccessResponse != nil {
if res.Object != nil {
// handle response
}
}
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,14 @@ Based on:
### Generated
- [go v0.3.0] .
### Releases
- [Go v0.3.0] https://github.com/speakeasy-sdks/loops-go/releases/tag/v0.3.0 - .
- [Go v0.3.0] https://github.com/speakeasy-sdks/loops-go/releases/tag/v0.3.0 - .

## 2024-08-20 00:13:56
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.376.0 (2.402.5) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.3.1] .
### Releases
- [Go v0.3.1] https://github.com/speakeasy-sdks/loops-go/releases/tag/v0.3.1 - .
10 changes: 3 additions & 7 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,20 @@ package main
import (
"context"
loopsgo "github.com/speakeasy-sdks/loops-go"
"github.com/speakeasy-sdks/loops-go/models/components"
"log"
)

func main() {
s := loopsgo.New(
loopsgo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
request := components.ContactRequest{
Email: "Ashtyn_Beer@gmail.com",
MailingLists: &components.MailingLists{},
}

ctx := context.Background()
res, err := s.Contacts.PostContactsCreate(ctx, request)
res, err := s.APIKey.GetAPIKey(ctx)
if err != nil {
log.Fatal(err)
}
if res.ContactSuccessResponse != nil {
if res.Object != nil {
// handle response
}
}
Expand Down
Loading

0 comments on commit 1b7130e

Please sign in to comment.