예제 #1
0
 /// <summary>
 /// Create a User Group
 /// <see href="https://api.slack.com/methods/usergroups.create" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='token'>
 /// Authentication token. Requires scope: `usergroups:write`
 /// </param>
 /// <param name='handle'>
 /// A mention handle. Must be unique among channels, users and User Groups.
 /// </param>
 /// <param name='name'>
 /// A name for the User Group. Must be unique among User Groups.
 /// </param>
 /// <param name='channels'>
 /// A comma separated string of encoded channel IDs for which the User Group
 /// uses as a default.
 /// </param>
 /// <param name='includeCount'>
 /// Include the number of users in each User Group.
 /// </param>
 /// <param name='description'>
 /// A short description of the User Group.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CreateOKResponseModelModelModel> CreateAsync(this IUsergroups operations, string token = default(string), string handle = default(string), string name = default(string), string channels = default(string), bool?includeCount = default(bool?), string description = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(token, handle, name, channels, includeCount, description, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
예제 #2
0
 /// <summary>
 /// Update the list of users for a User Group
 /// <see href="https://api.slack.com/methods/usergroups.users.update" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='token'>
 /// Authentication token. Requires scope: `usergroups:write`
 /// </param>
 /// <param name='includeCount'>
 /// Include the number of users in the User Group.
 /// </param>
 /// <param name='users'>
 /// A comma separated string of encoded user IDs that represent the entire list
 /// of users for the User Group.
 /// </param>
 /// <param name='usergroup'>
 /// The encoded ID of the User Group to update.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <UpdateOKResponseModel> Update1Async(this IUsergroups operations, string token = default(string), bool?includeCount = default(bool?), string users = default(string), string usergroup = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.Update1WithHttpMessagesAsync(token, includeCount, users, usergroup, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
예제 #3
0
 /// <summary>
 /// List all users in a User Group
 /// <see href="https://api.slack.com/methods/usergroups.users.list" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='token'>
 /// Authentication token. Requires scope: `usergroups:read`
 /// </param>
 /// <param name='includeDisabled'>
 /// Allow results that involve disabled User Groups.
 /// </param>
 /// <param name='usergroup'>
 /// The encoded ID of the User Group to update.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ListOKResponseModelModelModelModel> List1Async(this IUsergroups operations, string token = default(string), bool?includeDisabled = default(bool?), string usergroup = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.List1WithHttpMessagesAsync(token, includeDisabled, usergroup, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
예제 #4
0
 /// <summary>
 /// Create a User Group
 /// <see href="https://api.slack.com/methods/usergroups.create" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='token'>
 /// Authentication token. Requires scope: `usergroups:write`
 /// </param>
 /// <param name='handle'>
 /// A mention handle. Must be unique among channels, users and User Groups.
 /// </param>
 /// <param name='name'>
 /// A name for the User Group. Must be unique among User Groups.
 /// </param>
 /// <param name='channels'>
 /// A comma separated string of encoded channel IDs for which the User Group
 /// uses as a default.
 /// </param>
 /// <param name='includeCount'>
 /// Include the number of users in each User Group.
 /// </param>
 /// <param name='description'>
 /// A short description of the User Group.
 /// </param>
 public static CreateOKResponseModelModelModel Create(this IUsergroups operations, string token = default(string), string handle = default(string), string name = default(string), string channels = default(string), bool?includeCount = default(bool?), string description = default(string))
 {
     return(operations.CreateAsync(token, handle, name, channels, includeCount, description).GetAwaiter().GetResult());
 }
예제 #5
0
 /// <summary>
 /// Update the list of users for a User Group
 /// <see href="https://api.slack.com/methods/usergroups.users.update" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='token'>
 /// Authentication token. Requires scope: `usergroups:write`
 /// </param>
 /// <param name='includeCount'>
 /// Include the number of users in the User Group.
 /// </param>
 /// <param name='users'>
 /// A comma separated string of encoded user IDs that represent the entire list
 /// of users for the User Group.
 /// </param>
 /// <param name='usergroup'>
 /// The encoded ID of the User Group to update.
 /// </param>
 public static UpdateOKResponseModel Update1(this IUsergroups operations, string token = default(string), bool?includeCount = default(bool?), string users = default(string), string usergroup = default(string))
 {
     return(operations.Update1Async(token, includeCount, users, usergroup).GetAwaiter().GetResult());
 }
예제 #6
0
 /// <summary>
 /// List all users in a User Group
 /// <see href="https://api.slack.com/methods/usergroups.users.list" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='token'>
 /// Authentication token. Requires scope: `usergroups:read`
 /// </param>
 /// <param name='includeDisabled'>
 /// Allow results that involve disabled User Groups.
 /// </param>
 /// <param name='usergroup'>
 /// The encoded ID of the User Group to update.
 /// </param>
 public static ListOKResponseModelModelModelModel List1(this IUsergroups operations, string token = default(string), bool?includeDisabled = default(bool?), string usergroup = default(string))
 {
     return(operations.List1Async(token, includeDisabled, usergroup).GetAwaiter().GetResult());
 }
예제 #7
0
 /// <summary>
 /// List all User Groups for a team
 /// <see href="https://api.slack.com/methods/usergroups.list" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='includeUsers'>
 /// Include the list of users for each User Group.
 /// </param>
 /// <param name='token'>
 /// Authentication token. Requires scope: `usergroups:read`
 /// </param>
 /// <param name='includeCount'>
 /// Include the number of users in each User Group.
 /// </param>
 /// <param name='includeDisabled'>
 /// Include disabled User Groups.
 /// </param>
 public static ListOKResponseModelModelModelModel List(this IUsergroups operations, bool?includeUsers = default(bool?), string token = default(string), bool?includeCount = default(bool?), bool?includeDisabled = default(bool?))
 {
     return(operations.ListAsync(includeUsers, token, includeCount, includeDisabled).GetAwaiter().GetResult());
 }
예제 #8
0
 /// <summary>
 /// Enable a User Group
 /// <see href="https://api.slack.com/methods/usergroups.enable" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='token'>
 /// Authentication token. Requires scope: `usergroups:write`
 /// </param>
 /// <param name='includeCount'>
 /// Include the number of users in the User Group.
 /// </param>
 /// <param name='usergroup'>
 /// The encoded ID of the User Group to enable.
 /// </param>
 public static EnableOKResponse Enable(this IUsergroups operations, string token = default(string), bool?includeCount = default(bool?), string usergroup = default(string))
 {
     return(operations.EnableAsync(token, includeCount, usergroup).GetAwaiter().GetResult());
 }