<commit_before># dmanetwork/slack

Small connection to Slack (slack.com) for sending messages to channels via their API.

## Install

Use Composer.

Currently depends on the development branch of Nether\Object and Nether\Option, so if you are installing this via Composer you will need to add the min-stability set to "dev" - that will soon change so that will not be needed. This package IS registered via Packagist.org.

	{
		"min-stability": "dev",
		"require": { "dmanetwork/slack": "dev-master" }
	}

## Simple Usage

Define your Slack options early on with the rest of your application configuration. The only option you MUST specify is the API access token, which you can generate from http://api.slack.com while you are logged in there.

	Nether\Option::Set('slack-token','YOUR-SLACK-TOKEN');

Create an instance of the client to interact with the Slack API.

	$slack = new DMA\Slack\Client;
	
Then you can send messages.

	$slack->SendToChannel('Hello from our Slack enabled app.');
	
If you do not change any of the other options you should see a message from Optimus Prime in your #general channel.
	
## Advanced Usage

### More options at app config time...

	Nether\Option::Set([
		'slack-token' => "YOUR-SLACK-TOKEN",
		'slack-default-channel' => '#channel',
		'slack-default-name' => 'bot name of choice',
		'slack-default-icon' => 'url to public accessable image for chat icon'
	]);
	
### More options at instance time (overwrites prev options)...

	$slack = new DMA\Slack\Client([
		'DefaultChannel' => '#channel',
		'DefaultName' => 'bot name of choice',
		'DefaultIcon' => 'url to icon',
		'Token' => 'YOUR-SLACK-TOKEN'
	]);

### Sending an API request we have not wrapped...

	$slack->SendRequest(string method, array args);

The method name is the final part of the API url specified in the Slack documentation. The argument array then would be an associative array where the keys are the names of the parameters as Slack says, with the values you want to send.

# Copyright

This software is Copyright (c) 2014 Dream Machine Association, LLC. See the bundled LICENSE file (BSD-2-Clause) for more information.<commit_msg>fix composer option, verbose SendToChannel<commit_after># dmanetwork/slack

Small connection to Slack (slack.com) for sending messages to channels via their API.

## Install

Use Composer.

Currently depends on the development branch of Nether\Object and Nether\Option, so if you are installing this via Composer you will need to add the minimum-stability set to "dev" - that will soon change so that will not be needed. This package IS registered via Packagist.org.

	{
		"minimum-stability": "dev",
		"require": { "dmanetwork/slack": "dev-master" }
	}

## Simple Usage

Define your Slack options early on with the rest of your application configuration. The only option you MUST specify is the API access token, which you can generate from http://api.slack.com while you are logged in there.

	Nether\Option::Set('slack-token','YOUR-SLACK-TOKEN');

Create an instance of the client to interact with the Slack API.

	$slack = new DMA\Slack\Client;
	
Then you can send messages.

	$slack->SendToChannel('Hello from our Slack enabled app.');
	
If you do not change any of the other options you should see a message from Optimus Prime in your #general channel.
	
## Advanced Usage

### More options at app config time...

These are all the options available to set at application config time.

	Nether\Option::Set([
		'slack-token' => 'YOUR-SLACK-TOKEN',
		'slack-default-channel' => '#channel',
		'slack-default-name' => 'bot name of choice',
		'slack-default-icon' => 'url to public accessable image for chat icon'
	]);
	
### More options at instance time (overwrites prev options)...

These are all the options available to set at instance create time.

	$slack = new DMA\Slack\Client([
		'DefaultChannel' => '#channel',
		'DefaultName' => 'bot name of choice',
		'DefaultIcon' => 'url to icon',
		'Token' => 'YOUR-SLACK-TOKEN'
	]);
	
### More options at message send time...

And these are all the options available to set at message send time.

	$slack->SendToChannel('message here',[
		'Channel' => '#DifferentChannel',
		'Name' => 'Different Bot Name',
		'Icon' => 'url to different icon'
	]);

### Sending an API request we have not wrapped...

	$slack->SendRequest(string method, array args);

The method name is the final part of the API url specified in the Slack documentation. The argument array then would be an associative array where the keys are the names of the parameters as Slack says, with the values you want to send.

# Copyright

This software is Copyright (c) 2014 Dream Machine Association, LLC. See the bundled LICENSE file (BSD-2-Clause) for more information.
{'fraction_non_alphanumeric': 0.09815950920245399, 'fraction_numerical': 0.0021155066638459913, 'mean_word_length': 4.078410311493018, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '392029', 'n_tokens_mistral': 1406, 'n_tokens_neox': 1330, 'n_words': 621}