jonathanraftery/bullhorn-rest-client

Simple REST client for the Bullhorn API, including automated OAuth2 login

v0.3.1 2018-07-03 18:15 UTC

README

This package provides a simple client for the Bullhorn REST API.

Installation

$ composer require jonathanraftery/bullhorn-rest-client

Usage

use jonathanraftery\Bullhorn\Rest\Client as BullhornClient;

$client = new BullhornClient(
    'client-id',
    'client-secret'
);
$client->initiateSession(
    'username',
    'password'
);

$response = $client->request(
    'GET',
    'search/JobOrder?query=id:7777'
);

// session will automatically refresh if expiration detected
// or can be refreshed manually (shown with optional parameters)
$client->refreshSession(['ttl' => 60]);