Example #1
0
        public async Task <ActionResult> Create(CreateMeetingRequest model)
        {
            if (model.name == string.Empty || model.meetingID == string.Empty)
            {
                return(BadRequest(new { message = "مقادیر را وارد کنید." }));
            }

            var result = await _client.CreateMeetingAsync(new CreateMeetingRequest
            {
                name               = model.name ?? "Test Meeting",
                meetingID          = model.meetingID ?? "TestMeeting001",
                record             = model.record ?? true,
                autoStartRecording = model.autoStartRecording ?? false,

                allowStartStopRecording = model.allowStartStopRecording ?? false,
                webcamsOnlyForModerator = model.webcamsOnlyForModerator ?? false,
                muteOnStart             = model.muteOnStart ?? false,
                allowModsToUnmuteUsers  = model.allowModsToUnmuteUsers ?? true,
                lockSettingsDisableCam  = model.lockSettingsDisableCam ?? false,
                lockSettingsDisableMic  = model.lockSettingsDisableMic ?? false,
            });

            if (result.returncode == Returncode.FAILED)
            {
                return(BadRequest(result));
            }
            return(Ok(result));
        }
        public ConfirmationResponse Execute(CreateMeetingRequest request)
        {
            request.ThrowExceptionIfInvalid();

            var projectExists = _projectRepository.Exists(request.ProjectId);

            if (!projectExists)
            {
                throw new UseCaseException("Project doesn't exist.");
            }

            var personsExist = request.InvolvedPersons.Concat(new [] { request.OrganizedBy }).All(x => _personRepository.Exists(x));

            if (!personsExist)
            {
                throw new UseCaseException("One or more users don't exist.");
            }

            var entity = ToDomainEntity(request);
            var result = _meetingRepository.Create(entity);

            return(new ConfirmationResponse("Meeting created successfully.")
            {
                Id = result,
            });
        }
Example #3
0
        /// <summary>
        /// Creates a new Amazon Chime SDK meeting in the specified media Region with no initial
        /// attendees. For more information about specifying media Regions, see <a href="https://docs.aws.amazon.com/chime/latest/dg/chime-sdk-meetings-regions.html">Amazon
        /// Chime SDK Media Regions</a> in the <i>Amazon Chime Developer Guide</i>. For more information
        /// about the Amazon Chime SDK, see <a href="https://docs.aws.amazon.com/chime/latest/dg/meetings-sdk.html">Using
        /// the Amazon Chime SDK</a> in the <i>Amazon Chime Developer Guide</i>.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the CreateMeeting service method.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        ///
        /// <returns>The response from the CreateMeeting service method, as returned by ChimeSDKMeetings.</returns>
        /// <exception cref="Amazon.ChimeSDKMeetings.Model.BadRequestException">
        /// The input parameters don't match the service's restrictions.
        /// </exception>
        /// <exception cref="Amazon.ChimeSDKMeetings.Model.LimitExceededException">
        /// The request exceeds the resource limit.
        /// </exception>
        /// <exception cref="Amazon.ChimeSDKMeetings.Model.ServiceUnavailableException">
        /// The service is currently unavailable.
        /// </exception>
        /// <exception cref="Amazon.ChimeSDKMeetings.Model.UnauthorizedException">
        /// The user isn't authorized to request a resource.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/chime-sdk-meetings-2021-07-15/CreateMeeting">REST API Reference for CreateMeeting Operation</seealso>
        public virtual Task <CreateMeetingResponse> CreateMeetingAsync(CreateMeetingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = CreateMeetingRequestMarshaller.Instance;
            options.ResponseUnmarshaller = CreateMeetingResponseUnmarshaller.Instance;

            return(InvokeAsync <CreateMeetingResponse>(request, options, cancellationToken));
        }
Example #4
0
        internal virtual CreateMeetingResponse CreateMeeting(CreateMeetingRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = CreateMeetingRequestMarshaller.Instance;
            options.ResponseUnmarshaller = CreateMeetingResponseUnmarshaller.Instance;

            return(Invoke <CreateMeetingResponse>(request, options));
        }
