Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-11-23T17:48:58.000Z (about 1 year ago)
- Last Synced: 2024-04-24T23:20:14.899Z (9 months ago)
- Topics: api, clockify, hacktoberfest
- Language: PHP
- Homepage:
- Size: 78.1 KB
- Stars: 15
- Watchers: 6
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Clockify API client
====================[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fjdecool%2Fclockify-api%2Fbadge%3Fref%3Dmaster&style=flat)](https://actions-badge.atrox.dev/jdecool/clockify-api/goto?ref=master)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/jdecool/clockify-api/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/jdecool/clockify-api/?branch=master)
[![Latest Stable Version](https://poser.pugx.org/jdecool/clockify-api/v/stable.png)](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).