Giter VIP home page Giter VIP logo

bamboohr's Introduction

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

Via Composer

$ composer require jeffreyhyer/bamboohr

Or add the following to your composer.json file:

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

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();

bamboohr's People

Contributors

jeffreyhyer avatar jesseschutt avatar mbrueggemann avatar michael-morris avatar mustafaculban avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bamboohr's Issues

PHP 8.0 Compatibility

Hi I was testing with PHP Code Sniffer - PHPCompatibility to see the current version supports

FILE: bamboohr/symfony/polyfill-intl-idn/bootstrap.php
--------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------
 129 | WARNING | The constant "INTL_IDNA_VARIANT_2003" is deprecated since PHP 7.2
 132 | WARNING | The constant "INTL_IDNA_VARIANT_2003" is deprecated since PHP 7.2
--------------------------------------------------------------------------------------------------------

FILE: bamboohr/symfony/polyfill-intl-normalizer/Normalizer.php
----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------
 91 | WARNING | INI directive 'mbstring.func_overload' is deprecated since PHP 7.2
----------------------------------------------------------------------------------------------------------------

If we update

"guzzlehttp/guzzle": "~7.0"

it resolved the compatibility issue for PHP 8.0

5.x

Would love 5.x support

Adding time-tracking data

Hi, this library looks to be more complete than the 'official' library, but I'm having issues adding time-tracking data (POSTing to the API).

The Api\TimeTracking::addRecord sends post() what must be (by its parameter type) an array of data, but then that data is put in as form-params, while the headers indicate 'application/json' is being sent, without any way for json to be in the body.

Without the array typehint, I can put Json into the body for Guzzle to send [->timetracking->addRecord(json_encode($times))]

I still can't get data posted to the API with the Json, but I'm hoping a sandbox account will help figure out why.

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.