webhooks

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2026 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is the webhooks API client

func New

func New(webexClient *webexsdk.Client, config *Config) *Client

New creates a new Webhooks plugin

func (*Client) Create

func (c *Client) Create(webhook *Webhook) (*Webhook, error)

Create creates a new webhook

func (*Client) Delete

func (c *Client) Delete(webhookID string) error

Delete deletes a webhook

func (*Client) Get

func (c *Client) Get(webhookID string) (*Webhook, error)

Get returns details for a webhook

func (*Client) List

func (c *Client) List(options *ListOptions) (*WebhooksPage, error)

List returns a list of webhooks

func (*Client) Update

func (c *Client) Update(webhookID string, webhook *Webhook) (*Webhook, error)

Update updates an existing webhook

type Config

type Config struct {
}

Config holds the configuration for the Webhooks plugin

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns the default configuration for the Webhooks plugin

type ListOptions

type ListOptions struct {
	Max int `url:"max,omitempty"`
}

ListOptions contains the options for listing webhooks

type Webhook

type Webhook struct {
	ID        string     `json:"id,omitempty"`
	Name      string     `json:"name,omitempty"`
	TargetURL string     `json:"targetUrl,omitempty"`
	Resource  string     `json:"resource,omitempty"`
	Event     string     `json:"event,omitempty"`
	Filter    string     `json:"filter,omitempty"`
	Secret    string     `json:"secret,omitempty"`
	Status    string     `json:"status,omitempty"`
	Created   *time.Time `json:"created,omitempty"`
}

Webhook represents a Webex webhook

func NewUpdateWebhook

func NewUpdateWebhook(name, targetURL, secret string, status string) *Webhook

NewUpdateWebhook creates a webhook struct with only the fields that can be updated

type WebhooksPage

type WebhooksPage struct {
	Items []Webhook `json:"items"`
	*webexsdk.Page
}

WebhooksPage represents a paginated list of webhooks

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL