Skip to content

Commit 0f4e969

Browse files
authored
Merge pull request #222 from BlakeWilliams/acc-add-conversations-invite
Add conversations.invite web API method
2 parents 6f9c0ec + 60c4bb2 commit 0f4e969

File tree

3 files changed

+107
-2
lines changed

3 files changed

+107
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def application do
2424
end
2525

2626
def deps do
27-
[{:slack, "~> 0.23.1"}]
27+
[{:slack, "~> 0.23.2"}]
2828
end
2929
```
3030

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
{
2+
"desc": "Invites users to a channel.",
3+
4+
"args": {
5+
"token": {
6+
"required" : true,
7+
"example" : "xxxx-xxxxxxxxx-xxxx",
8+
"desc" : "Authentication token bearing required scopes."
9+
},
10+
"channel": {
11+
"required" : true,
12+
"example" : "C1234567890",
13+
"desc" : "The ID of the public or private channel to invite user(s) to."
14+
},
15+
"users": {
16+
"required" : true,
17+
"example" : "W1234567890,U2345678901,U3456789012",
18+
"desc" : "A comma separated list of user IDs. Up to 1000 users may be listed."
19+
}
20+
},
21+
22+
"response": {
23+
"ok": true,
24+
"ok": true,
25+
"channel": {
26+
"id": "C012AB3CD",
27+
"name": "general",
28+
"is_channel": true,
29+
"is_group": false,
30+
"is_im": false,
31+
"created": 1449252889,
32+
"creator": "W012A3BCD",
33+
"is_archived": false,
34+
"is_general": true,
35+
"unlinked": 0,
36+
"name_normalized": "general",
37+
"is_read_only": false,
38+
"is_shared": false,
39+
"is_ext_shared": false,
40+
"is_org_shared": false,
41+
"pending_shared": [],
42+
"is_pending_ext_shared": false,
43+
"is_member": true,
44+
"is_private": false,
45+
"is_mpim": false,
46+
"last_read": "1502126650.228446",
47+
"topic": {
48+
"value": "For public discussion of generalities",
49+
"creator": "W012A3BCD",
50+
"last_set": 1449709364
51+
},
52+
"purpose": {
53+
"value": "This part of the workspace is for fun. Make fun here.",
54+
"creator": "W012A3BCD",
55+
"last_set": 1449709364
56+
},
57+
"previous_names": [
58+
"specifics",
59+
"abstractions",
60+
"etc"
61+
],
62+
"num_members": 23,
63+
"locale": "en-US"
64+
}
65+
},
66+
67+
"errors": {
68+
"channel_not_found": "Value passed for `channel` was invalid.",
69+
"user_not_found": "Value passed for `users` was invalid.",
70+
"no_user": "No value was passed for `users`.",
71+
"cant_invite_self": "Authenticated user cannot invite themselves to a channel.",
72+
"not_in_channel": "Authenticated user is not in the channel.",
73+
"already_in_channel": "Invited user is already in the channel.",
74+
"is_archived": "Channel has been archived.",
75+
"cant_invite": "User cannot be invited to this channel.",
76+
"method_not_supported_for_channel_type": "This type of conversation cannot be used with this method.",
77+
"missing_scope": "The token used is not granted the specific scope permissions required to complete this request.",
78+
"invitee_cant_see_channel": "The Grid multi-workspace channel you are inviting a user to is not shared with any workspaces the user is currently a member of.",
79+
"ura_max_channels": "URA is already in the maximum number of channels.",
80+
"not_authed": "No authentication token provided.",
81+
"invalid_auth": "Some aspect of authentication cannot be validated. Either the provided token is invalid or the request originates from an IP address disallowed from making the request.",
82+
"account_inactive": "Authentication token is for a deleted user or workspace.",
83+
"token_revoked": "Authentication token is for a deleted user or workspace or the app has been removed.",
84+
"no_permission": "The workspace token used in this request does not have the permissions necessary to complete the request. Make sure your app is a member of the conversation it's attempting to post a message to.",
85+
"org_login_required": "The workspace is undergoing an enterprise migration and will not be available until migration is complete.",
86+
"ekm_access_denied": "Administrators have suspended the ability to post a message.",
87+
"is_bot": "This method cannot be called by a bot user.",
88+
"user_is_ultra_restricted": "This method cannot be called by a single channel guest.",
89+
"invalid_arguments": "The method was called with invalid arguments.",
90+
"invalid_arg_name": "The method was passed an argument whose name falls outside the bounds of accepted or expected values. This includes very long names and names with non-alphanumeric characters other than _. If you get this error, it is typically an indication that you have made a very malformed API call.",
91+
"invalid_charset": "The method was called via a `POST` request, but the `charset` specified in the `Content-Type` header was invalid. Valid charset names are: `utf-8` `iso-8859-1`.",
92+
"invalid_form_data": "The method was called via a `POST` request with `Content-Type` `application/x-www-form-urlencoded` or `multipart/form-data`, but the form data was either missing or syntactically invalid.",
93+
"invalid_post_type": "The method was called via a `POST` request, but the specified `Content-Type` was invalid. Valid types are: `application/json` `application/x-www-form-urlencoded` `multipart/form-data` `text/plain`.",
94+
"missing_post_type": "The method was called via a `POST` request and included a data payload, but the request did not include a `Content-Type` header.",
95+
"team_added_to_org": "The workspace associated with your request is currently undergoing migration to an Enterprise Organization. Web API and other platform operations will be intermittently unavailable until the transition is complete.",
96+
"request_timeout": "The method was called via a `POST` request, but the `POST` data was either missing or truncated.",
97+
"fatal_error": "The server could not complete your operation(s) without encountering a catastrophic error. It's possible some aspect of the operation succeeded before the error was raised.",
98+
"internal_error": "The server could not complete your operation(s) without encountering an error, likely due to a transient issue on our end. It's possible some aspect of the operation succeeded before the error was raised."
99+
},
100+
101+
"warnings": {
102+
"missing_charset": "The method was called via a `POST` request, and recommended practice for the specified `Content-Type` is to include a `charset` parameter. However, no `charset` was present. Specifically, non-form-data content types (e.g. `text/plain`) are the ones for which `charset` is recommended.",
103+
"superfluous_charset": "The method was called via a `POST` request, and the specified `Content-Type` is not defined to understand the `charset` parameter. However, `charset` was in fact present. Specifically, form-data content types (e.g. `multipart/form-data`) are the ones for which `charset` is superfluous."
104+
}
105+
}

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule Slack.Mixfile do
44
def project do
55
[
66
app: :slack,
7-
version: "0.23.1",
7+
version: "0.23.2",
88
elixir: "~> 1.7",
99
elixirc_paths: elixirc_paths(Mix.env()),
1010
name: "Slack",

0 commit comments

Comments
 (0)