zoom

package module
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 15 Imported by: 1

README

Zoom.us Golang Client Library

Godoc Build Status Go Report Card CodeClimate Maintainability

Go (Golang) client library for the Zoom.us REST API Version 2. See here for Version 1 support.

About

Built out of necessity, this repo will only support select endpoints at first. Hopefully, it will eventually support all Zoom API endpoints.

Examples

For example use, see the Godoc documentation or the examples directory

Tests

To run unit tests and the linter:

./fmtpolice
go test -v ./...

To run the integration tests:

# first, define the required environment variables
export ZOOM_API_KEY="<key>"
export ZOOM_API_SECRET="<secret>"
export ZOOM_EXAMPLE_EMAIL="<account email>"

# then run the tests with the integration build tag
go test -tags integration -v ./...

Contributing

Contributions welcome! Please see the contributing guidelines for more details.

Contact

For any questions regarding this library, please contact @rafecolton or the Himalayan Institute webteam at webteam@himalayaninstitute.org

Code inspired by mattbaird/gochimp

Documentation

Index

Constants

View Source
const (
	// MeetingTypeInstant is an instant meeting
	MeetingTypeInstant MeetingType = 1
	// MeetingTypeScheduled is a scheduled meeting
	MeetingTypeScheduled MeetingType = 2 // Default
	// MeetingTypeRecurringNoFixedTime is a recurring meeting with no fixed time
	MeetingTypeRecurringNoFixedTime MeetingType = 3
	// MeetingTypeRecurring is a recurring meeting with fixed time
	MeetingTypeRecurring MeetingType = 8

	// MeetingStatusWaiting is a meeting that is waiting
	MeetingStatusWaiting MeetingStatus = "waiting"
	// MeetingStatusStarted is a meeting that is started
	MeetingStatusStarted MeetingStatus = "started"
	// MeetingStatusFinished is a meeting that is finished
	MeetingStatusFinished MeetingStatus = "finished"

	// ApprovalTypeAutomaticallyApprove is an automatically approved meeting
	ApprovalTypeAutomaticallyApprove ApprovalType = 0
	// ApprovalTypeManuallyApprove is a meeting that requires manual approval
	ApprovalTypeManuallyApprove ApprovalType = 1
	// ApprovalTypeNoRegistrationRequired is a meeting that requires no registration
	ApprovalTypeNoRegistrationRequired ApprovalType = 2 // DEFAULT

	// RegistrationTypeRegisterOnce Attendees register once and can attend any of the occurrences
	RegistrationTypeRegisterOnce RegistrationType = 1
	//RegistrationTypeRegisterEachTime  Attendeed need to register for each occurrence to attend
	RegistrationTypeRegisterEachTime RegistrationType = 2
	//RegistrationTypeRegisterOnceAndChooseOccurrences Attendees register once and can choose one or more occurrences to attend
	RegistrationTypeRegisterOnceAndChooseOccurrences RegistrationType = 3

	// AudioBoth is a meeting that allows telephony and VoIP
	AudioBoth Audio = "both"
	// AudioTelephony is a meeting that is telephony only
	AudioTelephony Audio = "telephony"
	// AudioVoIP is a meeting that is VoIP only
	AudioVoIP Audio = "voip"

	// AutoRecordingLocal record on local
	AutoRecordingLocal AutoRecording = "local"
	// AutoRecordingCloud record on cloud
	AutoRecordingCloud AutoRecording = "cloud"
	// AutoRecordingNone disabled
	AutoRecordingNone AutoRecording = "none"

	// GlobalDialInNumberTypeToll toll type of number
	GlobalDialInNumberTypeToll GlobalDialInNumberType = "toll"
	// GlobalDialInNumberTypeTollFree toll free type of number
	GlobalDialInNumberTypeTollFree GlobalDialInNumberType = "tollfree"

	// RecurrenceTypeDaily daily recurrence
	RecurrenceTypeDaily RecurrenceType = 1
	// RecurrenceTypeWeekly weekly recurrence
	RecurrenceTypeWeekly RecurrenceType = 2
	// RecurrenceTypeMonthly monthly recurrence
	RecurrenceTypeMonthly RecurrenceType = 3

	// MonthlyWeekLast last week of the month
	MonthlyWeekLast MonthlyWeek = -1
	// MonthlyWeekFirst first week of the month
	MonthlyWeekFirst MonthlyWeek = 1
	// MonthlyWeekSecond second week of the month
	MonthlyWeekSecond MonthlyWeek = 2
	// MonthlyWeekThird third week of the month
	MonthlyWeekThird MonthlyWeek = 3
	// MonthlyWeekFourth fourth week of the month
	MonthlyWeekFourth MonthlyWeek = 4

	// WeekDaySunday Sunday
	WeekDaySunday WeekDay = 1
	// WeekDayMonday Monday
	WeekDayMonday WeekDay = 2
	// WeekDayTuesday Tuesday
	WeekDayTuesday WeekDay = 3
	// WeekDayWednesday Wednesday
	WeekDayWednesday WeekDay = 4
	// WeekDayThursday Thursday
	WeekDayThursday WeekDay = 5
	// WeekDayFriday Friday
	WeekDayFriday WeekDay = 6
	// WeekDaySaturday Saturday
	WeekDaySaturday WeekDay = 7
)
View Source
const (
	// Create action will be send new user a confirmation email required to activate
	Create CreateUserAction = "create"

	// AutoCreate action does not send the user a confirmation email
	AutoCreate CreateUserAction = "autoCreate"

	// CustCreate action creates a user without a password that cannot log into Zoom web portal or Zoom client
	CustCreate CreateUserAction = "custCreate"

	// SSOCreate action is provided for when the "Pre-Provisioning SSO User" option is enabled
	SSOCreate CreateUserAction = "ssoCreate"

	// DisassociateAction action disassociates a user
	DisassociateAction DeleteUserAction = "disassociate"

	// DeleteAction action deletes a user
	DeleteAction DeleteUserAction = "delete"

	// Basic user type
	Basic UserType = 1

	// Licensed user type
	Licensed UserType = 2

	// OnPrem user type
	OnPrem UserType = 3

	// Facebook user login type
	Facebook UserLoginType = 0

	// Google user login type
	Google UserLoginType = 1

	// API user login type
	API UserLoginType = 99

	// Zoom user login type
	Zoom UserLoginType = 100

	// SSO single sign on user login type
	SSO UserLoginType = 101

	// Active status
	Active UserStatus = "active"

	// Inactive status
	Inactive UserStatus = "inactive"

	// Pending status
	Pending UserStatus = "pending"
)
View Source
const (
	// ListWebinarsPath - v2 lists all webinars
	ListWebinarsPath = "/users/%s/webinars"

	// GetWebinarInfoPath - v2 path for retrieving info on a single webinar
	GetWebinarInfoPath = "/webinars/%d"
)
View Source
const (
	// RegisterForWebinarPath - v2 path for registering a user for a webinar
	RegisterForWebinarPath = "/webinars/%d/registrants"

	// ListRegistrantsPath - v2 path for listing panelists for a webinar
	ListRegistrantsPath = "/webinars/%d/registrants"
)
View Source
const AddMenbersPath = "/groups/%s/members"

AddMenbersPath - v2 path for add group members

View Source
const CreateMeetingPath = "/users/%s/meetings"

CreateMeetingPath - v2 create a meeting for a user

View Source
const CreateUserPath = "/users"

CreateUserPath - v2 path for creating a user

View Source
const (
	// DateFormat is a date only format string
	DateFormat = "2006-01-02"
)
View Source
const DeleteMeetingPath = "/meetings/%d"

DeleteMeetingPath - v2 delete a meeting

View Source
const DeleteUserPath = "/users/%s"

