Skip to content

pabloveintimilla/frekr

Repository files navigation

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

About

API wrapper of Frekr.me

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages