Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mybuilder/when-i-work-api
Library for retrieving data from WhenIWork.com api
https://github.com/mybuilder/when-i-work-api
php php-library
Last synced: about 1 month ago
JSON representation
Library for retrieving data from WhenIWork.com api
- Host: GitHub
- URL: https://github.com/mybuilder/when-i-work-api
- Owner: mybuilder
- License: mit
- Created: 2015-07-01T09:57:24.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-09-28T12:53:10.000Z (about 2 years ago)
- Last Synced: 2024-04-28T16:05:37.347Z (8 months ago)
- Topics: php, php-library
- Language: PHP
- Homepage:
- Size: 35.2 KB
- Stars: 2
- Watchers: 14
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
When I Work library
=====================This library support connection and retrieval of data from WhenIWork.com API. At least PHP 7.4 is required.
Docs:
http://dev.wheniwork.com```php
require_once __DIR__ . '/vendor/autoload.php';
use MyBuilder\Library\WhenIWork\Repository\PayrollRepository;
use MyBuilder\Library\WhenIWork\Repository\UserRepository;
use MyBuilder\Library\WhenIWork\Service\WhenIWorkApi;$serializer = JMS\Serializer\SerializerBuilder::create()->build();
$client = new GuzzleHttp\Client();
$whenIWorkApi = new WhenIWorkApi($client, 'your-developer-key', 'user-email', 'user-password');
$userRepository = new UserRepository($whenIWorkApi, $serializer);
$payrollRepository = new PayrollRepository($whenIWorkApi, $serializer);
```### List of all users:
```php
$users = $userRepository->findAll();
```### List of all payroll periods:
```php
$payrolls = $payrollRepository->findByPeriod();
```Todos:
- Add more models that are supported via WhenIWork API
- Add more functions that are supported via WhenIWork API