DeleteUserPath - v2 path for deleting a user

View Source
const GetAccountLockSettingsPath = "/accounts/%s/lock_settings"

GetAccountLockSettingsPath - v2 path for getting a specific user

View Source
const GetAccountManagedDomainsPath = "/accounts/%s/managed_domains"

GetAccountManagedDomainsPath - v2 path for getting a specific user

View Source
const GetAccountSettingsPath = "/accounts/%s/settings"

GetAccountSettingsPath - path to get account settings

View Source
const GetAccountTrustedDomainsPath = "/accounts/%s/trusted_domains"

GetAccountTrustedDomainsPath - v2 path for getting a specific user

View Source
const GetGroupPath = "/groups/%s"

GetGroupPath - v2 path for getting a specific group

View Source
const GetMeetingPath = "/meetings/%d"

GetMeetingPath - v2 retrieve the details of a meeting

View Source
const (
	// GetMeetingRecordingSettingsPath - get the settings for a recording
	GetMeetingRecordingSettingsPath = "/meetings/%d/recordings/settings"
)
View Source
const (
	// GetMeetingRecordingsPath - v2 get all the recordings from a meeting
	GetMeetingRecordingsPath = "/meetings/%s/recordings"
)
View Source
const GetRolePath = "/roles/%s"

GetRolePath - v2 path for getting a specific role

View Source
const GetUserPath = "/users/%s"

GetUserPath - v2 path for getting a specific user

View Source
const GetUserPermissionsPath = "/users/%s/permissions"

GetUserPermissionsPath - v2 path for getting a specific user

View Source
const (
	// GetWebinarPanelistsPath - v2 path for listing panelists for a webinar
	GetWebinarPanelistsPath = "/webinars/%d/panelists"
)
View Source
const ListGroupMembersPath = "/groups/%s/members"

ListGroupMembersPath - v2 path for listing group members

View Source
const ListGroupsPath = "/groups"

ListGroupsPath - v2 path for listing groups

View Source
const ListRoleMembersPath = "/roles/%s/members"

ListRoleMembersPath - v2 path for listing role members

View Source
const ListRolesPath = "/roles"

ListRolesPath - v2 path for listing roles

View Source
const ListUsersPath = "/users"

ListUsersPath - v2 path for listing users

Variables

View Source
var (
	// Debug causes debugging message to be printed, using the log package,
	// when set to true
	Debug = false

	// AccountID is a package-wide Account ID, used when no client is instantiated
	AccountID string

	// APIKey is a package-wide API key, used when no client is instantiated
	APIKey string

	// APISecret is a package-wide API secret, used when no client is instantiated
	APISecret string

	// ClientID is a package-wide Client ID, used when no client is instantiated
	ClientID string

	// ClientSecret is a package-wide Client Secret, used when no client is instantiated
	ClientSecret string
)

Functions

func DeleteMeeting

func DeleteMeeting(opts DeleteMeetingOptions) error

DeleteMeeting calls DELETE /meetings/{meetingID}

func DeleteUser

func DeleteUser(opts DeleteUserOptions) error

DeleteUser calls DELETE /users/{userID}

func OAuthToken

func OAuthToken(accountID string, clientID string, clientSecret string) (string, error)

Types

type APIError

type APIError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Errors  []struct {
		Field   string `json:"field"`
		Message string `json:"message"`
	} `json:"errors,omitempty"`
}

APIError contains the code and message returned by any Zoom errors

func (*APIError) Error

func (e *APIError) Error() string

type AccessTokenResponse

type AccessTokenResponse struct {
	AccessToken string `json:"access_token"`
	ExpiresIn   int    `json:"expires_in"`
}

type AccountLockSettings added in v0.1.2

type AccountLockSettings struct {
	ScheduleMeeting   interface{} `json:"schedule_meeting,omitempty"`
	InMeeting         interface{} `json:"in_meeting,omitempty"`
	EmailNotification interface{} `json:"email_notification,omitempty"`
	ZoomRooms         interface{} `json:"zoom_rooms,omitempty"`
	Recording         interface{} `json:"recording,omitempty"`
	Telephony         interface{} `json:"telephony,omitempty"`
	TSP               interface{} `json:"tsp,omitempty"`
	MeetingSecurity   interface{} `json:"meeting_security,omitempty"`
}

AccountLockSettings represents account lock settings

func GetAccountLockSettings added in v0.1.2

func GetAccountLockSettings(opts GetAccountLockSettingsOpts) (AccountLockSettings, error)

GetAccountLockSettings calls /users/{userId}, searching for a user by ID or email, using the default client

type AccountManagedDomains added in v0.1.2

type AccountManagedDomains struct {
	TotalRecords int      `json:"total_records"`
	Domains      []string `json:"domains"`
}

AccountManagedDomains represents account managed domains

func GetAccountManagedDomains added in v0.1.2

func GetAccountManagedDomains(opts GetAccountManagedDomainsOpts) (AccountManagedDomains, error)

GetAccountManagedDomains calls /users/{userId}, searching for a user by ID or email, using the default client

type AccountSettings added in v0.1.2

type AccountSettings struct {
	ScheduleMeeting         interface{} `json:"schedule_meeting,omitempty"`
	InMeeting               interface{} `json:"in_meeting,omitempty"`
	EmailNotification       interface{} `json:"email_notification,omitempty"`
	ZoomRooms               interface{} `json:"zoom_rooms,omitempty"`
	Security                interface{} `json:"security,omitempty"`
	Recording               interface{} `json:"recording,omitempty"`
	Telephony               interface{} `json:"telephony,omitempty"`
	TSP                     interface{} `json:"tsp,omitempty"`
	Integration             interface{} `json:"integration,omitempty"`
	Feature                 interface{} `json:"feature,omitempty"`
	MeetingAuthentication   bool        `json:"meeting_authentication,omitempty"`
	RecordingAuthentication bool        `json:"recording_authentication,omitempty"`
	AuthenticationOptions   interface{} `json:"authentication_options,omitempty"`
	MeetingSecurity         interface{} `json:"meeting_security,omitempty"`
}

AccountSettings represents account settings

func GetAccountSettings added in v0.1.2

func GetAccountSettings(opts GetAccountSettingsOpts) (AccountSettings, error)

GetAccountSettings gets the account settings for a master or sub account

type AccountTrustedDomains added in v0.1.2

type AccountTrustedDomains struct {
	TrustedDomains []string `json:"trusted_domains"`
}

AccountTrustedDomains represents account trusted domains

func GetAccountTrustedDomains added in v0.1.2

func GetAccountTrustedDomains(opts GetAccountTrustedDomainsOpts) (AccountTrustedDomains, error)

GetAccountTrustedDomains calls /users/{userId}, searching for a user by ID or email, using the default client

type AddMemberOptions

type AddMemberOptions struct {
	GroupID string   `json:"-"`
	Members []Member `json:"members"`
}

AddMemberOptions are details about add group members

type ApprovalType

type ApprovalType int

ApprovalType is the type of approval

type Audio

type Audio string

Audio determines how participants can join the audio portion of the meeting

type AutoRecording

type AutoRecording string

AutoRecording automatic recording

type Client

type Client struct {
	AccountID    string
	ClientID     string
	ClientSecret string
	Key          string
	Secret       string
	Transport    http.RoundTripper
	Timeout      time.Duration // set to value > 0 to enable a request timeout
	// contains filtered or unexported fields
}

Client is responsible for making API requests

func NewClient

func NewClient(apiKey string, apiSecret string, accountID string, clientID string, clientSecret string) *Client

NewClient returns a new API client

func (*Client) AddMembers

func (c *Client) AddMembers(opts AddMemberOptions) (ResopnseAddGroupMembers, error)

AddMembers calls POST /groups/{groupId}/members https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groupmemberscreate

