agykoala/slack
Composer 安装命令:
composer require agykoala/slack
包简介
Access your Slack Team's API through PHP objects
关键字:
README 文档
README
Access your Slack Team's API through PHP objects.
Documentation
- Getting started - Before you use this library, you need to generate a token or setup oAuth.
- Installation - Information on installing this library through composer or as a git submodule.
- Usage - A few simple examples on how to access the Slack API using this library
- API methods - Detailed information on each of Slack's API methods and how to access them using this library's
Payloadclasses. - Events - Examples for listening to events fired by the
ApiClient
Features
- Access all of Slack's API methods with dedicated payload classes (see usage documentation)
- Payloads and responses follow the same definitions as described in the official documentation (with a few exceptions where I think it would make a better distinction).
- Data between you and Slack is serialized using the JMS Serializer package, allowing fully spec-ed PHP objects to be used for working with the API.
- Code has been highly abstracted to support re-use in more specific implementations (see SlackBundle)
Further reading
I've done my best to include links to the official documentation in the code where appropriate.
Still, you should really check out the API documentation of Slack yourself to get a better understanding of exactly what each API method does and what data it will return.
If you feel there is some part of this package that you would like to see documented in more detail, please don't hesitate to create an issue for it.
Contributing
Got a good idea for this project? Found a nasty bug that needs fixing? That's great! Before submitting your PR though, make sure it complies with the contributing guide to speed up the merging of your code.
Missing methods
The following methods have not yet been implemented, why not contribute and add some yourself?
- files.delete*
- pins.add
- pins.list
- pins.remove
- reactions.add
- reactions.get
- reactions.list
- reactions.remove
- team.accessLogs
- team.info
* = issue/PR has been opened for this method
Related packages
- Slack CLI - CLI application for all of the Slack API methods.
- SlackBundle - Symfony Bundle providing integration with this library package.
Attributions
- The Slack staff, for making an awesome product and very clean API documentation.
FAQ
Why am I getting a cURL 60 error when attempting to connect to the Slack API?
Under the hood this library uses Guzzle to connect to the Slack API, and Guzzle's default method for sending HTTP requests is cURL.
The full error code is CURLE_SSL_CACERT: Peer certificate cannot be authenticated with known CA certificates and may be due, especially on Windows or OS X, to Guzzle not being able to find an up to date CA certificate bundle on the operating system.
To fix this you first create the Guzzle client manually using an alternative CA cert bundle, or disabling peer verification (not recommended for security reasons), and pass it to the API Client.
$client = new \GuzzleHttp\Client(); $client->setDefaultOption('verify', 'C:\Program Files (x86)\Git\bin\curl-ca-bundle.crt'); // continue as normal, using the client above $apiClient = new ApiClient('api-token-here', $client);
If you get a different error code you can look at the list of cURL error codes, or consult the Guzzle documentation directly.
agykoala/slack 适用场景与选型建议
agykoala/slack 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.5k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 04 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「chat」 「slack」 「slack api」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 agykoala/slack 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 agykoala/slack 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 agykoala/slack 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This simple PHP class allows you to easily generate Smartsupp.com JS chat code.
Client for the REST API plugin of the OpenFire Server
A Highly Opinionated Symfony3/4 Deployer Recipe
This bundle provides integration with the Slack API library, allowing you to interact with the Slack API from within your Symfony projects
A PSR-7 compatible library for making CRUD API endpoints
统计信息
- 总下载量: 2.5k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-04-24