Пример #1
0
        public static async Task GetOthersMessage(String roomId, String CourseId, String userName, Action <GetChatMessageResponse> successCallBack, Action <ResponseBase> errorCallback)
        {
            RestRequest request = new RestRequest("/lms/api/getothersmessages", Method.PUT);

            request.AddBody(new GetOthersMessageRequest()
            {
            });
            GetChatMessageResponse response = await APIServiceProvider.ServiceProvider.Execute <GetChatMessageResponse>(request);

            if ((response != null) && (response.ResponseCode == "1000"))
            {
                successCallBack?.Invoke(response);
            }
            else
            {
                errorCallback?.Invoke((ResponseBase)response);
            }
        }
Пример #2
0
        public static async Task GetChatMessage(string roomID, string courseID, Action <GetChatMessageResponse> successCallback, Action <ResponseBase> errorCallback)
        {
            RestRequest request = new RestRequest("/lms/api/getchatmsgs", Method.PUT);

            request.AddBody(new GetChatMessageRequest()
            {
                UniqueAppId = App.UniqueAppId,
                RoomID      = roomID,
                CourseID    = courseID
            });
            GetChatMessageResponse response = await APIServiceProvider.ServiceProvider.Execute <GetChatMessageResponse> (request);

            if ((response != null) && (response.ResponseCode == "1000"))
            {
                successCallback?.Invoke(response);
            }
            else
            {
                errorCallback?.Invoke((ResponseBase)response);
            }
        }