func (*Client) CreateMeeting

func (c *Client) CreateMeeting(opts CreateMeetingOptions) (Meeting, error)

CreateMeeting calls POST /users/{userId}/meetings https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingcreate

func (*Client) CreateUser

func (c *Client) CreateUser(opts CreateUserOptions) (User, error)

CreateUser calls POST /users https://marketplace.zoom.us/docs/api-reference/zoom-api/users/usercreate

func (*Client) DeleteMeeting

func (c *Client) DeleteMeeting(opts DeleteMeetingOptions) error

DeleteMeeting calls DELETE /meetings/{meetingID}

func (*Client) DeleteUser

func (c *Client) DeleteUser(opts DeleteUserOptions) error

DeleteUser calls DELETE /users/{userID} https://marketplace.zoom.us/docs/api-reference/zoom-api/users/userdelete

func (*Client) GetAccountLockSettings added in v0.1.2

func (c *Client) GetAccountLockSettings(opts GetAccountLockSettingsOpts) (AccountLockSettings, error)

GetAccountLockSettings calls /users/{userId}, searching for a user by ID or email, using a specific client

func (*Client) GetAccountManagedDomains added in v0.1.2

func (c *Client) GetAccountManagedDomains(opts GetAccountManagedDomainsOpts) (AccountManagedDomains, error)

GetAccountManagedDomains calls /users/{userId}, searching for a user by ID or email, using a specific client

func (*Client) GetAccountSettings added in v0.1.2

func (c *Client) GetAccountSettings(opts GetAccountSettingsOpts) (AccountSettings, error)

GetAccountSettings gets the account settings for a master or sub account

func (*Client) GetAccountTrustedDomains added in v0.1.2

func (c *Client) GetAccountTrustedDomains(opts GetAccountTrustedDomainsOpts) (AccountTrustedDomains, error)

GetAccountTrustedDomains calls /users/{userId}, searching for a user by ID or email, using a specific client

func (*Client) GetGroup added in v0.1.2

func (c *Client) GetGroup(opts GetGroupOpts) (Group, error)

GetGroup calls /groups/{groupId}, searching for a group by ID or email, using a specific client

func (*Client) GetMeeting

func (c *Client) GetMeeting(opts GetMeetingOptions) (Meeting, error)

GetMeeting calls /meetings/ID https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meeting

func (*Client) GetMeetingRecordingSettings added in v0.1.2

func (c *Client) GetMeetingRecordingSettings(opts GetMeetingRecordingSettingsOptions) (CloudRecordingSettings, error)

GetMeetingRecordingSettings calls /meetings/{meetingId}/recordings/settings endpoint

func (*Client) GetMeetingRecordings

func (c *Client) GetMeetingRecordings(opts GetMeetingRecordingsOptions) (CloudRecordingMeeting, error)

GetMeetingRecordings calls /meetings/{meetingId}/recordings endpoint

func (*Client) GetRole added in v0.1.2

func (c *Client) GetRole(opts GetRoleOpts) (Role, error)

GetRole calls /roles/{roleId}, searching for a role by ID or email, using a specific client

func (*Client) GetUser

func (c *Client) GetUser(opts GetUserOpts) (User, error)

GetUser calls /users/{userId}, searching for a user by ID or email, using a specific client

func (*Client) GetUserPermissions added in v0.1.2

func (c *Client) GetUserPermissions(opts GetUserPermissionsOpts) (UserPermissions, error)

GetUserPermissions calls /users/{userId}/permissions

func (*Client) GetWebinarInfo

func (c *Client) GetWebinarInfo(webinarID int) (Webinar, error)

GetWebinarInfo gets into about a single webinar, using client c

func (*Client) GetWebinarPanelists

func (c *Client) GetWebinarPanelists(webinarID int) (GetWebinarPanelistsResponse, error)

GetWebinarPanelists calls /webinar/panelists using client c

func (*Client) ListAllRecordings

func (c *Client) ListAllRecordings(opts ListAllRecordingsOptions) (ListAllRecordingsResponse, error)

ListAllRecordings calls /users/{user_id}/recordings endpoint and gets all cloud recordings for a user, using the c client

func (*Client) ListGroupMembers added in v0.1.2

func (c *Client) ListGroupMembers(opts ListGroupMembersOptions) (ListGroupMembersResponse, error)

ListGroupMembers calls /group/list, listing all groups, using client c

func (*Client) ListGroups added in v0.1.2

func (c *Client) ListGroups() (ListGroupsResponse, error)

ListGroups calls /group/list, listing all groups, using client c

func (*Client) ListMeetings

func (c *Client) ListMeetings(opts ListMeetingsOptions) (ListMeetingsResponse, error)

ListMeetings calls /users/ID/meetings https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetings

func (*Client) ListRoleMembers added in v0.1.2

func (c *Client) ListRoleMembers(opts ListRoleMembersOptions) (ListRoleMembersResponse, error)

ListRoleMembers calls /role/list, listing all roles, using client c

func (*Client) ListRoles added in v0.1.2

func (c *Client) ListRoles() (ListRolesResponse, error)

ListRoles calls /role/list, listing all roles, using client c

func (*Client) ListUsers

func (c *Client) ListUsers(opts ListUsersOptions) (ListUsersResponse, error)

ListUsers calls /user/list, listing all users, using client c

func (*Client) ListWebinarRegistrants

func (c *Client) ListWebinarRegistrants(opts ListWebinarRegistrantsOptions) (ListWebinarRegistrantsResponse, error)

ListWebinarRegistrants lists webinars using client c

func (*Client) ListWebinars

func (c *Client) ListWebinars(opts ListWebinarsOptions) (ListWebinarsResponse, error)

ListWebinars calls /webinar/list, listing all webinars that don't require registration, using the client c

func (*Client) RegisterForWebinar

func (c *Client) RegisterForWebinar(opts WebinarRegistrant) (RegisterForWebinarResponse, error)

RegisterForWebinar registers a user for a webinar, using client c

type CloudRecordingMeeting

type CloudRecordingMeeting struct {
	UUID           string          `json:"uuid"`
	ID             int             `json:"id"`
	AccountID      string          `json:"account_id"`
	HostID         string          `json:"host_id"`
	Topic          string          `json:"topic"`
	Type           int             `json:"type"`
	StartTime      *Time           `json:"start_time"`
	Duration       int             `json:"duration"`
	TotalSize      int             `json:"total_size"`
	ShareURL       string          `json:"share_url"`
	RecordingCount int             `json:"recording_count"`
	RecordingFiles []RecordingFile `json:"recording_files"`
}

CloudRecordingMeeting represents a zoom meeting object

func GetMeetingRecordings

func GetMeetingRecordings(opts GetMeetingRecordingsOptions) (CloudRecordingMeeting, error)

GetMeetingRecordings calls /meetings/{meetingId}/recordings endpoint

type CloudRecordingSettings added in v0.1.2

type CloudRecordingSettings struct {
	ShareRecording          string `json:"share_recording"`
	RecordingAuthentication bool   `json:"recording_authentication"`
	AuthenticationOption    string `json:"authentication_option"`
	AuthenticationDomains   string `json:"authentication_domains"`
	ViewerDownload          bool   `json:"viewer_download"`
	Password                string `json:"password"`
	OnDemand                bool   `json:"on_demand"`
	ApprovalType            int    `json:"approval_type"`
	SendEmailToHost         bool   `json:"send_email_to_host"`
	ShowSocialShareButtons  bool   `json:"show_social_share_buttons"`
	Topic                   string `json:"topic"`
}

CloudRecordingSettings represents settings for a recording

func GetMeetingRecordingSettings added in v0.1.2

func GetMeetingRecordingSettings(opts GetMeetingRecordingSettingsOptions) (CloudRecordingSettings, error)

