function slack_send_request in Slack 7
Deletes file from slack.
Parameters
string $method: String containing slack api method.
array $query: Array with query params.
2 calls to slack_send_request()
- slack_delete_file in ./
slack.module - Deletes file from slack.
- slack_get_files_list in ./
slack.module - Deletes file from slack.
File
- ./
slack.module, line 189 - Main module file, only hooks are allowed here.
Code
function slack_send_request($method, array $query) {
$query['token'] = variable_get('slack_token');
$url = 'https://slack.com/api/' . $method . '?' . drupal_http_build_query($query);
$response = drupal_http_request($url);
return json_decode($response->data, TRUE);
}