Skip to content

Latest commit

 

History

History
executable file
·
58 lines (42 loc) · 1.78 KB

README.md

File metadata and controls

executable file
·
58 lines (42 loc) · 1.78 KB

Attempt

Available Operations

  • Get - Get a Single Attempt

Get

Retrive a single attempt details.

Example Usage

package main

import(
	"context"
	"log"
	"github.com/speakeasy-sdks/hookdeck-go"
	"github.com/speakeasy-sdks/hookdeck-go/pkg/models/shared"
	"github.com/speakeasy-sdks/hookdeck-go/pkg/models/operations"
)

func main() {
    s := hookdeck.New(
        hookdeck.WithSecurity(shared.Security{
            BasicAuth: &shared.SchemeBasicAuth{
                Password: "",
                Username: "",
            },
        }),
    )
    id := "provident"

    ctx := context.Background()
    res, err := s.Attempt.Get(ctx, id)
    if err != nil {
        log.Fatal(err)
    }

    if res.EventAttempt != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
id string ✔️ N/A

Response

*operations.GetAttemptResponse, error