Black Friday in 1 Tag: Können Ihre Kunden dann bezahlen? 25 % Rabatt im ersten Jahr und kostenlose Einrichtung, bis 30. NovemberZum Angebot →
Integration
Modul github.com/pathlyhq/pathly-sdk-go — Idempotenz und Retry-After.
Meinen API-Schlüssel holenOpenAPI-Vertrag
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/[email protected]
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)
}