https://github.com/jdecool/clockify-api
PHP client for Clockify.me API https://clockify.me/developers-api
https://github.com/jdecool/clockify-api
api clockify hacktoberfest
Last synced: about 2 months ago
JSON representation
PHP client for Clockify.me API https://clockify.me/developers-api
- Host: GitHub
- URL: https://github.com/jdecool/clockify-api
- Owner: jdecool
- License: mit
- Created: 2019-09-19T16:59:12.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-11-23T17:48:58.000Z (over 1 year ago)
- Last Synced: 2025-05-13T17:09:31.652Z (about 2 months ago)
- Topics: api, clockify, hacktoberfest
- Language: PHP
- Homepage:
- Size: 78.1 KB
- Stars: 16
- Watchers: 5
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Clockify API client
====================[](https://actions-badge.atrox.dev/jdecool/clockify-api/goto?ref=master)
[](https://scrutinizer-ci.com/g/jdecool/clockify-api/?branch=master)
[](https://packagist.org/packages/jdecool/clockify-api)PHP client for [Clockify.me API](https://clockify.me/developers-api).
## Install it
You need to install the library with a PSR-18 compliant HTTP client.
Example using Guzzle:
```bash
composer require jdecool/clockify-api guzzlehttp/guzzle http-interop/http-factory-guzzle
```The library is decoupled from any HTTP message client with [HTTPlug](http://httplug.io).
That's why you need to install a client implementation `http://httplug.io/` in this example.## Getting started
### Use the HTTP client
```php
createClientV1('your-clockify-api-key');$workspaces = $client->get('workspaces');
```### Use the decicated API client
```php
require __DIR__.'/vendor/autoload.php';$builder = new JDecool\Clockify\ClientBuilder();
$client = $builder->createClientV1('your-clockify-api-key');$apiFactory = new JDecool\Clockify\ApiFactory($client);
$workspaceApi = $apiFactory->workspaceApi();$workspaces = $workspaceApi->workspaces(); // return an array of JDecool\Clockify\Model\WorkspaceDto
```Available APIs:
* [Client](https://clockify.me/developers-api#tag-Client)
* [Project](https://clockify.me/developers-api#tag-Project)
* [Tag](https://clockify.me/developers-api#tag-Tag)
* [Task](https://clockify.me/developers-api#tag-Task)
* [Time entry](https://clockify.me/developers-api#tag-Time-entry)
* [User](https://clockify.me/developers-api#tag-User)
* [Workspace](https://clockify.me/developers-api#tag-Workspace)## LICENSE
This library is licensed under the [MIT License](LICENSE).