kitchenu/chatwork-php

ChataWork API client library

1.0.2 2018-08-22 20:44 UTC

README

Build Status License

ChatWork API Client for PHP.

Installation

$ composer require kitchenu/chatwork-php

Usage

<?php

require 'vendor/autoload.php';

$client = new Kitchenu\Chatwork\Client('chatwork-api-token');

$response = $client->request('GET', 'me');

echo $response->mail;
// mail@example.com

How to request endpoint ( POST /rooms/{room_id}/messages )

$client->request('POST', 'rooms/123456789/messages', ['body' => 'Hello']);

or

$client->postRoomMessages([
    'room_id' => '123456789',
    'body' => 'Hello'
]);

Documentation