Exemplo n.º 1
0
        /// <summary>
        /// Update a recurring meeting series
        /// </summary>
        /// <param name="meetingId">Unique identifier for the meeting to be updated.</param>
        /// <param name="title">Meeting title.</param>
        /// <param name="password">Meeting password.</param>
        /// <param name="start">Date and time for the start of meeting in any ISO 8601 compliant format. start cannot be before current date and time or after end. Duration between start and end cannot be shorter than 10 minutes or longer than 24 hours.</param>
        /// <param name="end">Date and time for the end of meeting in any ISO 8601 compliant format. end cannot be before current date and time or before start. Duration between start and end cannot be shorter than 10 minutes or longer than 24 hours.</param>
        /// <param name="enabledAutoRecordMeeting">Whether or not meeting is recorded automatically.</param>
        /// <param name="allowAnyUserToBeCoHost">Whether or not to allow any invitee to be a cohost.</param>
        /// <param name="agenda">Meeting agenda. The agenda can be a maximum of 2500 characters long.</param>
        /// <param name="timezone">Time zone in which meeting was originally scheduled (conforming with the IANA time zone database).</param>
        /// <param name="recurrence">Meeting series recurrence rule (conforming with RFC 2445), applying only to meeting series. This attribute is not allowed for a scheduled meeting or a meeting instance that is happening or has happended.</param>
        /// <param name="hostEmail">Email address for the meeting host. This attribute should only be set if the user or application calling the API has the admin-level scopes. When used, the admin may specify the email of a user in a site they manage to be the meeting host.</param>
        /// <param name="siteUrl">URL of the Webex site which the meeting is updated on. If not specified, the meeting is created on user's preferred site. All available Webex sites and preferred site of the user can be retrieved by Get Site List API.</param>
        /// <param name="enabledJoinBeforeHost">Whether or not to allow any attendee to join the meeting before the host joins the meeting.</param>
        /// <param name="enableConnectAudioBeforeHost">Whether or not to allow any attendee to connect audio in the meeting before the host joins the meeting. This attribute is only applicable if the enabledJoinBeforeHost attribute is set to true.</param>
        /// <param name="joinBeforeHostMinutes">the number of minutes an attendee can join the meeting before the meeting start time and the host joins. This attribute is only applicable if the enabledJoinBeforeHost attribute is set to true. Valid options are 0, 5, 10 and 15. Default is 0 if not specified.</param>
        /// <param name="allowFirstUserToBeCoHost">Whether or not to allow the first attendee of the meeting with a host account on the target site to become a cohost. The target site is specified by siteUrl parameter when creating the meeting; if not specified, it's user's preferred site.</param>
        /// <param name="allowAuthenticatedDevices">Whether or not to allow authenticated video devices in the meeting's organization to start or join the meeting without a prompt.</param>
        /// <param name="sendEmail">Whether or not to send emails to host and invitees. It is an optional field and default value is true.</param>
        /// <param name="registration">Meeting registration. When this option is enabled, meeting invitee must register personal information in order to join the meeting. Meeting invitee will receive an email with a registration link for the registration. When the registration form has been submitted and approved, an email with a real meeting link will be received. By clicking that link the meeting invitee can join the meeting. Please note that meeting registration does not apply to a meeting when it's a recurring meeting with recurrence field or it has no password, or the Join Before Host option is enabled for the meeting. Read Register for a Meeting in Cisco Webex Meetings for details.</param>
        /// <returns>The updated Meeting object.</returns>
        public async Task <Meeting> UpdateMeetingAsync(string meetingId, string title, string password, DateTime start, DateTime end,
                                                       bool enabledAutoRecordMeeting, bool?allowAnyUserToBeCoHost = null,
                                                       string agenda    = null, TimeZoneInfo timezone = null, string recurrence          = null,
                                                       string hostEmail = null, string siteUrl        = null, bool?enabledJoinBeforeHost = null,
                                                       bool?enableConnectAudioBeforeHost = null, int?joinBeforeHostMinutes      = null,
                                                       bool?allowFirstUserToBeCoHost     = null, bool?allowAuthenticatedDevices = null,
                                                       bool?sendEmail = null, MeetingRegistration registration = null)
        {
            var bodyParameters = new Dictionary <string, object>();

            bodyParameters.Add("title", title);
            bodyParameters.Add("password", password);
            bodyParameters.Add("start", start);
            bodyParameters.Add("end", end);
            bodyParameters.Add("enabledAutoRecordMeeting", enabledAutoRecordMeeting);

            if (allowAnyUserToBeCoHost != null)
            {
                bodyParameters.Add("allowAnyUserToBeCoHost", allowAnyUserToBeCoHost);
            }
            if (agenda != null)
            {
                bodyParameters.Add("agenda", agenda);
            }
            if (timezone != null)
            {
                bodyParameters.Add("timezone", timezone);
            }
            if (recurrence != null)
            {
                bodyParameters.Add("recurrence", recurrence);
            }
            if (hostEmail != null)
            {
                bodyParameters.Add("hostEmail", hostEmail);
            }
            if (siteUrl != null)
            {
                bodyParameters.Add("siteUrl", siteUrl);
            }
            if (enabledJoinBeforeHost != null)
            {
                bodyParameters.Add("enabledJoinBeforeHost", enabledJoinBeforeHost);
            }
            if (enableConnectAudioBeforeHost != null)
            {
                bodyParameters.Add("enableConnectAudioBeforeHost", enableConnectAudioBeforeHost);
            }
            if (joinBeforeHostMinutes != null)
            {
                bodyParameters.Add("joinBeforeHostMinutes", joinBeforeHostMinutes);
            }
            if (allowFirstUserToBeCoHost != null)
            {
                bodyParameters.Add("allowFirstUserToBeCoHost", allowFirstUserToBeCoHost);
            }
            if (allowAuthenticatedDevices != null)
            {
                bodyParameters.Add("allowAuthenticatedDevices", allowAuthenticatedDevices);
            }
            if (sendEmail != null)
            {
                bodyParameters.Add("sendEmail", sendEmail);
            }
            if (registration != null)
            {
                bodyParameters.Add("registration", registration);
            }

            return(await PostItemAsync <Meeting>($"{meetingsBase}/{meetingId}", bodyParameters));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates a new meeting.
        /// If the value of the parameter recurrence is null, a non-recurring meeting is created.
        /// If the parameter recurrence has a value, a recurring meeting is created based on the rule defined by the value of recurrence.
        /// If the parameter siteUrl has a value, the meeting is created on the specified site. Otherwise, the meeting is created on the user's preferred site.
        /// All available Webex sites and preferred site of the user can be retrieved by Get Site List API.
        /// </summary>
        /// <param name="title">Meeting title.</param>
        /// <param name="password">Meeting password.</param>
        /// <param name="start">Date and time for the start of meeting in any ISO 8601 compliant format. start cannot be before current date and time or after end. Duration between start and end cannot be shorter than 10 minutes or longer than 24 hours.</param>
        /// <param name="end">Date and time for the end of meeting in any ISO 8601 compliant format. end cannot be before current date and time or before start. Duration between start and end cannot be shorter than 10 minutes or longer than 24 hours.</param>
        /// <param name="enabledAutoRecordMeeting">Whether or not meeting is recorded automatically.</param>
        /// <param name="allowAnyUserToBeCoHost">Whether or not to allow any invitee to be a cohost.</param>
        /// <param name="agenda">Meeting agenda. The agenda can be a maximum of 2500 characters long.</param>
        /// <param name="timezone">Time zone in which meeting was originally scheduled (conforming with the IANA time zone database).</param>
        /// <param name="recurrence">Meeting series recurrence rule (conforming with RFC 2445), applying only to meeting series. This attribute is not allowed for a scheduled meeting or a meeting instance that is happening or has happended.</param>
        /// <param name="invitees">Invitees for meeting.</param>
        /// <param name="hostEmail">Email address for the meeting host. This attribute should only be set if the user or application calling the API has the admin-level scopes. When used, the admin may specify the email of a user in a site they manage to be the meeting host.</param>
        /// <param name="siteUrl">URL of the Webex site which the meeting is created on. If not specified, the meeting is created on user's preferred site. All available Webex sites and preferred site of the user can be retrieved by Get Site List API.</param>
        /// <param name="enabledJoinBeforeHost">Whether or not to allow any attendee to join the meeting before the host joins the meeting. The enabledJoinBeforeHost attribute can be modified for meeting series or scheduled meeting by Update a Meeting API.</param>
        /// <param name="enableConnectAudioBeforeHost">Whether or not to allow any attendee to connect audio in the meeting before host joins the meeting. This attribute is only applicable if the enabledJoinBeforeHost attribute is set to true. The enableConnectAudioBeforeHost attribute can be modified for meeting series or scheduled meeting by Update a Meeting API.</param>
        /// <param name="joinBeforeHostMinutes">the number of minutes an attendee can join the meeting before the meeting start time and the host joins. This attribute is only applicable if the enabledJoinBeforeHost attribute is set to true. The joinBeforeHostMinutes attribute can be modified for meeting series or scheduled meeting by Update a Meeting API. Valid options are 0, 5, 10 and 15. Default is 0 if not specified.</param>
        /// <param name="allowFirstUserToBeCoHost">Whether or not to allow the first attendee of the meeting with a host account on the target site to become a cohost. The target site is specified by siteUrl parameter when creating the meeting; if not specified, it's user's preferred site. The allowFirstUserToBeCoHost attribute can be modified for meeting series or scheduled meeting by Update a Meeting API.</param>
        /// <param name="allowAuthenticatedDevices">Whether or not to allow authenticated video devices in the meeting's organization to start or join the meeting without a prompt. This attribute can be modified for meeting series or scheduled meeting by Update a Meeting API.</param>
        /// <param name="sendEmail">Whether or not to send emails to host and invitees. It is an optional field and default value is true.</param>
        /// <param name="registration">Meeting registration. When this option is enabled, meeting invitee must register personal information in order to join the meeting. Meeting invitee will receive an email with a registration link for the registration. When the registration form has been submitted and approved, an email with a real meeting link will be received. By clicking that link the meeting invitee can join the meeting. Please note that meeting registration does not apply to a meeting when it's a recurring meeting with recurrence field or it has no password, or the Join Before Host option is enabled for the meeting. Read Register for a Meeting in Cisco Webex Meetings for details.</param>
        /// <param name="integrationTags">External keys created by an integration application in its own domain. They could be Zendesk ticket IDs, Jira IDs, Salesforce Opportunity IDs, etc. The integration application queries meetings by a key in its own domain. The maximum size of integrationTags is 3 and each item of integrationTags can be a maximum of 64 characters long.</param>
        /// <param name="excludePassword">Whether or not to exclude password from the meeting email invitation.</param>
        /// <param name="publicMeeting">Whether or not to allow the meeting to be listed on the public calendar.</param>
        /// <param name="reminderTime">The number of minutes before the meeting begins, for sending an email reminder to the host.</param>
        /// <returns>The new created Meeting object.</returns>
        public async Task <Meeting> CreateMeetingAsync(string title, DateTime start, DateTime end,
                                                       bool enabledAutoRecordMeeting, bool allowAnyUserToBeCoHost,
                                                       string password                   = null, string agenda = null, TimeZoneInfo timezone = null, string recurrence = null,
                                                       MeetingInvitee[] invitees         = null, string hostEmail           = null,
                                                       string siteUrl                    = null, bool?enabledJoinBeforeHost = null,
                                                       bool?enableConnectAudioBeforeHost = null, int?joinBeforeHostMinutes      = null,
                                                       bool?allowFirstUserToBeCoHost     = null, bool?allowAuthenticatedDevices = null,
                                                       bool?sendEmail                    = null, MeetingRegistration registration = null,
                                                       string[] integrationTags          = null, bool?excludePassword             = null,
                                                       bool?publicMeeting                = false, int?reminderTime                = null)
        {
            var bodyParameters = new Dictionary <string, object>();

            bodyParameters.Add("title", title);
            bodyParameters.Add("start", start);
            bodyParameters.Add("end", end);
            bodyParameters.Add("enabledAutoRecordMeeting", enabledAutoRecordMeeting);
            bodyParameters.Add("allowAnyUserToBeCoHost", allowAnyUserToBeCoHost);

            if (password != null)
            {
                bodyParameters.Add("password", password);
            }
            if (agenda != null)
            {
                bodyParameters.Add("agenda", agenda);
            }
            if (timezone != null)
            {
                bodyParameters.Add("timezone", timezone);
            }
            if (recurrence != null)
            {
                bodyParameters.Add("recurrence", recurrence);
            }
            if (invitees != null)
            {
                bodyParameters.Add("invitees", invitees);
            }
            if (hostEmail != null)
            {
                bodyParameters.Add("hostEmail", hostEmail);
            }
            if (siteUrl != null)
            {
                bodyParameters.Add("siteUrl", siteUrl);
            }
            if (enabledJoinBeforeHost != null)
            {
                bodyParameters.Add("enabledJoinBeforeHost", enabledJoinBeforeHost);
            }
            if (enableConnectAudioBeforeHost != null)
            {
                bodyParameters.Add("enableConnectAudioBeforeHost", enableConnectAudioBeforeHost);
            }
            if (joinBeforeHostMinutes != null)
            {
                bodyParameters.Add("joinBeforeHostMinutes", joinBeforeHostMinutes);
            }
            if (allowFirstUserToBeCoHost != null)
            {
                bodyParameters.Add("allowFirstUserToBeCoHost", allowFirstUserToBeCoHost);
            }
            if (allowAuthenticatedDevices != null)
            {
                bodyParameters.Add("allowAuthenticatedDevices", allowAuthenticatedDevices);
            }
            if (sendEmail != null)
            {
                bodyParameters.Add("sendEmail", sendEmail);
            }
            if (registration != null)
            {
                bodyParameters.Add("registration", registration);
            }
            if (integrationTags != null)
            {
                bodyParameters.Add("integrationTags", integrationTags);
            }
            if (excludePassword != null)
            {
                bodyParameters.Add("excludePassword", excludePassword);
            }
            if (publicMeeting != null)
            {
                bodyParameters.Add("publicMeeting", publicMeeting);
            }
            if (reminderTime != null)
            {
                bodyParameters.Add("integrationTags", reminderTime);
            }

            return(await PostItemAsync <Meeting>(meetingsBase, bodyParameters));
        }