Esempio n. 1
0
 public IObservable <bool> UpdateUserRoomSettings(string userId, string roomId, UpdateUserRoomSettingsRequest request)
 {
     return(_apiService.UpdateUserRoomSettingsAsync(userId, roomId, request).ToObservable());
 }
Esempio n. 2
0
        public async Task <bool> UpdateUserRoomSettingsAsync(string userId, string roomId, UpdateUserRoomSettingsRequest request)
        {
            string url = _baseApiAddress + $"user/{userId}/rooms/{roomId}";

#if __IOS__ || __ANDROID__ || NET45
            var content = new StringContent(JsonConvert.SerializeObject(request));
#endif
#if NETFX_CORE
            var content = new HttpStringContent(JsonConvert.SerializeObject(request));
#endif

            var response = await HttpClient.PutAsync(url, content);

            return(response.IsSuccessStatusCode);
        }
        public async Task <bool> UpdateUserRoomSettingsAsync(string userId, string roomId, UpdateUserRoomSettingsRequest request)
        {
            string url = _baseApiAddress + $"user/{userId}/rooms/{roomId}";

            var content = new StringContent(JsonConvert.SerializeObject(request));

            var response = await HttpClient.PutAsync(url, content);

            return(response.IsSuccessStatusCode);
        }