webex

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	ContentType string      `json:"contentType"`
	Content     interface{} `json:"content"`
}

Attachment represents a Webex message attachment (e.g., Adaptive Card).

type Client

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

Client is a lightweight Webex REST API client.

func NewClient

func NewClient(provider TokenProvider) *Client

NewClient creates a new Webex API client with security-hardened defaults.

func (*Client) DownloadTranscript

func (c *Client) DownloadTranscript(transcriptID, format string) (string, error)

DownloadTranscript downloads the content of a transcript as text. Format should be "txt" or "vtt".

func (*Client) GetMe

func (c *Client) GetMe() (*Person, error)

GetMe returns the authenticated user's profile.

func (*Client) GetMessages

func (c *Client) GetMessages(roomID string, max int) ([]Message, error)

GetMessages returns messages from a space.

func (*Client) GetPerson

func (c *Client) GetPerson(personID string) (*Person, error)

GetPerson returns a person's profile by ID.

func (*Client) GetSpaceAnalytics

func (c *Client) GetSpaceAnalytics(roomID string, daysBack int) (*SpaceAnalytics, error)

GetSpaceAnalytics computes client-side analytics for a space over a time window.

func (*Client) ListMeetings

func (c *Client) ListMeetings(from, to string, max int) ([]Meeting, error)

ListMeetings returns meetings in a time range.

func (*Client) ListMembers

func (c *Client) ListMembers(roomID string, max int) ([]Person, error)

ListMembers returns members of a space.

func (*Client) ListSpaces

func (c *Client) ListSpaces(max int) ([]Space, error)

ListSpaces returns the user's Webex spaces.

func (*Client) ListTranscripts

func (c *Client) ListTranscripts(meetingID string, max int) ([]Transcript, error)

ListTranscripts returns transcripts for a meeting.

func (*Client) SendAdaptiveCard

func (c *Client) SendAdaptiveCard(roomID, toPersonEmail string, card interface{}) (*Message, error)

SendAdaptiveCard sends an Adaptive Card to a space or person. The card parameter should be the Adaptive Card JSON body (map or struct).

func (*Client) SendMessage

func (c *Client) SendMessage(roomID, toPersonID, toPersonEmail, parentID, text string) (*Message, error)

SendMessage sends a message to a space, person, or thread.

func (*Client) ShareFile

func (c *Client) ShareFile(roomID, filePath string) error

ShareFile is a placeholder for file upload/share (multipart upload deferred).

type Meeting

type Meeting struct {
	ID              string `json:"id"`
	Title           string `json:"title"`
	MeetingNumber   string `json:"meetingNumber"`
	MeetingType     string `json:"meetingType"`
	State           string `json:"state"`
	Start           string `json:"start"`
	End             string `json:"end"`
	Timezone        string `json:"timezone"`
	Agenda          string `json:"agenda"`
	HostEmail       string `json:"hostEmail"`
	HostDisplayName string `json:"hostDisplayName"`
	WebLink         string `json:"webLink"`
}

Meeting represents a Webex meeting.

type Message

type Message struct {
	ID          string   `json:"id"`
	RoomID      string   `json:"roomId"`
	RoomType    string   `json:"roomType"`
	Text        string   `json:"text"`
	PersonID    string   `json:"personId"`
	PersonEmail string   `json:"personEmail"`
	Created     string   `json:"created"`
	ParentID    string   `json:"parentId,omitempty"`
	Files       []string `json:"files,omitempty"`
}

Message represents a Webex message.

type Person

type Person struct {
	ID          string   `json:"id"`
	Emails      []string `json:"emails"`
	DisplayName string   `json:"displayName"`
	NickName    string   `json:"nickName"`
	OrgID       string   `json:"orgId"`
	Created     string   `json:"created"`
	Status      string   `json:"status"`
	Type        string   `json:"type"`
}

Person represents a Webex user.

type Space

type Space struct {
	ID           string `json:"id"`
	Title        string `json:"title"`
	Type         string `json:"type"`
	IsLocked     bool   `json:"isLocked"`
	LastActivity string `json:"lastActivity"`
	Created      string `json:"created"`
}

Space represents a Webex space (room).

type SpaceAnalytics

type SpaceAnalytics struct {
	RoomID           string `json:"roomId"`
	RoomTitle        string `json:"roomTitle"`
	DaysBack         int    `json:"daysBack"`
	MessageCount     int    `json:"messageCount"`
	ActiveMembers    int    `json:"activeMembers"`
	TotalMembers     int    `json:"totalMembers"`
	PeakHour         int    `json:"peakHour"`
	MostActivePerson string `json:"mostActivePerson"`
}

SpaceAnalytics holds aggregated stats for a space.

type TokenProvider added in v0.6.0

type TokenProvider interface {
	Token() (string, error)
}

TokenProvider returns a valid Webex access token. Implementations handle static PATs, OAuth with auto-refresh, etc.

type Transcript

type Transcript struct {
	ID              string `json:"id"`
	MeetingID       string `json:"meetingId"`
	MeetingTopic    string `json:"meetingTopic"`
	StartTime       string `json:"startTime"`
	VttDownloadLink string `json:"vttDownloadLink"`
	TxtDownloadLink string `json:"txtDownloadLink"`
	Status          string `json:"status"`
}

Transcript represents a Webex meeting transcript.

Jump to

Keyboard shortcuts

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