2017 © Pedro Peláez
 

library slack

Wrapper for Slack Web API

image

wrapi/slack

Wrapper for Slack Web API

  • Monday, May 7, 2018
  • by palanik
  • Repository
  • 3 Watchers
  • 23 Stars
  • 10,022 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 9 Versions
  • 17 % Grown

The README.md

Slack Web API Wrapper

Simplest Client interface for accessing Slack Web API., (*1)

Latest Stable Version License, (*2)

Installation

$ composer require "wrapi/slack:*"

Usage

Create a slack client with API token to connect to Slack Web API., (*3)

$slack = new wrapi\slack\slack(SLACK_API_TOKEN);

// Now you are ready to make API calls to Slack.

Provide API parameters to the calls., (*4)

API calls follow this syntax:, (*5)

$slack->apigroup->action($queryString);, (*6)

  • queryString - (as required) API method parameters as key-value pairs.

Post a message:

$slack->chat->postMessage(array(
    "channel" => "#general",
    "text" => "Hello World!"
  )
)

Examples

Lists custom emoji for a team.

$emojis = $slack->emoji->list();

Lists all channels in a Slack team.

$channels = $slack->channels->list(array("exclude_archived" => 1));

Gets information about a private group.

$myGroup = $slack->groups->info(array("channel" => "G1234567890"));

Adds a reaction to an item.

$slack->reactions->add(array(
    "name" => "thumbsup",
    "file" => "F1234567890",
    "file_comment" => "Fc1234567890",
    "channel" => "G1234567890",
    "timestamp" => "1234567890.123456"
  )
);

Gets information about a user.

$user = $slack->users->info(array("user" => "U1234567890"));

Post chat messages to Slack.

$response = $slack->chat->postMessage(array(
    "channel" => "#general",
    "text" => "Hello <@u12345678|world>!",
    "username" => "Wrapi Bot",
    "as_user" => false,
    "parse" => "full",
    "link_names" => 1,
    "unfurl_links" => true,
    "unfurl_media" => false
  )
)

API Functions

api

apps.permissions

apps.permissions.resources

apps.permissions.scopes

apps.permissions.users

apps

auth

bots

channels

chat

conversations

dialog

dnd

emoji

files.comments

files

groups

im

migration

mpim

oauth

pins

reactions

reminders

rtm

stars

team

team.profile

usergroups

usergroups.users

users

users.profile

License

MIT, (*7)

The Versions

07/05 2018

dev-master

9999999-dev https://github.com/palanik/slack-php

Wrapper for Slack Web API

  Sources   Download

MIT

The Requires

 

by Avatar palanik

api rest guzzle slack api wrapper slack-api wrapi slack wrapper slack-web-api

07/05 2018

dev-dev

dev-dev https://github.com/palanik/slack-php

Wrapper for Slack Web API

  Sources   Download

MIT

The Requires

 

by Avatar palanik

api rest guzzle slack api wrapper slack-api wrapi slack wrapper slack-web-api

07/05 2018

v1.0.1

1.0.1.0 https://github.com/palanik/slack-php

Wrapper for Slack Web API

  Sources   Download

MIT

The Requires

 

by Avatar palanik

api rest guzzle slack api wrapper slack-api wrapi slack wrapper slack-web-api

25/09 2017

v0.1.6

0.1.6.0 https://github.com/palanik/slack-php

Wrapper for Slack Web API

  Sources   Download

MIT

The Requires

 

by Avatar palanik

api rest guzzle slack api wrapper slack-api wrapi slack wrapper slack-web-api

19/03 2017

v0.1.5

0.1.5.0 https://github.com/palanik/slack-php

Wrapper for Slack Web API

  Sources   Download

MIT

The Requires

 

by Avatar palanik

api rest guzzle slack api wrapper slack-api wrapi slack wrapper

23/06 2016

v0.1.4

0.1.4.0 https://github.com/palanik/slack-php

Wrapper for Slack Web API

  Sources   Download

MIT

The Requires

 

by Avatar palanik

api rest guzzle slack api wrapper slack-api wrapi slack wrapper

28/02 2016

v0.1.3

0.1.3.0 https://github.com/palanik/slack-php

Wrapper for Slack Web API

  Sources   Download

MIT

The Requires

 

by Avatar palanik

api rest guzzle slack api wrapper slack-api wrapi slack wrapper

15/02 2016

v0.1.2

0.1.2.0 https://github.com/palanik/slack-php

Wrapper for Slack Web API

  Sources   Download

MIT

The Requires

 

by Avatar palanik

api rest guzzle slack api wrapper slack-api wrapi slack wrapper

30/11 2015

v0.1.0

0.1.0.0 https://github.com/wrapi/slack-php

Wrapper for Slack Web API

  Sources   Download

MIT

The Requires

 

by wrapi

api rest guzzle slack api wrapper slack-api wrapi slack wrapper