Documentation ¶
Index ¶
- Constants
- Variables
- type APIError
- type Client
- func (c *Client) GetUser(opts GetUserOpts) (User, error)
- func (c *Client) GetWebinarInfo(webinarID int) (Webinar, error)
- func (c *Client) GetWebinarPanelists(webinarID int) (GetWebinarPanelistsResponse, error)
- func (c *Client) ListAllRecordings(opts ListAllRecordingsOptions) (ListAllRecordingsResponse, error)
- func (c *Client) ListUsers(opts ListUsersOptions) (ListUsersResponse, error)
- func (c *Client) ListWebinarRegistrants(opts ListWebinarRegistrantsOptions) (ListWebinarRegistrantsResponse, error)
- func (c *Client) ListWebinars(opts ListWebinarsOptions) (ListWebinarsResponse, error)
- func (c *Client) RegisterForWebinar(opts WebinarRegistrant) (RegisterForWebinarResponse, error)
- type CustomQuestion
- type GetUserOpts
- type GetWebinarPanelistsResponse
- type HTTPMethod
- type ListAllRecordingsOptions
- type ListAllRecordingsResponse
- type ListUsersOptions
- type ListUsersResponse
- type ListWebinarRegistrantsOptions
- type ListWebinarRegistrantsResponse
- type ListWebinarRegistrantsStatusType
- type ListWebinarsOptions
- type ListWebinarsResponse
- type Meeting
- type NumberOfEmployeesType
- type PurchaseProcessRoleType
- type PurchasingTimeFrameType
- type RecordingFile
- type RegisterForWebinarResponse
- type Time
- type URL
- type User
- type UserLoginType
- type UserStatus
- type UserType
- type Webinar
- type WebinarOccurrence
- type WebinarPanelist
- type WebinarRegistrant
- type WebinarType
Constants ¶
const ( // ListUsersPath - v2 path for listing users ListUsersPath = "/users" // GetUserPath - v2 path for getting a specific user GetUserPath = "/users/%s" )
const ( // Basic user type Basic UserType = 1 // Pro user type Pro UserType = 2 // Corporate user type Corporate 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" )
const ( // ListWebinarsPath - v2 lists all webinars ListWebinarsPath = "/users/%s/webinars" // GetWebinarInfoPath - v2 path for retrieving info on a single webinar GetWebinarInfoPath = "/webinars/%d" )
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" )
const (
// GetWebinarPanelistsPath - v2 path for listing panelists for a webinar
GetWebinarPanelistsPath = "/webinars/%d/panelists"
)
const (
// ListAllRecordingsPath - v2 lists all recordings
ListAllRecordingsPath = "/users/%s/recordings"
)
Variables ¶
var ( // Debug causes debugging message to be printed, using the log package, // when set to true Debug = false // 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 )
Functions ¶
This section is empty.
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
type Client ¶
type Client struct { 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 (*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) GetWebinarInfo ¶
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) 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 CustomQuestion ¶
CustomQuestion is the type for custom questions on registration form
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 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 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 `json:"next_page_token,omitempty"` Mc string `json:"mc"` Trash bool `json:"trash"` From string `json:"from"` To string `json:"to"` }
ListAllRecordingsOptions contains options for ListAllRecordings.
type ListAllRecordingsResponse ¶
type ListAllRecordingsResponse struct { PageCount int `json:"page_count"` From string `json:"from"` To string `json:"to"` TotalRecords int `json:"total_records"` PageNumber int `json:"page_number"` NextPageToken string `json:"next_page_token"` Meetings []Meeting `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 ListUsersOptions ¶
type ListUsersOptions struct { PageSize int `url:"page_size"` PageNumber int `url:"page_number"` Status *UserStatus `url:"status,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"` 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 ¶
func ListWebinarRegistrants(opts ListWebinarRegistrantsOptions) (ListWebinarRegistrantsResponse, error)
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"` ID int `json:"id"` AccountID string `json:"account_id"` HostID string `json:"host_id"` Topic string `json:"topic"` StartTime *Time `json:"start_time"` Timezome string `json:"timezone"` Duration int `json:"duration"` TotalSize int `json:"total_size"` RecordingCount int `json:"recording_count"` Type int `json:"type"` RecordingFiles []RecordingFile `json:"recording_files"` }
Meeting represents a zoom meeting object
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 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 string `json:"recording_start"` RecordingEnd string `json:"recording_end"` FileType string `json:"file_type"` FileSize int64 `json:"file_size"` PlayURL string `json:"play_url"` DownloadURL string `json:"download_url"` Status string `json:"status"` DeletedTime string `json:"deleted_time"` RecordingType string `json:"recording_type"` }
RecordingFile represents a recordings file object
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 Time ¶
Time is a custom Time type that accounts for null values and empty strings // during JSON marshaling and unmarshaling
func (*Time) MarshalJSON ¶
MarshalJSON describes JSON unmarshaling for custom Time objects, handling empty string values
func (*Time) UnmarshalJSON ¶
UnmarshalJSON describes JSON unmarshaling for custom Time objects, handling empty string values
type URL ¶
URL is a custom URL type that enables JSON marshaling/unmarshaling of url.URL
func (*URL) MarshalJSON ¶
MarshalJSON describes JSON unmarshaling for custom Time objects, handling empty string values
func (*URL) UnmarshalJSON ¶
UnmarshalJSON describes JSON unmarshaling for custom Time objects, handling empty string values
type User ¶
type User struct { Email string `json:"email"` ID string `json:"id"` AccountID string `json:"account_id"` CreatedAt Time `json:"created_at,string"` FirstName string `json:"first_name"` LastName string `json:"last_name"` PicURL string `json:"pic_url"` Type UserType `json:"type"` DisableChat bool `json:"disable_chat"` EnableE2eEncryption bool `json:"enable_e2e_encryption"` EnableSilentMode bool `json:"enable_silent_mode"` DisableGroupHd bool `json:"disable_group_hd"` DisableRecording bool `json:"disable_recording"` EnableCmr bool `json:"enable_cmr"` EnableAutoRecording bool `json:"enable_auto_recording"` EnableCloudAutoRecording bool `json:"enable_cloud_auto_recording"` Verified int `json:"verified"` PMI int `json:"pmi"` MeetingCapacity int `json:"meeting_capacity"` EnableWebinar bool `json:"enable_webinar"` WebinarCapacity int `json:"webinar_capacity"` EnableLarge bool `json:"enable_large"` LargeCapacity int `json:"large_capacity"` DisableFeedback bool `json:"disable_feedback"` DisableJbhReminder bool `json:"disable_jbh_reminder"` EnableBreakoutRoom bool `json:"enable_breakout_room"` EnablePolling bool `json:"enable_polling"` EnableAnnotation bool `json:"enable_annotation"` EnableFarEndCameraControl bool `json:"enable_far_end_camera_control"` DisablePrivateChat bool `json:"disable_private_chat"` EnableEnterExitChime bool `json:"enable_enter_exit_chime"` DisableCancelMeetingNotification bool `json:"disable_cancel_meeting_notification"` EnableRemoteSupport bool `json:"enable_remote_support"` EnableFileTransfer bool `json:"enable_file_transfer"` EnableVirtualBackground bool `json:"enable_virtual_background"` EnableAttentionTracking bool `json:"enable_attention_tracking"` EnableWaitingRoom bool `json:"enable_waiting_room"` EnableClosedCaption bool `json:"enable_closed_caption"` EnableCoHost bool `json:"enable_co_host"` EnableAutoSavingChats bool `json:"enable_auto_saving_chats"` EnablePhoneParticipantsPassword bool `json:"enable_phone_participants_password"` EnableAutoDeleteCmr bool `json:"enable_auto_delete_cmr"` AutoDeleteCmrDays int `json:"auto_delete_cmr_days"` Dept string `json:"dept"` LastClientVersion string `json:"lastClientVersion"` LastLoginTime string `json:"lastLoginTime"` Token string `json:"token"` ZPK string `json:"zpk"` }
User represents an account user
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 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 ¶
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 )