Download the PHP package neleid/chatwork-sdk without Composer
On this page you can find all versions of the php package neleid/chatwork-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download neleid/chatwork-sdk
More information about neleid/chatwork-sdk
Files in neleid/chatwork-sdk
Package chatwork-sdk
Short Description Just a non-official SDK for Chatwork
License GPL-3.0
Informations about the package chatwork-sdk
Chatwork SDK for PHP
Remember that this SDK is non-official. It may not work when Chatwork update their APIs in the feature.
This project is forked from wataridori/chatwork-sdk and added some features. If you want to use original repository, you should check wataridori/chatwork-sdk.
This repository is registered to Packagist. So you can use composer to install this repository with 'neleid/chatwork-sdk'.
Chatwork SDK supports Chatwork API version 2
Check the Chatwork API Document here
English API Document is here
Differences with original repository
- Added support for Chatwork API usage limits. You can get API Usage Limits information after successfull API call.
- Added support for Chatwork 'self_unread' feature. This enables the messages you posted unread. (It means you will be notified with chime.)
- Changed namespace from wataridori to Neleid.
- PHP Requirements is up to 7.0 from 5.4.
Requirement
- PHP >= 7.0
- PHP cURL
Install
You can install and manage Chatwork SDK for PHP by using Composer
Or add neleid/chatwork-sdk
into the require section of your composer.json
file then run composer update
Usage
Firstly, to use Chatwork API, you must register an API Key.
Pass your key to ChatworkSDK
class.
If you have problems with the SSL Certificate Verification, you can turn it off by the following setting.
Now you can easily use many functions to access Chatwork API Endpoints.
ChatworkSDK's Classes
ChatworkAPI: This is the class that contains base API. You can use it to send request to Chatwork and receive the response in array.
ChatworkSDK also provides many others class that help you to work in more object oriented way.
- ChatworkRoom: Use for store Room Information, with many functions to work with Room
- ChatworkUser: Use for store User Information.
- ChatworkMessage: Use for store Message Information.
The 3 classes above are extended from the ChatworkBase
class. ChatworkBase
provides you some useful function to work with messages.
You can easily build a TO message, REPLY or QUOTE message.
Run test
- Create a file named
config.json
inside thetests/fixtures/
folder. -
Input your API Key, and a test Room into
config.json
file. It should look like this: - Then run
phpunit
to start testing.
Contribution
View contribution guidelines here