2017 © Pedro Peláez
 

symfony-bundle slack-bundle

A set of Symfony services for use in your project to integrate with Slack API faster.

image

partfire/slack-bundle

A set of Symfony services for use in your project to integrate with Slack API faster.

  • Tuesday, September 26, 2017
  • by carlamo
  • Repository
  • 2 Watchers
  • 3 Stars
  • 21 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 11 % Grown

The README.md

Slack Bundle for Symfony

Packagist Twitter Follow, (*1)

A set of Symfony services for use in your project to ease integration with Slack., (*2)

This bundle depends upon the official slack SDK PHP., (*3)

Installation

Using composer you can simply require master for now until we have a stable release:, (*4)

$ composer require partfire/slack-bundle:dev-master

Configuration

Add your details to your app/config/parameters.yml file. For example:, (*5)

    slack_token: 123456789XXXXXXX
    slack_username: My-Website
    slack_team: My-Team
    slack_testing_channel_name: my-tests-channel
  • slack_username: refers to the name that will appear in the channel.
  • slack_team: is the team name when you created your team via Slack.
  • slack_testing_channel_name refers to the only channel which all messages are sent when the syfony environment is not prod. This is to allow us to not pollute the other channels for the production environment wehen testing etc.

Also add to your app/AppKernel.php file:, (*6)

    new PartFire\SlackBundle\PartFireSlackBundle()

Example Usage

Send a Message from a controller

    $this->container->get('part_fire_slack_service')->sendMessage(
        "This is an example message",
        'some-channel-name',
        ':muscle:'
    );
 ```

You can also use this service from any other class by simply injecting it if you are using the Symfony DI Container.
E.g. you can add the following to the services.yml for your custom class to inject the messaging service:

```yaml
    my_vendor_class_entry_name:
      class: MyVendor\MyBundle\MyClasses\MyClass
      arguments: ['@part_fire_slack_service']

Service List

part_fire_slack_service

Contributing

Feel free to add more methods to the services etc and create a pull request. I will merge them in if they follow the existing structure or you teach me a better way., (*7)

The Versions

26/09 2017

v1.0.1

1.0.1.0

A set of Symfony services for use in your project to integrate with Slack API faster.

  Sources   Download

MIT

The Requires

 

The Development Requires

26/09 2017

v1.0.0

1.0.0.0

A set of Symfony services for use in your project to integrate with Slack API faster.

  Sources   Download

MIT

The Requires

 

The Development Requires

23/03 2017

dev-master

9999999-dev

A set of Symfony services for use in your project to integrate with Slack API faster.

  Sources   Download

MIT

The Requires

 

The Development Requires

23/12 2016

1.0.0

1.0.0.0

A set of Symfony services for use in your project to integrate with Slack API faster.

  Sources   Download

MIT

The Requires

 

The Development Requires