package main
import (
"context"
"fmt"
"os"
contextdev "github.com/context-dot-dev/context-go-sdk/v2"
"github.com/context-dot-dev/context-go-sdk/v2/option"
)
func main() {
client := contextdev.NewClient(
option.WithAPIKey(os.Getenv("CONTEXT_DEV_API_KEY")),
)
site, err := client.Web.MapURLs(context.Background(), contextdev.WebMapURLsParams{
Domain: "stripe.com",
MaxLinks: contextdev.Int(50),
URLRegex: contextdev.String("/customers/"),
})
if err != nil {
panic(err)
}
for _, entry := range site.URLs {
fmt.Println(entry.URL, entry.Title)
}
}