API wrapper of Frekr

1.0.0-beta 2019-03-30 12:05 UTC

This package is auto-updated.

Last update: 2024-11-16 02:32:43 UTC


README

Coding Standards

Frekr

API wrapper of Frekr.me

Introduction

This is a PHP Library to recive data from Frekr.me API and convert to php objects. This reduce codification and abstract recive process

Installation

composer require pabloveintimilla/frekr

Use

Bootstrap.

Include to autoload classes

<?php
require __DIR__.'/vendor/autoload.php';

use PabloVeintimilla\Frekr\Frekr;

Init

You need apikey from Frekr.me

$frekr = new Frekr($apikey);

Calls to methods

All methods return a array or a POPO (Plain Old PHP object) that represent basic entities: Employee, Event and Terminal

// Recive all employees
$employees = $frekr->getEmployees();

//Recive specific employee by id
$employee = $frekr->getEmployee($employee_id);

//Get first name of employee
$employee->getFirstname();

$events = $frekr->getEvents();
$event = $frekr->getEvent($event_id);
$events = $frekr->getEventsByEmployee($employee_id));
$events = $frekr->getEventsByTerminal($terminal_id);
$terminals = $frekr->getTerminals();
$terminal = $frekr->getTerminal($terminal_id));