thiagorb / codeship
Client for accessing Codeship API
Installs: 11 337
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=7.1
- thiagorb/service-generator-runtime: ^0.3
Requires (Dev)
- php-http/guzzle6-adapter: ^2.0
- thiagorb/service-generator: ^0.3
- vimeo/psalm: ^3.0
This package is auto-updated.
Last update: 2025-01-23 23:00:33 UTC
README
A PHP Client to use the Codeship API.
Requirements
- PHP 7.1 or newer
- Composer
Installing
This project follows the PSR-18 convention, which means you can use any HTTP client implementation with it.
If you don't know which one to choose, you can use the guzzle adapter.
To install the client with guzzle using composer run:
composer require thiagorb/codeship php-http/guzzle6-adapter
Usage
-
Instantiate a factory
- Using guzzle:
$factory = new \Thiagorb\Codeship\Guzzle\Factory;
- Using another client:
$factory = new \Thiagorb\Codeship\Factory($client, $requestFactory);
-
Instantiate the client
$codeship = $factory->build('user@example.com', 'password');
- Ready to use
$firstOrganization = $codeship->accountOrganizations()->read()[0];
$projects = $codeship->organizations()
->find($firstOrganization->getUuid())
->projects()
->read();
foreach ($projects->getProjects() as $project) {
var_dump($project->getName());
}
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
License
This project is licensed under the MIT License - see the LICENSE file for details