Integration
Modul github.com/pathlyhq/pathly-sdk-go — Idempotenz und Retry-After.
OpenAPI-VertragAPI-Schlüssel ausstellenKostenloses Solo-Konto
API-Schlüssel holen (kostenlose Anmeldung)
Vollständiges Dokument, ohne Authentifizierung, bereit für Ihren Client-Generator.
Modul github.com/pathlyhq/pathly-sdk-go, Tag v0.1.0. Gleicher Ansatz wie der Terraform-Provider.
Nützlich in internen CLIs und Batch-Jobs. context.Context bei jedem Aufruf übergeben.
go get + create
go get github.com/pathlyhq/pathly-sdk-go@v0.1.0
export PATHLY_API_TOKEN=sp_…
package main
import (
"context"
"fmt"
"os"
pathly "github.com/pathlyhq/pathly-sdk-go"
)
func main() {
client := pathly.NewClient(os.Getenv("PATHLY_API_TOKEN"))
s, err := client.CreateScenario(context.Background(), pathly.ScenarioInput{
Name: "Checkout",
URL: "https://www.example.com/cart",
IntervalSec: 300,
ExpectText: "Your cart",
})
if err != nil { panic(err) }
fmt.Println(s.ID)
}