Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 903 Bytes

README.md

File metadata and controls

40 lines (32 loc) · 903 Bytes

HeyTimeSheet

Unofficial PHP API for HeyUpdate.com

Requirement

This requires PHP 5.3 or later and a valid API key.

Usage

	require_once('HeyUpdateAPI.php')
	$hey = new HeyUpdateAPI("<<YOUR TOKEN>>", "https://api.heyupdate.com");

Getting Recent updates

The default behaviour of the API is to return 7 days of updates:

  $updates = $hey->Updates()->getRes();

Getting Custom Ranges

Use UpdatesByPeriod to get custom date ranges. Supports 'day', 'week' and 'month'.

  $day = $hey->UpdatesByPeriod("day")->getRes();
  $week = $hey->UpdatesByPeriod("week")->getRes();
  $month = $hey->UpdatesByPeriod("month")->getRes();

Filter results

  $filter_email = $hey->UpdatesByPeriod("month")->filterByEmail("hey@update.com")->getRes();
  $filter_name = $hey->UpdatesByPeriod("month")->filterByName("sam hermans")->getRes();