/// <summary> /// Retrieve a thread of messages posted to a direct message conversation from /// a multiparty direct message. /// <see href="https://api.slack.com/methods/mpim.replies" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='threadTs'> /// Unique identifier of a thread's parent message. /// </param> /// <param name='token'> /// Authentication token. Requires scope: `mpim:history` /// </param> /// <param name='channel'> /// Multiparty direct message channel to fetch thread from. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <RepliesOKResponse> RepliesAsync(this IMpim operations, string threadTs = default(string), string token = default(string), string channel = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.RepliesWithHttpMessagesAsync(threadTs, token, channel, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Closes a multiparty direct message channel. /// <see href="https://api.slack.com/methods/mpim.close" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='token'> /// Authentication token. Requires scope: `mpim:write` /// </param> /// <param name='channel'> /// MPIM to close. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CloseOKResponseModel> CloseAsync(this IMpim operations, string token = default(string), string channel = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CloseWithHttpMessagesAsync(token, channel, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// This method opens a multiparty direct message. /// <see href="https://api.slack.com/methods/mpim.open" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='token'> /// Authentication token. Requires scope: `mpim:write` /// </param> /// <param name='users'> /// Comma separated lists of users. The ordering of the users is preserved /// whenever a MPIM group is returned. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <OpenOKResponseModelModelModel> OpenAsync(this IMpim operations, string token = default(string), string users = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.OpenWithHttpMessagesAsync(token, users, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Fetches history of messages and events from a multiparty direct message. /// <see href="https://api.slack.com/methods/mpim.history" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='count'> /// Number of messages to return, between 1 and 1000. /// </param> /// <param name='unreads'> /// Include `unread_count_display` in the output? /// </param> /// <param name='inclusive'> /// Include messages with latest or oldest timestamp in results. /// </param> /// <param name='token'> /// Authentication token. Requires scope: `mpim:history` /// </param> /// <param name='oldest'> /// Start of time range of messages to include in results. /// </param> /// <param name='channel'> /// Multiparty direct message to fetch history for. /// </param> /// <param name='latest'> /// End of time range of messages to include in results. /// </param> public static HistoryOKResponseModelModelModelModel History(this IMpim operations, int?count = default(int?), bool?unreads = default(bool?), bool?inclusive = default(bool?), string token = default(string), string oldest = default(string), string channel = default(string), string latest = default(string)) { return(operations.HistoryAsync(count, unreads, inclusive, token, oldest, channel, latest).GetAwaiter().GetResult()); }
/// <summary> /// Closes a multiparty direct message channel. /// <see href="https://api.slack.com/methods/mpim.close" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='token'> /// Authentication token. Requires scope: `mpim:write` /// </param> /// <param name='channel'> /// MPIM to close. /// </param> public static CloseOKResponseModel Close(this IMpim operations, string token = default(string), string channel = default(string)) { return(operations.CloseAsync(token, channel).GetAwaiter().GetResult()); }
/// <summary> /// Retrieve a thread of messages posted to a direct message conversation from /// a multiparty direct message. /// <see href="https://api.slack.com/methods/mpim.replies" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='threadTs'> /// Unique identifier of a thread's parent message. /// </param> /// <param name='token'> /// Authentication token. Requires scope: `mpim:history` /// </param> /// <param name='channel'> /// Multiparty direct message channel to fetch thread from. /// </param> public static RepliesOKResponse Replies(this IMpim operations, string threadTs = default(string), string token = default(string), string channel = default(string)) { return(operations.RepliesAsync(threadTs, token, channel).GetAwaiter().GetResult()); }
/// <summary> /// This method opens a multiparty direct message. /// <see href="https://api.slack.com/methods/mpim.open" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='token'> /// Authentication token. Requires scope: `mpim:write` /// </param> /// <param name='users'> /// Comma separated lists of users. The ordering of the users is preserved /// whenever a MPIM group is returned. /// </param> public static OpenOKResponseModelModelModel Open(this IMpim operations, string token = default(string), string users = default(string)) { return(operations.OpenAsync(token, users).GetAwaiter().GetResult()); }
/// <summary> /// Sets the read cursor in a multiparty direct message channel. /// <see href="https://api.slack.com/methods/mpim.mark" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='token'> /// Authentication token. Requires scope: `mpim:write` /// </param> /// <param name='ts'> /// Timestamp of the most recently seen message. /// </param> /// <param name='channel'> /// multiparty direct message channel to set reading cursor in. /// </param> public static MarkOKResponseModelModelModel Mark(this IMpim operations, string token = default(string), string ts = default(string), string channel = default(string)) { return(operations.MarkAsync(token, ts, channel).GetAwaiter().GetResult()); }
/// <summary> /// Lists multiparty direct message channels for the calling user. /// <see href="https://api.slack.com/methods/mpim.list" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='token'> /// Authentication token. Requires scope: `mpim:read` /// </param> public static ListOKResponseModelModelModelModel List(this IMpim operations, string token = default(string)) { return(operations.ListAsync(token).GetAwaiter().GetResult()); }
/// <summary> /// Fetches history of messages and events from a multiparty direct message. /// <see href="https://api.slack.com/methods/mpim.history" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='count'> /// Number of messages to return, between 1 and 1000. /// </param> /// <param name='unreads'> /// Include `unread_count_display` in the output? /// </param> /// <param name='inclusive'> /// Include messages with latest or oldest timestamp in results. /// </param> /// <param name='token'> /// Authentication token. Requires scope: `mpim:history` /// </param> /// <param name='oldest'> /// Start of time range of messages to include in results. /// </param> /// <param name='channel'> /// Multiparty direct message to fetch history for. /// </param> /// <param name='latest'> /// End of time range of messages to include in results. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <HistoryOKResponseModelModelModelModel> HistoryAsync(this IMpim operations, int?count = default(int?), bool?unreads = default(bool?), bool?inclusive = default(bool?), string token = default(string), string oldest = default(string), string channel = default(string), string latest = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.HistoryWithHttpMessagesAsync(count, unreads, inclusive, token, oldest, channel, latest, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }