<commit_before># php-slack-inviter
Library to ease programmatic invites sending.

[![Build Status](https://api.travis-ci.org/ndobromirov/php-slack-inviter.svg?branch=master)](https://travis-ci.org/ndobromirov/php-slack-inviter)

# Requirements
1. Create a Slack team or join one.

2. Slack a personal access token for the particular team.
Go to [this page](https://api.slack.com/custom-integrations/legacy-tokens) and
generate your access token for a particular team you are part of. invitations
will originate the access token's owner.

# Installation
```
composer require ndobromirov/php-slack-inviter
```

# Usage example
```
require __DIR__ . '/vendor/autoload.php';

$team = 'my-team-name'
$token = 'my-token-value';

$handler = new \PhpSlackInviter\InviteHandler($token, $team);

try {
    $handler->requestNewInvite('<EMAIL>');<commit_msg>Added license and version badges to the readme.<commit_after># php-slack-inviter
Library to ease programmatic invites sending.

[![Latest Stable Version](https://poser.pugx.org/ndobromirov/php-slack-inviter/version)](https://packagist.org/packages/ndobromirov/php-slack-inviter)
[![Build Status](https://api.travis-ci.org/ndobromirov/php-slack-inviter.svg?branch=master)](https://travis-ci.org/ndobromirov/php-slack-inviter)
[![License](https://poser.pugx.org/ndobromirov/php-slack-inviter/license)](https://packagist.org/packages/ndobromirov/php-slack-inviter)

# Requirements
1. Create a Slack team or join one.

2. Slack a personal access token for the particular team.
Go to [this page](https://api.slack.com/custom-integrations/legacy-tokens) and
generate your access token for a particular team you are part of. invitations
will originate the access token's owner.

# Installation
```
composer require ndobromirov/php-slack-inviter
```

# Usage example
```
require __DIR__ . '/vendor/autoload.php';

$team = 'my-team-name'
$token = 'my-<PASSWORD>-<PASSWORD>';

$handler = new \PhpSlackInviter\InviteHandler($token, $team);

try {
    $handler->requestNewInvite('<EMAIL>');
{'fraction_non_alphanumeric': 0.14278656126482214, 'fraction_numerical': 0.001976284584980237, 'mean_word_length': 5.081081081081081, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 10, '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': '3643067', 'n_tokens_mistral': 715, 'n_tokens_neox': 695, 'n_words': 154}