l3l0 / php-travis-client
PHP implementation for travis API
Installs: 571
Dependents: 1
Suggesters: 0
Security: 0
Stars: 32
Watchers: 4
Forks: 12
Open Issues: 6
Requires
- php: >=5.3.0
- doctrine/common: ~2.2
- kriswallsmith/buzz: ~0.5
This package is not auto-updated.
Last update: 2024-12-15 03:17:44 UTC
README
It is simple PHP implementation of client using travisci api.
Installation
Download repository then download composer
using wget -nc http://getcomposer.org/composer.phar
So install command will look like php composer.phar install
Usage
Just look at tests :P . Basic example:
<?php require __DIR__ . '/vendor/autoload.php'; $client = new Travis\Client(); $repository = $client->fetchRepository('l3l0/OpenSocialBundle'); echo $repository->getId() . "\n"; echo $repository->getSlug() . "\n"; echo $repository->getLastBuild()->getId() . "\n"; echo $repository->getBuilds()->findOneBy(array('number' => 2))->getId() . "\n"; echo 'Builds:' . "\n"; foreach ($repository->getBuilds() as $build) { echo "\t" . $build->getId() . "\n"; }