GetMeetingRecordingSettings calls /meetings/{meetingId}/recordings/settings endpoint

type CreateMeetingOptions

type CreateMeetingOptions struct {
	HostID         string          `json:"-"`
	Topic          string          `json:"topic,omitempty"`
	Type           MeetingType     `json:"type,omitempty"`
	StartTime      *Time           `json:"start_time,omitempty"`
	Duration       int             `json:"duration,omitempty"`
	Timezone       string          `json:"timezone,omitempty"`
	Password       string          `json:"password,omitempty"` // Max 10 characters. [a-z A-Z 0-9 @ - _ *]
	Agenda         string          `json:"agenda,omitempty"`
	TrackingFields []TrackingField `json:"tracking_fields,omitempty"`
	Settings       MeetingSettings `json:"settings,omitempty"`
}

CreateMeetingOptions are the options to create a meeting with

type CreateUserAction

type CreateUserAction string

CreateUserAction specifies how to create a new user

type CreateUserInfo

type CreateUserInfo struct {
	Email     string   `json:"email"`
	Type      UserType `json:"type"`
	FirstName string   `json:"first_name,omitempty"`
	LastName  string   `json:"last_name,omitempty"`
	Password  string   `json:"password,omitempty"`
}

CreateUserInfo are details about a user to create

type CreateUserOptions

type CreateUserOptions struct {
	Action   CreateUserAction `json:"action"`
	UserInfo CreateUserInfo   `json:"user_info"`
}

CreateUserOptions are the options to create a user with

type CustomAttribute added in v0.1.2

type CustomAttribute struct {
	Key   string `json:"key"`
	Name  string `json:"name"`
	Value string `json:"value"`
}

CustomAttribute represents a custom attribute

type CustomQuestion

type CustomQuestion struct {
	Title string `json:"title"`
	Value string `json:"value"`
}

CustomQuestion is the type for custom questions on registration form

type Date

type Date struct {
	time.Time
}

Date is a custom Date type that accounts for null values and empty strings // during JSON marshaling and unmarshaling

func (*Date) Format

func (d *Date) Format(format string) string

Format calls format on the underlying date object

func (*Date) MarshalJSON

func (d *Date) MarshalJSON() ([]byte, error)

MarshalJSON describes JSON unmarshaling for custom Date objects, handling empty string values

func (*Date) String

func (d *Date) String() string

String defines how date is printed out

func (*Date) UnmarshalJSON

func (d *Date) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON describes JSON unmarshaling for custom Date objects, handling empty string values

type DeleteMeetingOptions

type DeleteMeetingOptions struct {
	MeetingID    int    `url:"-"`
	OccurrenceID string `url:"occurrence_id,omitempty"`
	// ScheduleForReminder notify host and alternative host about meeting cancellation via
	// email
	ScheduleForReminder bool `url:"schedule_for_reminder,omitempty"`
}

DeleteMeetingOptions are the options to delete a meeting

type DeleteUserAction

type DeleteUserAction string

DeleteUserAction specifies how to delete a new user

type DeleteUserOptions

type DeleteUserOptions struct {
	EmailOrID         string           `url:"-"`
	Action            DeleteUserAction `url:"action,omitempty"`
	TransferEmail     string           `url:"transfer_email,omitempty"`
	TransferMeeting   bool             `url:"transfer_meeting,omitempty"`
	TransferWebinar   bool             `url:"transfer_webinar,omitempty"`
	TransferRecording bool             `url:"transfer_recording,omitempty"`
}

DeleteUserOptions are the options to delete a user with

type GetAccountLockSettingsOpts added in v0.1.2

type GetAccountLockSettingsOpts struct {
	AccountID         string `url:"-"`
	Option            string `url:"option,omitempty"`
	CustomQueryFields string `url:"custom_query_fields,omitempty"`
}

GetAccountLockSettingsOpts contains options for GetAccountLockSettings

type GetAccountManagedDomainsOpts added in v0.1.2

type GetAccountManagedDomainsOpts struct {
	AccountID string `url:"-"`
}

GetAccountManagedDomainsOpts contains options for GetAccountManagedDomains

type GetAccountSettingsOpts added in v0.1.2

type GetAccountSettingsOpts struct {
	AccountID         string `url:"-"`
	Option            string `url:"option,omitempty"`
	CustomQueryFields string `url:"custom_query_fields,omitempty"`
}

GetAccountSettingsOpts contains options for GetAccountSettings

type GetAccountTrustedDomainsOpts added in v0.1.2

type GetAccountTrustedDomainsOpts struct {
	AccountID string `url:"-"`
}

GetAccountTrustedDomainsOpts contains options for GetAccountTrustedDomains

type GetGroupOpts added in v0.1.2

type GetGroupOpts struct {
	ID string `url:"-"`
}

GetGroupOpts contains options for GetGroup

type GetMeetingOptions

type GetMeetingOptions struct {
	MeetingID    int    `url:"-"`
	OccurrenceID string `url:"occurrence_id,omitempty"`
}

GetMeetingOptions are the options to get a meeting

type GetMeetingRecordingSettingsOptions added in v0.1.2

type GetMeetingRecordingSettingsOptions struct {
	MeetingID int `url:"-"`
}

GetMeetingRecordingSettingsOptions contains options for GetMeetingRecordingSettings

type GetMeetingRecordingsOptions

type GetMeetingRecordingsOptions struct {
	MeetingID string `url:"-"`
}

GetMeetingRecordingsOptions contains options for GetMeetingRecordings

type GetRoleOpts added in v0.1.2

type GetRoleOpts struct {
	ID string `url:"-"`
}

GetRoleOpts contains options for GetRole

type GetUserOpts

type GetUserOpts struct {
	EmailOrID string         `url:"-"`
	LoginType *UserLoginType `url:"login_type,omitempty"` // use pointer so it can be null
}

GetUserOpts contains options for GetUser

type GetUserPermissionsOpts added in v0.1.2

type GetUserPermissionsOpts struct {
	UserID string `url:"-"`
}

GetUserPermissionsOpts contains options for GetUserPermissions

type GetWebinarPanelistsResponse

type GetWebinarPanelistsResponse struct {
	TotalRecords int               `json:"total_records"`
	Panelists    []WebinarPanelist `json:"panelists"`
}

GetWebinarPanelistsResponse - response from call to /webinar/panelists

func GetWebinarPanelists

func GetWebinarPanelists(webinarID int) (GetWebinarPanelistsResponse, error)

GetWebinarPanelists calls /webinar/panelists using the default client

type GlobalDialInNumber

type GlobalDialInNumber struct {
	Country     string                 `json:"country"`
	CountryName string                 `json:"country_name"`
	City        string                 `json:"city"`
	Number      string                 `json:"number"`
	Type        GlobalDialInNumberType `json:"type"`
}

GlobalDialInNumber is a global dial in number

type GlobalDialInNumberType

type GlobalDialInNumberType string

GlobalDialInNumberType is the type of global dial in number

type Group added in v0.1.2

type Group struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	TotalMembers int    `json:"total_members"`
}

Group represents an account group

func GetGroup added in v0.1.2

func GetGroup(opts GetGroupOpts) (Group, error)

GetGroup calls /groups/{groupId}, searching for a group by ID or email, using the default client

type HTTPMethod

type HTTPMethod string

HTTPMethod is the HTTP request method types

const (
	// Get is GET HTTP method
	Get HTTPMethod = http.MethodGet

	// Post is POST HTTP method
	Post HTTPMethod = http.MethodPost

	// Put is PUT HTTP method
	Put HTTPMethod = http.MethodPut

	// Patch is PATCH HTTP method
	Patch HTTPMethod = http.MethodPatch

	// Delete is DELETE HTTP method
	Delete HTTPMethod = http.MethodDelete
)

