Skip to content

Commit 6f9c0ec

Browse files
authored
Merge pull request #221 from BlakeWilliams/acc-add-conversations-create
Add conversations.create web API method
2 parents bca99f7 + 0dc49b3 commit 6f9c0ec

File tree

3 files changed

+109
-2
lines changed

3 files changed

+109
-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.0"}]
27+
[{:slack, "~> 0.23.1"}]
2828
end
2929
```
3030

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{
2+
"desc": "Initiates a public or private channel-based conversation.",
3+
4+
"args": {
5+
"token": {
6+
"required" : true,
7+
"example" : "xxxx-xxxxxxxxx-xxxx",
8+
"desc" : "Authentication token bearing required scopes."
9+
},
10+
"name": {
11+
"required" : true,
12+
"example" : "mychannel",
13+
"desc" : "Name of the public or private channel to create."
14+
},
15+
"is_private": {
16+
"required" : false,
17+
"example" : "true",
18+
"desc" : "Create a private channel instead of a public one."
19+
},
20+
"user_ids": {
21+
"required" : false,
22+
"example" : "W1234567890,U2345678901,U3456789012",
23+
"desc" : "Required for workspace apps. A list of between 1 and 30 human users that will be added to the newly-created conversation. This argument has no effect when used by classic Slack apps."
24+
}
25+
},
26+
27+
"response": {
28+
"ok": true,
29+
"channel": {
30+
"id": "C0EAQDV4Z",
31+
"name": "endeavor",
32+
"is_channel": true,
33+
"is_group": false,
34+
"is_im": false,
35+
"created": 1504554479,
36+
"creator": "U0123456",
37+
"is_archived": false,
38+
"is_general": false,
39+
"unlinked": 0,
40+
"name_normalized": "endeavor",
41+
"is_shared": false,
42+
"is_ext_shared": false,
43+
"is_org_shared": false,
44+
"pending_shared": [],
45+
"is_pending_ext_shared": false,
46+
"is_member": true,
47+
"is_private": false,
48+
"is_mpim": false,
49+
"last_read": "0000000000.000000",
50+
"latest": null,
51+
"unread_count": 0,
52+
"unread_count_display": 0,
53+
"topic": {
54+
"value": "",
55+
"creator": "",
56+
"last_set": 0
57+
},
58+
"purpose": {
59+
"value": "",
60+
"creator": "",
61+
"last_set": 0
62+
},
63+
"previous_names": [],
64+
"priority": 0
65+
}
66+
},
67+
68+
"errors": {
69+
"name_taken": "A channel cannot be created with the given name.",
70+
"restricted_action": "A team preference prevents the authenticated user from creating channels.",
71+
"no_channel": "Value passed for `name` was empty.",
72+
"missing_scope": "The token used is not granted the specific scope permissions required to complete this request.",
73+
"invalid_name_required": "Value passed for `name` was empty.",
74+
"invalid_name_punctuation": "Value passed for `name` contained only punctuation.",
75+
"invalid_name_maxlength": "Value passed for `name` exceeded max length.",
76+
"invalid_name_specials": "Value passed for `name` contained unallowed special characters or upper case characters.",
77+
"invalid_name": "Value passed for `name` was invalid.",
78+
"invalid_users": "Value passed for `user_ids` was empty or invalid.",
79+
"user_not_found": "One or more users in `user_ids` was not found.",
80+
"too_many_convos_for_team": "The workspace has exceeded its limit of public and private channels.",
81+
"too_many_convos_for_app_on_team": "This app has exceeded its per-workspace limit of public and private channels.",
82+
"not_authed": "No authentication token provided.",
83+
"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.",
84+
"account_inactive": "Authentication token is for a deleted user or workspace.",
85+
"token_revoked": "Authentication token is for a deleted user or workspace or the app has been removed.",
86+
"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.",
87+
"org_login_required": "The workspace is undergoing an enterprise migration and will not be available until migration is complete.",
88+
"ekm_access_denied": "Administrators have suspended the ability to post a message.",
89+
"is_bot": "This method cannot be called by a bot user.",
90+
"user_is_ultra_restricted": "This method cannot be called by a single channel guest.",
91+
"invalid_arguments": "The method was called with invalid arguments.",
92+
"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.",
93+
"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`.",
94+
"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.",
95+
"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`.",
96+
"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.",
97+
"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.",
98+
"request_timeout": "The method was called via a `POST` request, but the `POST` data was either missing or truncated.",
99+
"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.",
100+
"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."
101+
},
102+
103+
"warnings": {
104+
"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.",
105+
"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."
106+
}
107+
}

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.0",
7+
version: "0.23.1",
88
elixir: "~> 1.7",
99
elixirc_paths: elixirc_paths(Mix.env()),
1010
name: "Slack",

0 commit comments

Comments
 (0)