yongzhenlow / slack-api

A super simple PHP wrapper for Slack API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Slack API

A super simple wrapper for Slack API

Requires > PHP 5.

Installation

Download and include the php file.

Usage

See more methods on the Slack API documentation.

Initializing
Requires a legacy token, read more about it here.

$Slack = new Slack('xoxp-your-legacy-token');

List users

$Slack = new Slack('xoxp-your-legacy-token');
print_r($Slack->call('users.list'));

Invite user to a channel

$Slack = new Slack('xoxp-your-legacy-token');
print_r($Slack->call('channels.invite', array(
  'channel' => 'C1234567890',
  'user' => 'U1234567890'
)));

Author

License

Copyright (c) 2014

Licensed under the MIT License.

About

A super simple PHP wrapper for Slack API

License:MIT License


Languages

Language:PHP 100.0%