/// <summary> /// Get chat message /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// Chat message UID /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ChatMessageModel> ApiChatByIdGetAsync(this IChatAPI operations, System.Guid id, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ApiChatByIdGetWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Post new chat message /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='chatMessage'> /// Chat message text /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ChatMessageModel> ApiChatPostAsync(this IChatAPI operations, ChatNewMessageModel chatMessage = default(ChatNewMessageModel), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ApiChatPostWithHttpMessagesAsync(chatMessage, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Delete chat message /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// Chat message UID /// </param> public static void ApiChatByIdDelete(this IChatAPI operations, System.Guid id) { operations.ApiChatByIdDeleteAsync(id).GetAwaiter().GetResult(); }
/// <summary> /// Update chat message /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// Chat message UID /// </param> /// <param name='value'> /// Chat message text /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task ApiChatByIdPutAsync(this IChatAPI operations, System.Guid id, string value = default(string), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.ApiChatByIdPutWithHttpMessagesAsync(id, value, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Update chat message /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// Chat message UID /// </param> /// <param name='value'> /// Chat message text /// </param> public static void ApiChatByIdPut(this IChatAPI operations, System.Guid id, string value = default(string)) { operations.ApiChatByIdPutAsync(id, value).GetAwaiter().GetResult(); }
/// <summary> /// Get chat message /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// Chat message UID /// </param> public static ChatMessageModel ApiChatByIdGet(this IChatAPI operations, System.Guid id) { return(operations.ApiChatByIdGetAsync(id).GetAwaiter().GetResult()); }
/// <summary> /// Post new chat message /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='chatMessage'> /// Chat message text /// </param> public static ChatMessageModel ApiChatPost(this IChatAPI operations, ChatNewMessageModel chatMessage = default(ChatNewMessageModel)) { return(operations.ApiChatPostAsync(chatMessage).GetAwaiter().GetResult()); }
/// <summary> /// Get all chat messages /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IList <ChatMessageModel> ApiChatGet(this IChatAPI operations) { return(operations.ApiChatGetAsync().GetAwaiter().GetResult()); }