aozora0000 / php-idobata
idobata api wrapper
dev-master
2014-12-16 06:31 UTC
Requires
- rmccue/requests: ~1.6
Requires (Dev)
- phpunit/phpunit: ~4.3
This package is not auto-updated.
Last update: 2024-12-17 09:05:32 UTC
README
for simple send message to Idobata API
Environment
- php 5.3
- php 5.4
- php 5.5
** caution **
hhvm don't working
Install
composer.json
"require": {
"aozora0000/phpidobata": "dev-master"
}
shell
$ composer install
How to use
New Instance
$idobata = new Idobata(INSERT_HOOK_ID);
setMessage
$idobata->setMessage("テスト送信")->send();
setLabel
setLabel([label-class],[message])
$idobata->setLabel(Idobta::LABEL_IMPORTANT,"緊急!")->send();
setBadge
setBadge([badge-class],[message])
$idobata->setBadge(Idobta::BADGE_WARNING,2)->send();
setTimestamp
setTimestamp([timestamp])
$idobata->setTimestamp(date('Y-m-d H:i:s'))->send();
Label/Badge Class
Label
LABEL_NORMAL ""
LABEL_IMPORTANT "label-important"
LABEL_WARNING "label-warning"
LABEL_SUCCSESS "label-success"
LABEL_INFO "label-info"
LABEL_INVERSE "label-inverse"
Badge
BADGE_NORMAL ""
BADGE_IMPORTANT "badge-important"
BADGE_WARNING "badge-warning"
BADGE_SUCCSESS "badge-success"
BADGE_INFO "badge-info"
BADGE_INVERSE "badge-inverse"