Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

codex-team/capella.php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();

More

Get image by known id

use \Capella\Capella;

$image = Capella::image('abcdef-1234-abcd-1234');

More

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

More

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

MIT

Contacs

CodeX Team – ifmo.su