PHP code example of simondavies / veezi-api-wrapper
1. Go to this page and download the library: Download simondavies/veezi-api-wrapper library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
simondavies / veezi-api-wrapper example snippets
//-- get the autoload page
ngs/configuration file.
= new VeeziAPI(VEEZI_API_TOKEN);
//--get a list of all films
$films = $Veezi->films();
//--loop throught the result and list by film title
foreach ($films as $film) {
echo '<a href="film.php?filmid=' . $film->getId() . '">' . $film->getTitle() . '</a>';
}
//-- get the autoload page
ngs/configuration file.
= new VeeziAPI(VEEZI_API_TOKEN);
//--get a selected film
$film = $Veezi->selectedFilm($film_id);
//-- film title
$film_title = $film->getTitle();
//-- film synopsis
$film_synopsis = $film->getSynopsis();
//--film people Actor, Director, Producer
$film_people = $film->getPeople();
//-- set date as a readable date
$film->getStartDate()->format('l jS \\of F Y');
//-- return a list of roles and the people for each role
$roles = $film->getRoles();
<div class="row">
<div class="col-md-4">
<h4>Actors</h4>
echo '<ul class="list-unstyled">';
foreach ($roles['actors'] as $actors) { echo '<li>' . $actors . '</li>';}
echo '</ul>';
//-- Get the films dates and times
$film_start_dates = $film->getDatesAndTimes();
//-- Out put the Dates and times
foreach ($film_start_dates as $date => $times) {
echo '<h5>' . $date . '</h5>';
echo '<div class="btn-group" role="group" aria-label="">';
foreach ($times as $time) {
echo '<a class="btn btn-info"
href="' . $time['link'] . '?siteToken=' . VEEZI_SITE_TOKEN . '"
target="_blank">' . $time['time'] . '</a>';
}
echo '</div>';
}