GitterSharp.Services.GitterApiService.UpdateRoomNotificationSettingsAsync C# (CSharp) Méthode

UpdateRoomNotificationSettingsAsync() public méthode

public UpdateRoomNotificationSettingsAsync ( string userId, string roomId, UpdateRoomNotificationSettingsRequest request ) : Task
userId string
roomId string
request GitterSharp.Model.Requests.UpdateRoomNotificationSettingsRequest
Résultat Task
        public async Task<RoomNotificationSettingsResponse> UpdateRoomNotificationSettingsAsync(string userId, string roomId, UpdateRoomNotificationSettingsRequest request)
        {
            string url = _baseApiAddress + $"user/{userId}/rooms/{roomId}/settings/notifications";

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

            return await HttpClient.PutAsync<RoomNotificationSettingsResponse>(url, content);
        }