コード例 #1
0
 /// <summary>
 /// Ends the current user's snooze mode immediately.
 /// <see href="https://api.slack.com/methods/dnd.endSnooze" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='token'>
 /// Authentication token. Requires scope: `dnd:write`
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <EndSnoozeOKResponse> EndSnoozeAsync(this IDnd operations, string token = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.EndSnoozeWithHttpMessagesAsync(token, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #2
0
 /// <summary>
 /// Retrieves the Do Not Disturb status for users on a team.
 /// <see href="https://api.slack.com/methods/dnd.teamInfo" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='token'>
 /// Authentication token. Requires scope: `dnd:read`
 /// </param>
 /// <param name='users'>
 /// Comma-separated list of users to fetch Do Not Disturb status for
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <TeamInfoOKResponse> TeamInfoAsync(this IDnd operations, string token = default(string), string users = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.TeamInfoWithHttpMessagesAsync(token, users, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #3
0
 /// <summary>
 /// Ends the current user's snooze mode immediately.
 /// <see href="https://api.slack.com/methods/dnd.endSnooze" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='token'>
 /// Authentication token. Requires scope: `dnd:write`
 /// </param>
 public static EndSnoozeOKResponse EndSnooze(this IDnd operations, string token = default(string))
 {
     return(operations.EndSnoozeAsync(token).GetAwaiter().GetResult());
 }
コード例 #4
0
 /// <summary>
 /// Retrieves the Do Not Disturb status for users on a team.
 /// <see href="https://api.slack.com/methods/dnd.teamInfo" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='token'>
 /// Authentication token. Requires scope: `dnd:read`
 /// </param>
 /// <param name='users'>
 /// Comma-separated list of users to fetch Do Not Disturb status for
 /// </param>
 public static TeamInfoOKResponse TeamInfo(this IDnd operations, string token = default(string), string users = default(string))
 {
     return(operations.TeamInfoAsync(token, users).GetAwaiter().GetResult());
 }
コード例 #5
0
 /// <summary>
 /// Turns on Do Not Disturb mode for the current user, or changes its duration.
 /// <see href="https://api.slack.com/methods/dnd.setSnooze" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='numMinutes'>
 /// Number of minutes, from now, to snooze until.
 /// </param>
 /// <param name='token'>
 /// Authentication token. Requires scope: `dnd:write`
 /// </param>
 public static SetSnoozeOKResponse SetSnooze(this IDnd operations, int?numMinutes = default(int?), string token = default(string))
 {
     return(operations.SetSnoozeAsync(numMinutes, token).GetAwaiter().GetResult());
 }