type ListAllRecordingsOptions

type ListAllRecordingsOptions struct {
	UserID        string `url:"-"`
	PageSize      *int   `url:"page_size,omitempty"`
	NextPageToken string `url:"next_page_token,omitempty"`
	Mc            string `url:"mc,omitempty"`
	Trash         bool   `url:"trash,omitempty"`
	// From is a YYYY-MM-DD string representing a date
	From string `url:"from"`
	// To is a YYYY-MM-DD string representing a date
	To        string    `url:"to"`
	TrashType TrashType `url:"trash_type,omitempty"`
}

ListAllRecordingsOptions contains options for ListAllRecordings. NOTE: The query URL parser doesn't like non time.Time fields. It just ignores this field if it's a zoom.Date or a zoom.Time. Instead use a `string` for `From` and `To` - see below.

type ListAllRecordingsResponse

type ListAllRecordingsResponse struct {
	From          *Date                   `json:"from"`
	To            *Date                   `json:"to"`
	PageCount     int                     `json:"page_count"`
	PageSize      int                     `json:"page_size"`
	TotalRecords  int                     `json:"total_records"`
	NextPageToken string                  `json:"next_page_token"`
	Meetings      []CloudRecordingMeeting `json:"meetings"`
}

ListAllRecordingsResponse contains the response from a call to ListAllRecordings

func ListAllRecordings

func ListAllRecordings(opts ListAllRecordingsOptions) (ListAllRecordingsResponse, error)

ListAllRecordings calls /users/{user_id}/recordings endpoint and gets all cloud recordings for a user, using the default client.

type ListGroupMembersOptions added in v0.1.2

type ListGroupMembersOptions struct {
	GroupID       string  `url:"-"`
	PageNumber    int     `json:"page_number"`
	NextPageToken *string `json:"next_page_token,omitempty"`
	PageSize      *int    `json:"page_size,omitempty"`
}

ListGroupMembersOptions contains options for ListGroupMembers

type ListGroupMembersResponse added in v0.1.2

type ListGroupMembersResponse struct {
	PageCount     int      `json:"page_count"`
	PageNumber    int      `json:"page_number"`
	NextPageToken string   `json:"next_page_token"`
	PageSize      int      `json:"page_size"`
	TotalRecords  int      `json:"total_records"`
	Members       []Member `json:"members"`
}

ListGroupMembersResponse contains the response from a call to ListGroupMembers

type ListGroupsResponse added in v0.1.2

type ListGroupsResponse struct {
	TotalRecords int     `json:"total_records"`
	Groups       []Group `json:"groups"`
}

ListGroupsResponse contains the response from a call to ListGroups

type ListMeeting

type ListMeeting struct {
	UUID      string      `json:"uuid"`
	ID        int         `json:"id"`
	HostID    string      `json:"host_id"`
	Topic     string      `json:"topic"`
	Type      MeetingType `json:"type"`
	StartTime *Time       `json:"start_time"`
	Duration  int         `json:"duration"`
	Timezone  string      `json:"timezone"`
	CreatedAt *Time       `json:"created_at"`
	JoinURL   string      `json:"join_url"`
	Agenda    string      `json:"agenda"`
}

ListMeeting represents a meeting object returned by ListMeetings endpoint

type ListMeetingType

type ListMeetingType string

ListMeetingType are the allowed meeting types

const (
	// ListMeetingsPath - v2 lists all the meetings that were scheduled for a user
	ListMeetingsPath = "/users/%s/meetings"

	// ListMeetingTypeScheduled is a meeting that is scheduled
	ListMeetingTypeScheduled ListMeetingType = "scheduled"
	// ListMeetingTypeLive is a live meeting
	ListMeetingTypeLive ListMeetingType = "live" // DEFAULT
	// ListMeetingTypeUpcoming is an upcoming meeting
	ListMeetingTypeUpcoming ListMeetingType = "upcoming"
)

type ListMeetingsOptions

type ListMeetingsOptions struct {
	HostID        string          `url:"-"`
	Type          ListMeetingType `url:"type,omitempty"`
	PageSize      *int            `url:"page_size,omitempty"`   // Default: 30, Maximum: 300
	PageNumber    *int            `url:"page_number,omitempty"` // Default: 1
	NextPageToken *string         `url:"next_page_token,omitempty"`
}

ListMeetingsOptions contains options for ListMeetings

type ListMeetingsResponse

type ListMeetingsResponse struct {
	PageCount     int           `json:"page_count"`
	TotalRecords  int           `json:"total_records"`
	PageNumber    int           `json:"page_number"`
	PageSize      int           `json:"page_size"`
	Meetings      []ListMeeting `json:"meetings"`
	NextPageToken string        `json:"next_page_token"`
}

ListMeetingsResponse container the response from a call to ListMeetings

func ListMeetings

func ListMeetings(opts ListMeetingsOptions) (ListMeetingsResponse, error)

ListMeetings calls /users/ID/meetings

type ListRoleMembersOptions added in v0.1.2

type ListRoleMembersOptions struct {
	RoleID        string `url:"-"`
	PageNumber    int    `json:"page_number"`
	NextPageToken string `json:"next_page_token"`
	PageSize      *int   `json:"page_size,omitempty"`
}

ListRoleMembersOptions contains options for ListRoleMembers

type ListRoleMembersResponse added in v0.1.2

type ListRoleMembersResponse struct {
	PageCount     int      `json:"page_count"`
	PageNumber    int      `json:"page_number"`
	NextPageToken string   `json:"next_page_token"`
	PageSize      int      `json:"page_size"`
	TotalRecords  int      `json:"total_records"`
	Members       []Member `json:"members"`
}

ListRoleMembersResponse contains the response from a call to ListRoleMembers

type ListRolesResponse added in v0.1.2

type ListRolesResponse struct {
	TotalRecords int    `json:"total_records"`
	Roles        []Role `json:"roles"`
}

ListRolesResponse contains the response from a call to ListRoles

type ListUsersOptions

type ListUsersOptions struct {
	PageSize      int         `url:"page_size"`
	PageNumber    int         `url:"page_number"`
	NextPageToken *string     `url:"next_page_token,omitempty"`
	Status        *UserStatus `url:"status,omitempty"`
	IncludeFields *[]string   `url:"include_fields,omitempty"`
}

ListUsersOptions contains options for ListUsers

type ListUsersResponse

type ListUsersResponse struct {
	TotalRecords  int    `json:"total_records"`
	PageCount     int    `json:"page_count"`
	PageNumber    int    `json:"page_number"`
	NextPageToken string `json:"next_page_token"`
	PageSize      int    `json:"page_size"`
	Users         []User `json:"users"`
}

ListUsersResponse contains the response from a call to ListUsers

func ListUsers

func ListUsers(opts ListUsersOptions) (ListUsersResponse, error)

ListUsers calls /user/list, listing all users, using the default client

type ListWebinarRegistrantsOptions

type ListWebinarRegistrantsOptions struct {
	WebinarID    int                               `url:"-"`
	Status       *ListWebinarRegistrantsStatusType `url:"status,omitempty"`
	PageSize     *int                              `url:"page_size,omitempty"`
	PageNumber   *int                              `url:"page_number,omitempty"`
	OccurrenceID string                            `url:"occurrence_id,omitempty"`
}

ListWebinarRegistrantsOptions - options for listing webinar registrants

type ListWebinarRegistrantsResponse

type ListWebinarRegistrantsResponse struct {
	PageCount    int                 `json:"page_count"`
	PageNumber   int                 `json:"page_number"`
	PageSize     int                 `json:"page_size"`
	TotalRecords int                 `json:"total_records"`
	Registrants  []WebinarRegistrant `json:"registrants"`
}

