mbrueggemann / bamboohr

PHP SDK for the BambooHR API

Home Page:https://jeffreyhyer.github.io/bamboohr/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BambooHR PHP SDK

This repository contains a PHP SDK for use with the BambooHR API.

If you're looking to use this package inside a Laravel application you may want to check out this package instead: jeffreyhyer/bamboohr-laravel. It wraps this package in a Service Provider and provides access via a Facade so the API is the same but you'll write less code and get the same results 👍

DISCLAIMER: This is NOT an official SDK, it is not affiliated with nor endorsed by BambooHR in any way.

Installation

NOTE: This package currently requires PHP >= 7.0.0

If you have a need for PHP 5.x support let me know by opening an issue (or feel free to submit a pull request).

Via Composer

$ composer require jeffreyhyer/bamboohr

Or add the following to your composer.json file:

{
    "require": {
        "jeffreyhyer/bamboohr": "~1.0.4"
    }
}

From within the same directory as your composer.json file execute:

$ composer install

In your PHP file (if you're not using a fancy framework that handles autoloading for you):

<?php

require './vendor/autoload.php';

Usage

From within your PHP application you can access the BambooHR API with just a couple lines:

<?php

require './vendor/autoload.php';

use BambooHR\BambooHR;

$api_token = "[BAMBOOHR API TOKEN]";
$company = "[BAMBOO COMPANY NAME]";

$bamboo = new BambooHR($company, $api_token);

// Get the employee directory
$employees = $bamboo->employees->directory();

About

PHP SDK for the BambooHR API

https://jeffreyhyer.github.io/bamboohr/

License:MIT License


Languages

Language:PHP 85.6%Language:HTML 8.9%Language:CSS 5.5%