Skip to content
This repository has been archived by the owner on Dec 28, 2020. It is now read-only.

API SDK

Chris Carlevato edited this page Mar 27, 2017 · 1 revision

To aid in use of the Helios Calendar API a library is made available for easy access to API data. This library is included with all versions of Helios Calendar (2.2+) and is licensed under the LGPL allowing it to be used in a variety of deployments.

Class Structure

  • getEvents(method, format) - 1 = Current Events, 2 = Billboard, 3 = Most Popular, 4 = Newest
  • getCategories(method, format) - 1 = Hierarchical, 2 = Alphabetical (By Category Name), 3 = Event Count (Highest First)
  • getNewsletters(method, format) - 1 = Current (Newest First), 2 = Most Popular (By Average Combined Daily View Count)

Parameters

  • Type - The API method to request. (Numeric value)
  • Format - Structure for returned API data.
  • array - Array
  • object - stdClass Object
  • raw - JSON Encoded String (API output)

Sample Code

include_once('sdk/helios_calendar.php');
$hapi = new HeliosCalendar(array(
        'apiURL'  => 'API_URL',
        'apiUser' => 'YOUR_USERNAME',
        'apiKey'  => 'YOUR_KEY'));

$current_events_json = $hapi->getEvents(1, 'raw');
$newest_events_array = $hapi->getEvents(4, 'array');
$popular_events_obj = $hapi->getEvents(3, 'object');

$categories_json = $hapi->getCategories();

$newsletters_array = $hapi->getNewsletters(1, 'array');

SDK Changelog

Clone this wiki locally