Capella.php
PHP SDK for CodeX Capella project
Install / Use
/learn @codex-team/Capella.phpREADME
PHP SDK for CodeX Capella
This repository provides PHP SDK for working with the Capella API
Installation
$ composer require codex-team/capella
Or just clone this repository and include src/Capella.php to your bootstrap file.
Usage
First, read CodeX Capella documentation.
Uploading
use \Capella\Capella;
$image = Capella::upload('path-or-url-to-your-picture');
$url = $image->url();
Get image by known id
use \Capella\Capella;
$image = Capella::image('abcdef-1234-abcd-1234');
Working with filters
use \Capella\Capella;
$image = Capella::upload('picture.jpg');
$url = $image->resize(100)->url();
echo $url; // https://capella.pics/<id>/resize/100
$url = $image->crop(100, 200);
echo $url; // https://capella.pics/<id>/crop/100x200
Docs
CodeX Capella documentation
Full PHP SDK documentation
Requirements
php >= 5.6
php-curl
Contribution
Ask a question or report a bug on the create issue page.
Know how to improve PHP SDK for Capella? Fork it and send pull request.
You can also write questions and suggestions to the CodeX Team’s email.
License
Contacs
CodeX Team – ifmo.su
