jobsity / php-tick
PHP客户端用于Tickspot API v2
1.0.0
2015-11-18 16:33 UTC
Requires
- php: >=5.5.0
- guzzlehttp/guzzle: ^6.0
- mefworks/log: ^1.0
Requires (Dev)
- phpunit/phpunit: ^4.6.0
This package is not auto-updated.
Last update: 2024-09-24 04:49:25 UTC
README
Tickspot API的PHP客户端。目前支持API的v2版本。
要求
- PHP
>= 5.5.0
- guzzlehttp/guzzle
^6.0
- mefworks/log
^1.0
开发要求
- phpunit/phpunit
^4.6.0
##可用的端点
- 入口
- 任务
- 项目
如何使用
###凭据 从Tickspot获取您的访问令牌和订阅ID
###API调用
所有对Tickspot API的调用都通过HTTPS协议进行。
###示例
// Make sure you require autoload file somewhere require_once "../vendor/autoload.php"; use Jobsity\PhpTick\Tick; // Get instance of Tick client $tick = Tick::getInstance($subscriptionId, $accessToken, 'CompanyName', 'company@email.com'); // Start using the api // Get entries created after 2015-11-14 $tick->entry->getList('2015-11-14'); // Get entry by its id $tick->entry->get($entryId); // Create entry with required parameters: hours, date, notes and task which entry belongs $tick->entry->create(5, '2015-11-14', 'notes', '687756'); // Update entry atributes, with entry id as first parameter and hours as parameter for update $tick->entry->update('56565', 3); // Delete entry by its id $tick->entry->delete($entryId);