jobsity/php-tick

A PHP client for Tickspot API v2

1.0.0 2015-11-18 16:33 UTC

This package is not auto-updated.

Last update: 2024-11-05 05:24:09 UTC


README

A PHP client for Tickspot API. Currently supports v2 of the API.

Latest Stable Version Total Downloads Latest Unstable Version License

Requirements

  • PHP >= 5.5.0
  • guzzlehttp/guzzle ^6.0
  • mefworks/log ^1.0

Development Requirements

  • phpunit/phpunit ^4.6.0

##Available endpoints

  • Entry
  • Task
  • Project

How to use

###Credentials Get your access token and subscription ID from Tickspot

###API calls

All calls to Tickspot's API are made over HTTPS protocol.

###Example

// Make sure you require autoload file somewhere
require_once "../vendor/autoload.php";

use Jobsity\PhpTick\Tick;

// Get instance of Tick client
$tick = Tick::getInstance($subscriptionId, $accessToken, 'CompanyName', 'company@email.com');

// Start using the api

// Get entries created after 2015-11-14
$tick->entry->getList('2015-11-14');

// Get entry by its id
$tick->entry->get($entryId);

// Create entry with required parameters: hours, date, notes and task which entry belongs
$tick->entry->create(5, '2015-11-14', 'notes', '687756');

// Update entry atributes, with entry id as first parameter and hours as parameter for update
$tick->entry->update('56565', 3);

// Delete entry by its id
$tick->entry->delete($entryId);