List webhooks
package main
import (
"context"
"fmt"
"github.com/micro-so/micro-sdk-go"
"github.com/micro-so/micro-sdk-go/option"
)
func main() {
client := micro.NewClient(
option.WithAPIKey("My API Key"),
option.WithTeamID("My Team ID"),
)
webhooks, err := client.Webhooks.List(context.TODO(), micro.WebhookListParams{
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", webhooks.Data)
}
{
"data": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"created_at": "2019-12-27T18:11:19.117Z",
"enabled": true,
"name": "name",
"team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"url": "https://example.com",
"verified": true,
"description": "description",
"updated_at": "2019-12-27T18:11:19.117Z",
"verification_token": "verification_token",
"verified_at": "2019-12-27T18:11:19.117Z"
}
]
}Returns Examples
{
"data": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"created_at": "2019-12-27T18:11:19.117Z",
"enabled": true,
"name": "name",
"team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"url": "https://example.com",
"verified": true,
"description": "description",
"updated_at": "2019-12-27T18:11:19.117Z",
"verification_token": "verification_token",
"verified_at": "2019-12-27T18:11:19.117Z"
}
]
}