Example #5
0
        public async Task <IActionResult> CreateNewMeeting([FromBody] CreateMeetingRequest request)
        {
            await _meetingsModule.ExecuteCommandAsync(new CreateMeetingCommand(request.MeetingGroupId, request.Title, request.TermStartDate,
                                                                               request.TermEndDate, request.Description, request.MeetingLocationName, request.MeetingLocationAddress,
                                                                               request.MeetingLocationPostalCode, request.MeetingLocationCity, request.AttendeesLimit,
                                                                               request.GuestsLimit,
                                                                               request.RSVPTermStartDate, request.RSVPTermEndDate, request.EventFeeValue, request.EventFeeCurrency,
                                                                               request.HostMemberIds));

            return(Ok());
        }
 private Core.Entities.Meeting ToDomainEntity(CreateMeetingRequest request)
 {
     return(new Core.Entities.Meeting(_meetingRepository.GenerateNewIdentity(),
                                      request.ProjectId,
                                      request.Name,
                                      request.Time,
                                      request.Duration,
                                      request.OrganizedBy,
                                      request.Description,
                                      request.Log,
                                      request.InvolvedPersons,
                                      request.Documents));
 }
Example #7
0
        /// <summary>
        /// Creates a meeting in Zoom
        /// </summary>
        /// <param name="UserId">Host of the User</param>
        /// <param name="request">Meeting details</param>
        /// <returns></returns>
        public async Task <MeetingModel> CreateMeeting(string UserId, CreateMeetingRequest request)
        {
            var resp = await client.PostAsync(ZOOM_HOST + $"/users/{UserId}/meetings", toJson(request));

            var body = await resp.Content.ReadAsStringAsync();


            if ((int)resp.StatusCode != 201)
            {
                throw new Exception(body);
            }

            var model = JsonConvert.DeserializeObject <MeetingModel>(body);

            return(model);
        }
Example #8
0
        public void createMeeting(string targetNumber, string requestingNumber, Func <object, CreateMeetingCompletedEventArgs, Void> methodToCall)
        {
            createdMeetingMethodToCall = methodToCall;
            this.targetPhoneNumber     = targetNumber;
            try {
                var client = new MeetingServiceClient(new BasicHttpBinding(), new EndpointAddress(EndpointHelper.EndpointAddress));


                var request = new CreateMeetingRequest {
                    RequestingNumber = requestingNumber, TargetNumber = targetNumber
                };



                client.CreateMeetingCompleted += callCreatedMeetingDelegate;
                client.CreateMeetingAsync(request);
            } catch {
                MessageHelper.showErrorMesage("createMeeting failed");
            }
        }
Example #9
0
        private async Task <MeetingModel> createMeeting(string HostId, string Title, DateTime StartTime, DateTime EndTime)
        {
            var          dur     = (int)(EndTime - StartTime).TotalMinutes;
            MeetingModel meeting = null;

            var newMeeting = new CreateMeetingRequest()
            {
                topic      = Title,
                start_time = StartTime,
                type       = MeetingType.Scheduled,
                duration   = dur,
                timezone   = MeetingTimeZone.Eastern,
                password   = null,
                agenda     = "",
                settings   = new MeetingSettings()
                {
                }
            };

            try
            {
                log.WriteLine("Creating zoom meeting...");
                meeting = await zoom.CreateMeeting("5_bsxLnbSOO3Efj6y-n_yQ", newMeeting);

                log.WriteLine("Zoom meeting created");
                log.WriteLine(JsonConvert.SerializeObject(meeting));
            }
            catch (Exception ex)
            {
                log.WriteLine("Error creating zoom meeting");
                log.WriteLine(ex.Message);
                log.WriteLine(ex.StackTrace);
            }

            return(meeting);
        }
 public IActionResult CreateMeeting(CreateMeetingRequest request)
 {
     return(Ok(""));
 }