ListWebinarRegistrantsResponse - response for listing webinar registrants

func ListWebinarRegistrants

ListWebinarRegistrants lists webinars using the default client.

type ListWebinarRegistrantsStatusType

type ListWebinarRegistrantsStatusType string

ListWebinarRegistrantsStatusType contains possible options for "status" field when listing registrants

const (
	// PendingApprovalType - registrants pending approval
	PendingApprovalType ListWebinarRegistrantsStatusType = "pending"

	// ApprovedType - approved registrants
	ApprovedType ListWebinarRegistrantsStatusType = "approved"

	// DeniedType - denied registrants
	DeniedType ListWebinarRegistrantsStatusType = "denied"
)

type ListWebinarsOptions

type ListWebinarsOptions struct {
	HostID     string `url:"-"`
	PageSize   *int   `url:"page_size,omitempty"`
	PageNumber *int   `url:"page_number,omitempty"`
}

ListWebinarsOptions contains options for ListWebinars. Also accepts email address for HostID

type ListWebinarsResponse

type ListWebinarsResponse struct {
	PageCount    int       `json:"page_count"`
	TotalRecords int       `json:"total_records"`
	PageNumber   int       `json:"page_number"`
	PageSize     int       `json:"page_size"`
	Webinars     []Webinar `json:"webinars"`
}

ListWebinarsResponse contains the response from a call to ListWebinars

func ListWebinars

func ListWebinars(opts ListWebinarsOptions) (ListWebinarsResponse, error)

ListWebinars calls /webinar/list, listing all webinars that don't require registration, using the default client

type Meeting

type Meeting struct {
	UUID              string        `json:"uuid,omitempty"`
	ID                int           `json:"id,omitempty"`
	HostID            string        `json:"host_id,omitempty"`
	Topic             string        `json:"topic"`
	Type              MeetingType   `json:"type"`
	Status            MeetingStatus `json:"status"`
	StartTime         *Time         `json:"start_time"`
	Duration          int           `json:"duration"`
	Timezone          string        `json:"timezone"`
	CreatedAt         *Time         `json:"created_at"`
	Agenda            string        `json:"agenda"`
	StartURL          string        `json:"start_url"`
	JoinURL           string        `json:"join_url"`
	Password          string        `json:"password"`
	H323Password      string        `json:"h323_password"`
	EncryptedPassword string        `json:"encrypted_password"`
	// PMI is Personal Meeting ID. Only used for scheduled meetings and recurring meetings with
	// no fixed time
	PMI            string          `json:"pmi"`
	TrackingFields []TrackingField `json:"tracking_fields"`
	Occurrences    []Occurrence    `json:"occurrences"`
	Settings       MeetingSettings `json:"settings"`
	Recurrence     Recurrence      `json:"recurrence"`
}

Meeting represents a meeting created/returned by GetMeeting

func CreateMeeting

func CreateMeeting(opts CreateMeetingOptions) (Meeting, error)

CreateMeeting calls POST /users/{userId}/meetings

func GetMeeting

func GetMeeting(opts GetMeetingOptions) (Meeting, error)

GetMeeting calls /meetings/ID

type MeetingSettings

type MeetingSettings struct {
	HostVideo        bool `json:"host_video,omitempty"`
	ParticipantVideo bool `json:"participant_video,omitempty"`
	// ChinaMeeting host meeting in China
	ChinaMeeting bool `json:"cn_meeting,omitempty"`
	// IndiaMeeting host meeting in India
	IndiaMeeting   bool `json:"in_meeting,omitempty"`
	JoinBeforeHost bool `json:"join_before_host,omitempty"`
	MuteUponEntry  bool `json:"mute_upon_entry,omitempty"`
	// Watermark add watermark when viewing a shared screen
	Watermark bool `json:"watermark,omitempty"`
	// Use Personal Meeting ID. Only used for scheduled meetings and recurring meetings with no
	// fixed time
	UsePMI           bool             `json:"use_pmi,omitempty"`
	ApprovalType     ApprovalType     `json:"approval_type,omitempty"`
	RegistrationType RegistrationType `json:"registration_type,omitempty"`
	// Audio determines how participants can join the audio portion of the meeting
	Audio         Audio         `json:"audio,omitempty"`
	AutoRecording AutoRecording `json:"auto_recording,omitempty"`
	// Only signed in users can join this meeting
	EnforceLogin bool `json:"enforce_login,omitempty"`
	// Only signed in users with specifid domains can join this meeting
	EnforceLoginDomains string `json:"enforce_login_domains,omitempty"`
	// Alternative host's emails or IDs: multiple values separated by comma
	AlternativeHosts string `json:"alternative_hosts,omitempty"`
	// CloseRegistration after event date
	CloseRegistration bool `json:"close_registration,omitempty"`
	// Enable waiting room
	WaitingRoom        bool                 `json:"waiting_room,omitempty"`
	GobalDialInNumbers []GlobalDialInNumber `json:"global_dial_in_numbers,omitempty"`
	ContactName        string               `json:"contact_name,omitempty"`
	ContactEmail       string               `json:"contact_email,omitempty"`
	// Send confirmation email to registrants
	RegistrantsConfirmationEmail bool `json:"registrants_confirmation_email,omitempty"`
}

MeetingSettings are a meeting setting

type MeetingStatus

type MeetingStatus string

MeetingStatus is the status of the meeting

type MeetingType

type MeetingType int

MeetingType is the type of the meeting returned by the API

type Member

type Member struct {
	ID         string   `json:"id"`
	Email      string   `json:"email"`
	FirstName  string   `json:"first_name"`
	LastName   string   `json:"last_name"`
	Type       UserType `json:"type"`
	Department string   `json:"department"`
}

Member is a member of a group or role

type MonthlyWeek

type MonthlyWeek int

MonthlyWeek the week a meeting will recur each month

type NumberOfEmployeesType

type NumberOfEmployeesType string

NumberOfEmployeesType contains a list of valid values for number of employees in a registrant's company

const (
	// OneToTwenty is "1-20" employees
	OneToTwenty NumberOfEmployeesType = "1-20"

	// TwentyOneToFifty is "21-50" employees
	TwentyOneToFifty NumberOfEmployeesType = "21-50"

	// FiftyOneToOneHundred is "51-100" employees
	FiftyOneToOneHundred NumberOfEmployeesType = "51-100"

	// OneHundredOneToTwoFifty is "101-250" employees
	OneHundredOneToTwoFifty NumberOfEmployeesType = "101-250"

	// TwoFiftyOneToFiveHundred is "251-500" employees
	TwoFiftyOneToFiveHundred NumberOfEmployeesType = "251-500"

	// FiveHundredOneToOneThousand is "501-1,000" employees
	FiveHundredOneToOneThousand NumberOfEmployeesType = "501-1,000"

	// OneThousdandOneToFiveThousand is "1,001-5,001" employees
	OneThousdandOneToFiveThousand NumberOfEmployeesType = "1,001-5,001"

	// FiveThousandOneToTenThousand is "5,001-10,000" employees
	FiveThousandOneToTenThousand NumberOfEmployeesType = "5,001-10,000"

	// MoreThanTenThousand is "More than 10,000" employees
	MoreThanTenThousand NumberOfEmployeesType = "More than 10,000"
)

type Occurrence

type Occurrence struct {
	ID        string `json:"occurrence_id"`
	StartTime *Time  `json:"start_time"`
	Duration  int    `json:"duration"`
	Status    string `json:"status"`
}

Occurrence is an occurrence object

type PhoneNumber added in v0.1.2

type PhoneNumber struct {
	Country  string `json:"country"`
	Code     string `json:"code"`
	Number   string `json:"number"`
	Verified bool   `json:"verified"`
}

