/// <summary> /// Starts a Real Time Messaging session. /// <see href="https://api.slack.com/methods/rtm.connect" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='presenceSub'> /// Only deliver presence events when requested by subscription. See [presence /// subscriptions](/docs/presence-and-status#subscriptions). /// </param> /// <param name='token'> /// Authentication token. Requires scope: `rtm:stream` /// </param> /// <param name='batchPresenceAware'> /// Batch presence deliveries via subscription. Enabling changes the shape of /// `presence_change` events. See [batch /// presence](/docs/presence-and-status#batching). /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ConnectOKResponse> ConnectAsync(this IRtm operations, bool?presenceSub = default(bool?), string token = default(string), bool?batchPresenceAware = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ConnectWithHttpMessagesAsync(presenceSub, token, batchPresenceAware, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Starts a Real Time Messaging session. /// <see href="https://api.slack.com/methods/rtm.start" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='noLatest'> /// Exclude latest timestamps for channels, groups, mpims, and ims. /// Automatically sets `no_unreads` to `1` /// </param> /// <param name='simpleLatest'> /// Return timestamp only for latest message object of each channel (improves /// performance). /// </param> /// <param name='includeLocale'> /// Set this to `true` to receive the locale for users and channels. Defaults /// to `false` /// </param> /// <param name='presenceSub'> /// Only deliver presence events when requested by subscription. See [presence /// subscriptions](/docs/presence-and-status#subscriptions). /// </param> /// <param name='noUnreads'> /// Skip unread counts for each channel (improves performance). /// </param> /// <param name='batchPresenceAware'> /// Batch presence deliveries via subscription. Enabling changes the shape of /// `presence_change` events. See [batch /// presence](/docs/presence-and-status#batching). /// </param> /// <param name='mpimAware'> /// Returns MPIMs to the client in the API response. /// </param> /// <param name='token'> /// Authentication token. Requires scope: `rtm:stream` /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <StartOKResponse> StartAsync(this IRtm operations, bool?noLatest = default(bool?), bool?simpleLatest = default(bool?), bool?includeLocale = default(bool?), bool?presenceSub = default(bool?), bool?noUnreads = default(bool?), bool?batchPresenceAware = default(bool?), bool?mpimAware = default(bool?), string token = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.StartWithHttpMessagesAsync(noLatest, simpleLatest, includeLocale, presenceSub, noUnreads, batchPresenceAware, mpimAware, token, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Starts a Real Time Messaging session. /// <see href="https://api.slack.com/methods/rtm.connect" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='presenceSub'> /// Only deliver presence events when requested by subscription. See [presence /// subscriptions](/docs/presence-and-status#subscriptions). /// </param> /// <param name='token'> /// Authentication token. Requires scope: `rtm:stream` /// </param> /// <param name='batchPresenceAware'> /// Batch presence deliveries via subscription. Enabling changes the shape of /// `presence_change` events. See [batch /// presence](/docs/presence-and-status#batching). /// </param> public static ConnectOKResponse Connect(this IRtm operations, bool?presenceSub = default(bool?), string token = default(string), bool?batchPresenceAware = default(bool?)) { return(operations.ConnectAsync(presenceSub, token, batchPresenceAware).GetAwaiter().GetResult()); }
/// <summary> /// Starts a Real Time Messaging session. /// <see href="https://api.slack.com/methods/rtm.start" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='noLatest'> /// Exclude latest timestamps for channels, groups, mpims, and ims. /// Automatically sets `no_unreads` to `1` /// </param> /// <param name='simpleLatest'> /// Return timestamp only for latest message object of each channel (improves /// performance). /// </param> /// <param name='includeLocale'> /// Set this to `true` to receive the locale for users and channels. Defaults /// to `false` /// </param> /// <param name='presenceSub'> /// Only deliver presence events when requested by subscription. See [presence /// subscriptions](/docs/presence-and-status#subscriptions). /// </param> /// <param name='noUnreads'> /// Skip unread counts for each channel (improves performance). /// </param> /// <param name='batchPresenceAware'> /// Batch presence deliveries via subscription. Enabling changes the shape of /// `presence_change` events. See [batch /// presence](/docs/presence-and-status#batching). /// </param> /// <param name='mpimAware'> /// Returns MPIMs to the client in the API response. /// </param> /// <param name='token'> /// Authentication token. Requires scope: `rtm:stream` /// </param> public static StartOKResponse Start(this IRtm operations, bool?noLatest = default(bool?), bool?simpleLatest = default(bool?), bool?includeLocale = default(bool?), bool?presenceSub = default(bool?), bool?noUnreads = default(bool?), bool?batchPresenceAware = default(bool?), bool?mpimAware = default(bool?), string token = default(string)) { return(operations.StartAsync(noLatest, simpleLatest, includeLocale, presenceSub, noUnreads, batchPresenceAware, mpimAware, token).GetAwaiter().GetResult()); }