Ejemplo n.º 1
0
        public async Task <MeetingDto> GetMeeting(string meetingId)
        {
            var awsResponseGET = await ExecuteAWSRequests.Run($"{Settings.ChimeBaseUrl}/meetings/{meetingId}", Http.Get, "chime", "us-east-1", null, string.Empty);

            var responseBodyGET = await HttpHelpers.ReadResponseBody(awsResponseGET);

            return(JsonConvert.DeserializeObject <MeetingDto>(responseBodyGET));
        }
Ejemplo n.º 2
0
        public async Task <MeetingDto> CreateMeeting <T>(T requestBody) where T : class
        {
            var awsResponsePOST = await ExecuteAWSRequests.Run($"{Settings.ChimeBaseUrl}/meetings", Http.Post, "chime", "us-east-1", requestBody, string.Empty);

            var responseBodyPOST = await HttpHelpers.ReadResponseBody(awsResponsePOST);

            return(JsonConvert.DeserializeObject <MeetingDto>(responseBodyPOST));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Get()
        {
            var values = _context.Values.ToList();

            var reqMeetingBody  = new { ClientRequestToken = Guid.NewGuid(), MediaRegion = "us-east-1" };
            var meetingResponse = await _chimeRepo.CreateMeeting(reqMeetingBody);

            var responseMeetingBodyPOST = JsonConvert.SerializeObject(meetingResponse);

            var reqAttendeeBody  = new { ExternalUserId = Guid.NewGuid() };
            var attendeeResponse = await _chimeRepo.CreateAttendee(reqAttendeeBody, meetingResponse.Meeting.MeetingId);

            var attendeeResponsePOST = JsonConvert.SerializeObject(attendeeResponse);

            var awsResponseGET = await ExecuteAWSRequests.Run("https://service.chime.aws.amazon.com/meetings", Http.Get, "chime", "us-east-1", null, "max-results=99&next-token=2");

            var responseBodyGET = await HttpHelpers.ReadResponseBody(awsResponseGET);


            //return Ok($"Response create meeting Body POST: \n\n {responseMeetingBodyPOST}\n\n Response create attendee Body POST: \n\n {attendeeResponsePOST}\n\n Response Body GET:\n\n {responseBodyGET}");
            return(Ok(values));
        }