simondavies/veezi-api-wrapper
Composer 安装命令:
composer require simondavies/veezi-api-wrapper
包简介
A simple PHP website wrapper for the Veezi API.
关键字:
README 文档
README
A basic PHP wrapper for the Veezi API.
THIS IS STILL IN DEVELOPEMENT AND CAN CHANGE
While being asked to look into the Veezi API, to enable a website to display its relevant film data onto the site, so not to duplicate work etc. I would need to do a bit of work to manipulate the current data returned, to be used on a website, so not being able to find any current PHP code for use with the Veezi API, thought be nice to build this and thne make it available to Veezi as well as others.
Official Documentation
Offical documentation on the Veezi API can be found Veezi API
Code Examples
Included within the repo is an examples folder, here you can find a few working examples of the various options.
Film Listings
Get and display a list of films

//-- get the autoload page require_once __DIR__ . '../../vendor/autoload.php'; //-- load in a some settings/configuration file. require_once __DIR__ . '/config.php'; use VeeziAPI\VeeziAPIWrapper as VeeziAPI; $Veezi = 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>'; }
Selected Film
//-- get the autoload page require_once __DIR__ . '../../vendor/autoload.php'; //-- load in a some settings/configuration file. require_once __DIR__ . '/config.php'; use VeeziAPI\VeeziAPIWrapper as VeeziAPI; $Veezi = 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();
There are also other options available to a film instance, some more below.
$film->getGenre()$film->getFormat()$film->getLanguage()$film->getDatesAndTimes()$film->getRoles()
There are also some that are returned as Arrays and other objects, take the $film->getStartDate(), what is returned is a Carbon instance, so it can be converted using any of the methods available through Carbon,
//-- set date as a readable date $film->getStartDate()->format('l jS \\of F Y');
Selected Film Poster
Currently it is NOT possible to gain access to the actual poster. As the posters are currently stored within the protected area of their severs, and in order gain access via a URL you will need to be signed in to the Veezi system.
So adding the url to the posters will fail for now. Veezi are looking into switchign this, so that they can also be referenced. in the mean time, in order to display posters, you will need to work on your own version/method.
If you need any ideas or solutions please feel free to contact me, on how i get around this.
Film Roles
Sort people and prepare a list of roles. (Actor/Director/Producer)
//-- 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> <?php echo '<ul class="list-unstyled">'; foreach ($roles['actors'] as $actors) { echo '<li>' . $actors . '</li>';} echo '</ul>'; ?> </div> <div class="col-md-4"> <h4>Directors</h4> <?php echo '<ul class="list-unstyled">'; foreach ($roles['directors'] as $directors) { echo '<li>' . $directors . '</li>';} echo '</ul>'; ?> </div> <div class="col-md-4"> <h4>Producers</h4> <?php echo '<ul class="list-unstyled">'; foreach ($roles['producers'] as $producers) { echo '<li>' . $producers . '</li>';} echo '</ul>'; ?> </div> </div> </div>
The output would be somethig like:
| Actors | Directors | Producers |
|---|---|---|
| Actor Name | Directors Name | Producers Name |
Film Dates/Times & Ticket Links
List the selected films Dates and times, with booking links on the times.
You can also get a list of dates and times for the selected film to display as clickable links to book tickets.
//-- 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>'; }
Requiremnents
- PHP >= 5.4.0
- Veezi Active Account
- Veezi API Token
- guzzlehttp/guzzle
- nesbot/Carbon
Installation
The recommended way to install this repo is through Composer
Install Through Composer
If your using thsi as the initial project then you can install via:
composer create-project simondavies/veezi-api-wrapper
Else to include within in a current project run
composer.phar require simondavies/veezi-api-wrapper
Install Via Github/Without Composer
Via SSH
git clone git@github.com:simondavies/Veezi-API-Wrapper.git target-directory
Via HTTPS
git clone https://github.com/simondavies/Veezi-API-Wrapper.git target-directory
Set Up
Once the project has been downloaded we need to continue the initial set up.
cd target-directory
composer update
Add a config file.
cd App
cp config.example.php config.php
Update the following details with your Veezi API and Site Tokens.
define('VEEZI_API_TOKEN', '?????????');
define('VEEZI_SITE_TOKEN', '??????????');
Once thats been done, you can check that all is OK by visiting the Examples folder within a Browser.
Please view the other required repos' install guidelines, if not installing from composer.
To Do
As this is currently on going I have a list of to do's below:
- Build the Film Classes
- Build the Cinema classe(s)
- Build the Screen classe(s)
- Add examples
- Create booking links for films
- Create film dates for each film
- More in-depth read me file or wiki
License
The Veezi-API-Wrapper is open-sourced software licensed under the MIT license
simondavies/veezi-api-wrapper 适用场景与选型建议
simondavies/veezi-api-wrapper 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 42 次下载、GitHub Stars 达 3, 最近一次更新时间为 2015 年 11 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「veezi」 「film listing」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 simondavies/veezi-api-wrapper 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 simondavies/veezi-api-wrapper 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 simondavies/veezi-api-wrapper 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
IMDB API that can fetch film data and search results
A PSR-7 compatible library for making CRUD API endpoints
Locale-Aware PHP IMDb Scraper, with a fluent API for searching for Movies and TV Shows, and retrieving detailed information about them.
Analog Bridge PHP Library
IMDB API that can fetch film data and search results
Vsphim's core features - Laravel package for movie CMS
统计信息
- 总下载量: 42
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-11-02