PhonNumbers represents represents a custom attribute

type PurchaseProcessRoleType

type PurchaseProcessRoleType string

PurchaseProcessRoleType contains a lsit of valid values for a registrant's role in the purchasing process

const (
	// DecisionMaker role in purchasing
	DecisionMaker PurchaseProcessRoleType = "Decision Maker"

	// EvaluatorRecommender role in purchasing
	EvaluatorRecommender PurchaseProcessRoleType = "Evaluator/Recommender"

	// Influencer role in purchasing
	Influencer PurchaseProcessRoleType = "Influencer"

	// NotInvolved has no role in purchasing
	NotInvolved PurchaseProcessRoleType = "Not involved"
)

type PurchasingTimeFrameType

type PurchasingTimeFrameType string

PurchasingTimeFrameType contains the list of valid values for purchasing timeframe

const (
	// WithinMonth is "Within a month" purchasing timeframe
	WithinMonth PurchasingTimeFrameType = "Within a month"

	// OneToThreeMonths is "1-3 months" purchasing timeframe
	OneToThreeMonths PurchasingTimeFrameType = "1-3 months"

	// FourToSixMonths is "4-6 months" purchasing timeframe
	FourToSixMonths PurchasingTimeFrameType = "4-6 months"

	// MoreThan6Months is "More than 6 months" purchasing timeframe
	MoreThan6Months PurchasingTimeFrameType = "More than 6 months"

	// NoTimeframe is no purchasing timeframe
	NoTimeframe PurchasingTimeFrameType = "No timeframe"
)

type RecordingFile

type RecordingFile struct {
	ID             string `json:"id"`
	MeetingID      string `json:"meeting_id"`
	RecordingStart *Time  `json:"recording_start"`
	RecordingEnd   *Time  `json:"recording_end"`
	FileType       string `json:"file_type"`
	FileSize       int    `json:"file_size"`
	PlayURL        string `json:"play_url"`
	// The URL using which the recording file can be downloaded. To access a private or
	// password protected cloud recording, you must use a [Zoom JWT App Type]
	DownloadURL   string        `json:"download_url"`
	Status        string        `json:"status"`
	DeletedTime   *Time         `json:"deleted_time"`
	RecordingType RecordingType `json:"recording_type"`
}

RecordingFile represents a recordings file object

type RecordingType

type RecordingType string

RecordingType is the recording file type

const (
	// RecordingTypeSharedScreenWithSpeakerViewCC is a shared screen with spearker view (CC) recording
	RecordingTypeSharedScreenWithSpeakerViewCC RecordingType = "shared_screen_with_speaker_view(CC)"
	// RecordingTypeSharedScreenWithSpeakerView is a shared screen with spearker view recording
	RecordingTypeSharedScreenWithSpeakerView RecordingType = "shared_screen_with_speaker_view"
	// RecordingTypeSharedScreenWithGalleryView is a shared screen with gallery view recording
	RecordingTypeSharedScreenWithGalleryView RecordingType = "shared_screen_with_gallery_view"
	// RecordingTypeSpeakerView is a speaker view recording
	RecordingTypeSpeakerView RecordingType = "speaker_view"
	// RecordingTypeGalleryView is a gallery view recording
	RecordingTypeGalleryView RecordingType = "gallery_view"
	// RecordingTypeSharedScreen is a shared screen recording
	RecordingTypeSharedScreen RecordingType = "shared_screen"
	// RecordingTypeAudioOnly is an audio only recording
	RecordingTypeAudioOnly RecordingType = "audio_only"
	// RecordingTypeAudioTranscript is an audio transcript recording
	RecordingTypeAudioTranscript RecordingType = "audio_transcript"
	// RecordingTypeChatFile is a chat file recording
	RecordingTypeChatFile RecordingType = "chat_file"
	// RecordingTypeTIMELINE is a timeline recording
	RecordingTypeTIMELINE RecordingType = "TIMELINE"
)

type Recurrence

type Recurrence struct {
	Type           RecurrenceType `json:"type"`
	RepeatInterval int            `json:"repeat_interval"`
	WeeklyDays     string         `json:"weekly_days"`
	MonthlyDay     int            `json:"monthly_day"`
	MonthlyWeek    MonthlyWeek    `json:"monthly_week"`
	MonthlyWeekDay WeekDay        `json:"monthly_week_day"`
	// EndTimes how many times the meeting will recur before it is canceled (cannot be used
	// with "end_time_date"
	EndTimes int `json:"end_times"`
	// EndDateTime should be in UTC. Cannot be used with "end_times"
	EndDateTime *Time `json:"end_date_time"`
}

Recurrence of the meeting

type RecurrenceType

type RecurrenceType int

RecurrenceType is the type of recurrence

type RegisterForWebinarResponse

type RegisterForWebinarResponse struct {
	RegistrantID string `json:"registrant_id"`
	WebinarID    int    `json:"id"`
	Topic        string `json:"topic"`
	StartTime    *Time  `json:"start_time"`
	JoinURL      *URL   `json:"join_url"`
}

RegisterForWebinarResponse is the response object returned when registering for a webinar

func RegisterForWebinar

func RegisterForWebinar(opts WebinarRegistrant) (RegisterForWebinarResponse, error)

RegisterForWebinar registers a user for a webinar, using the default client

type RegistrationType

type RegistrationType int

RegistrationType is the type of registration

type ResopnseAddGroupMembers

type ResopnseAddGroupMembers struct {
	// IDs has comma-delimited, like 'xxxxxxxxxx,xxxxxxxxxx'
	IDs     string `json:"ids"`
	AddedAt string `json:"added_at"`
}

ResopnseAddGroupMembers represents response for added member to group

func AddMembers

AddMembers calls POST /groups/{groupId}/members

type Role added in v0.1.2

type Role struct {
	ID                   string                   `json:"id"`
	Name                 string                   `json:"name"`
	Description          string                   `json:"description"`
	TotalMembers         int                      `json:"total_members"`
	Privileges           []string                 `json:"privileges"`
	SubAccountPrivileges RoleSubAccountPrivileges `json:"sub_account_privileges"`
}

Role represents an account role

func GetRole added in v0.1.2

func GetRole(opts GetRoleOpts) (Role, error)

GetRole calls /roles/{roleId}, searching for a role by ID or email, using the default client

type RoleSubAccountPrivileges added in v0.1.2

type RoleSubAccountPrivileges struct {
	SecondLevel int `json:"second_level"`
}

RoleSubAccountPrivileges are a partner plan feature

type Time

type Time struct {
	time.Time
}

Time is a custom Time type that accounts for null values and empty strings // during JSON marshaling and unmarshaling

func (*Time) Format

func (t *Time) Format(format string) string

Format calls format on the underlying time object

func (*Time) MarshalJSON

func (t *Time) MarshalJSON() ([]byte, error)

MarshalJSON describes JSON unmarshaling for custom Time objects, handling empty string values

func (*Time) String

func (t *Time) String() string

String defines how time is printed out

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON describes JSON unmarshaling for custom Time objects, handling empty string values

type TrackingField

type TrackingField struct {
	Field string `json:"field"`
	Value string `json:"value"`
}

TrackingField is a tracking field

type TrashType

type TrashType string

TrashType is the type of Cloud recording that you would like to retrieve from the trash

const (
	// ListAllRecordingsPath - v2 lists all recordings
	ListAllRecordingsPath = "/users/%s/recordings"

	// TrashTypeMeetingRecordings list all meeting recordings from the trash. Default.
	TrashTypeMeetingRecordings TrashType = "meeting_recordings"
	// TrashTypeRecordingFile list all individual recording files from the trash
	TrashTypeRecordingFile TrashType = "recording_file"
)

type URL

type URL struct {
	*url.URL
}

