carerix / cxrest-client
Client library for easy access to Carerix REST API
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 5 345
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 2
Open Issues: 3
Requires
- ext-curl: *
- ext-json: *
- ext-libxml: *
- ext-simplexml: *
- adbario/php-dot-notation: ^3.3
- guzzlehttp/guzzle: ^7.0
Requires (Dev)
- ext-dom: *
- ext-xmlwriter: *
- nette/php-generator: ^3.4
- pdepend/pdepend: ^2.7
- phpmd/phpmd: ^2.8
- phpunit/phpunit: ^8.5
- squizlabs/php_codesniffer: ^3.5
- symfony/var-dumper: ^6.3
- zf1/zend-console-getopt: ~1.12
README
Client library to access your Carerix application via RESTful API (https://api.carerix.com)
Installation
Recommened way is to install the library using composer:
$ composer require carerx/cxrest-client
Basic usage
Bootstrapping:
use Carerix\Api\Rest\Client; use Carerix\Api\Rest\Manager; use Carerix\Api\Rest\Entity; $client = new Client(); $manager = new Manager($client); $manager->autoDiscoverEntities(); $manager->setUsername(CUSTOMER_NAME); $manager->setPassword(API_TOKEN); Entity::setManager($manager);
Usage (after entity manager was bootstrapped correctly):
use Carerix\Api\Rest\Entity\CREmployee; use Carerix\Api\Rest\Entity\CRUser; // get user by ID $user = CRUser::find(125); // apply for a job $params = array('x-cx-pub' => PUBLICATION_ID_GOES_HERE); $employee = new CREmployee(); $employee ->setFirstName('John') ->setLastName('Smith'); $employee->apply($params);
Resources
- http://development.wiki.carerix.com/cxwiki/doku.php?id=cxrest - RESTful API description
- http://development.wiki.carerix.com/cxwiki/doku.php?id=cxrest_api_methods - Detailed description of the methods provided by Carerix RESTful API
- http://development.wiki.carerix.com/cxwiki/doku.php?id=cxrest_api_client - Detailed description and examples for this Client Library
- http://development.wiki.carerix.com/cxwiki/doku.php?id=xml - all developers, examples of XML packages that can be used with Carerix RESTful API
To access these resources you'll have to apply a partner developer account.
License
All contents of this project is licensed under the MIT license. See LICENSE
file for details.
Acknowledgements
This project is highly inspired by Doctrine's (www.doctrine-project.org) implementation of the ActiveRecord pattern and Doctrine REST API Client.