GithubHelp home page GithubHelp logo

bullhorn's Introduction

Bullhorn

This is a basic PHP wrapper around the Bullhorn SOAP API. A REST API is offered by Bullhorn, but I currently only have the means to access and test the SOAP API. Support for the REST API can be added if there is any interest.

Authenticating

Before you can issue any requests, you must create a new Bullhorn API session. It's really easy with the library!

// Start your Bullhorn API session. Keep your config options in a separate file
// that is not included in source control.
$bullhorn = new Bullhorn(
    $config['WSDL'],
    $config['PARAMS'],
    $config['USERNAME'],
    $config['PASSWORD'],
    $config['API_KEY']
);

// Or just do it inline...
$bullhorn = new Bullhorn(
    'https://api.bullhornstaffing.com/webservices-2.5/?wsdl',
    [
        'trace' => 1,
        'soap_version' => SOAP_1_1
    ],
    'your_username',
    'your_super_secret_password',
    'your_super_secret_api_key',
);

Supported Operations

Find

The find method retrieves a single entity with the ID you specify. See the Bullhorn documentation for detailed information.

// Find a candidate by their ID.
$candidate = $bullhorn->find('Candidate', 98261);

Tip: The find method first checks to see if the id you are passing in is an array. If an array is detected, find will pass the request on to the findMultiple method for you. This is helpful when passing the id(s) in from a query result and you aren't sure if one or many results were returned.

Find Multiple

The findMultiple method retrieves an array of entities matching the IDs you specify. See the Bullhorn documenation for detailed information.

// Find multiple jobs.
$jobs = $bullhorn->findMultiple('JobOrder', [100, 101]);

Query

The query method retrieves IDs of entities that match a query you specify. After retrieving the IDs, you can pass them to the find or findMultiple methods to get the entity details. See the Bullhorn documentation for detailed information.

// Get a candidate ID by email.
$candidateId = $bullhorn->query(
    [
        'entityName' => 'Candidate',
        'maxResults' => 1,
        'where' => 'isDeleted = 0 AND email = \'[email protected]\'',
        'distinct' => 0,
        'parameters' => []
    ]
);

// Now you can get the details for the candidate.
$candidate = $bullhorn->find('Candidate', $candidateId);

Available Entities

There are a ton of entities to work with in Bullhorn. Some examples are Appointment, Candidate, Note, and JobSubmission. Sea a full list of the available entities.

Coding Style

I use phpcs and phpcbf to clean up the files and conform as closely as possible to PSR-2.

bullhorn's People

Contributors

kkiernan avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.