URL is a custom URL type that enables JSON marshaling/unmarshaling of url.URL

func (*URL) MarshalJSON

func (u *URL) MarshalJSON() ([]byte, error)

MarshalJSON describes JSON unmarshaling for custom Time objects, handling empty string values

func (*URL) String

func (u *URL) String() string

String defines how time is printed out

func (*URL) UnmarshalJSON

func (u *URL) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON describes JSON unmarshaling for custom Time objects, handling empty string values

type User

type User struct {
	// Fields returned in both List & Get
	ID                string   `json:"id"`
	FirstName         string   `json:"first_name"`
	LastName          string   `json:"last_name"`
	Email             string   `json:"email"`
	Type              int      `json:"type"`
	Status            string   `json:"status"`
	PMI               int      `json:"pmi"`
	Timezone          string   `json:"timezone"`
	Dept              string   `json:"dept"`
	RoleID            string   `json:"role_id"`
	CreatedAt         Time     `json:"created_at,string"`
	LastLoginTime     Time     `json:"last_login_time,string"`
	LastClientVersion string   `json:"last_client_version"`
	GroupIDs          []string `json:"group_ids"`
	IMGroupIDs        []string `json:"im_group_ids"`
	Verified          int      `json:"verified"`
	// Returned only when specifically requested via include_fields in the List call
	CustomAttributes []CustomAttribute `json:"custom_attributes"`
	HostKey          string            `json:"host_key"`
	// Returned by the Get call only
	PlanUnitedType     string        `json:"plan_united_type"`
	UsePMI             bool          `json:"use_pmi"`
	Language           string        `json:"language"`
	PhoneNumbers       []PhoneNumber `json:"phone_numbers"`
	VanityURL          string        `json:"vanity_url"`
	PersonalMeetingURL string        `json:"personal_meeting_url"`
	PicURL             string        `json:"pic_url"`
	CMSUserID          string        `json:"cms_user_id"`
	AccountID          string        `json:"account_id"`
	JID                string        `json:"jid"`
	JobTitle           string        `json:"job_title"`
	Company            string        `json:"company"`
	Location           string        `json:"location"`
	LoginType          int           `json:"login_type"`
}

User represents an account user

func CreateUser

func CreateUser(opts CreateUserOptions) (User, error)

CreateUser calls POST /users/{userId}/meetings

func GetUser

func GetUser(opts GetUserOpts) (User, error)

GetUser calls /users/{userId}, searching for a user by ID or email, using the default client

type UserLoginType

type UserLoginType int

UserLoginType is one of a fixed number of possible user login type

type UserPermissions added in v0.1.2

type UserPermissions struct {
	Permissions []string `json:"permissions"`
}

func GetUserPermissions added in v0.1.2

func GetUserPermissions(opts GetUserPermissionsOpts) (UserPermissions, error)

GetUserPermissions calls /users/{userId}/permissions

type UserStatus

type UserStatus string

UserStatus is a user's active status, for ListUser

type UserType

type UserType int

UserType is one of a fixed number of possible user types

func (UserType) String

func (t UserType) String() (str string)

String provides a string representation of user types

type Webinar

type Webinar struct {
	UUID                      string              `json:"uuid"`
	ID                        int                 `json:"id"`
	StartURL                  string              `json:"start_url"`
	JoinURL                   string              `json:"join_url"`
	RegistrationURL           string              `json:"registration_url"`
	CreatedAt                 *Time               `json:"created_at"`
	HostID                    string              `json:"host_id"`
	Topic                     string              `json:"topic"`
	Type                      WebinarType         `json:"type"`
	StartTime                 *Time               `json:"start_time"`
	Duration                  int                 `json:"duration"`
	Timezone                  string              `json:"timezone"`
	Agenda                    string              `json:"agenda"`
	OptionStartType           string              `json:"option_start_type"`
	OptionAudio               string              `json:"option_audio"`
	OptionEnforceLogin        bool                `json:"option_enforce_login"`
	OptionEnforceLoginDomains string              `json:"option_enforce_login_domains"`
	OptionAlternativeHosts    string              `json:"option_alternative_hosts"`
	Status                    int                 `json:"status"`
	Occurrences               []WebinarOccurrence `json:"occurrences"`
}

Webinar represents a webinar object

func GetWebinarInfo

func GetWebinarInfo(webinarID int) (Webinar, error)

GetWebinarInfo gets into about a single webinar, using the default client

type WebinarOccurrence

type WebinarOccurrence struct {
	OccurrenceID string `json:"occurrence_id"`
	StartTime    *Time  `json:"start_time"`
	Duration     int    `json:"duration"`
}

WebinarOccurrence contains recurrence data for recurring webinars

type WebinarPanelist

type WebinarPanelist struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	Email   string `json:"email"`
	JoinURL *URL   `json:"join_url"`
}

WebinarPanelist contains information returned by /webinar/panelists

type WebinarRegistrant

type WebinarRegistrant struct {
	WebinarID             int                              `json:"-" url:"-"`
	ID                    string                           `json:"id,omitempty"` // for webinar registrant response
	Email                 string                           `json:"email" url:"-"`
	FirstName             string                           `json:"first_name" url:"-"`
	LastName              string                           `json:"last_name" url:"-"`
	Address               string                           `json:"address" url:"-"`
	City                  string                           `json:"city" url:"-"`
	Country               string                           `json:"country" url:"-"` // 2 digit code per https://zoom.github.io/api/#countries
	Zip                   string                           `json:"zip" url:"-"`
	State                 string                           `json:"state" url:"-"`
	Phone                 string                           `json:"phone" url:"-"`
	Industry              string                           `json:"industry" url:"-"`
	Organization          string                           `json:"org" url:"-"`
	JobTitle              string                           `json:"job_title" url:"-"`
	PurchasingTimeFrame   PurchasingTimeFrameType          `json:"purchasing_time_frame" url:"-"`
	RoleInPurchaseProcess PurchaseProcessRoleType          `json:"role_in_purchase_process" url:"-"`
	NumberOfEmployees     NumberOfEmployeesType            `json:"no_of_employees" url:"-"`
	CommentsQuestions     string                           `json:"comments" url:"-"`
	CustomQuestions       []CustomQuestion                 `json:"custom_questions,omitempty" url:"-"` // JSON-encoded []CustomQuestion
	Status                ListWebinarRegistrantsStatusType `json:"status,omitempty" url:"-"`
	CreateTime            *Time                            `json:"create_time" url:"-"`
	JoinURL               *URL                             `json:"join_url" url:"-"`

	/*
		Comma-delimited list of ids. This applies if the webinar is recurring
		with fixed time. The behavior differs based on registration settings:
		1. Register once and attend any - this can be left blank, user is
		   registered for all sessions
		2. Register for each - **behavior unclear**
		3. Register once and attend one or more - **behavior unclear**

		See https://support.zoom.us/hc/en-us/community/posts/115019165043-Behavior-of-occurrence-ids-in-webinar-register-?page=1#community_comment_115004843466
		for more details.
	*/
	OccurrenceIDs string `url:"occurrence_ids,omitempty"`
}

WebinarRegistrant contains options for webinar registration for both creating a registration and looking one up. Note that any custom fields are strings, and the Title is the actual title entered in Zoom

type WebinarType

type WebinarType int

WebinarType is one of a fixed number of possible webinar types

const (
	// TypeWebinar is the default webinar type
	TypeWebinar WebinarType = 5

	// TypeRecurringWebinar is a recurring webinar
	TypeRecurringWebinar WebinarType = 6

	// TypeRecurringWebinarFixedTime is a recurring webinar with fixed time
	TypeRecurringWebinarFixedTime WebinarType = 9
)

type WeekDay

type WeekDay int

WeekDay is the day of the week

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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