PHP Класс CloudConvert\Api

Http connections use guzzle http client api and result of request are object from this http wrapper
Автор: Josias Montag ([email protected])
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( string $api_key, Client $http_client = null ) Construct a new wrapper instance
convert ( array $parameters ) : Process Shortcut: Create a new Process and start it
createProcess ( array $parameters ) : Process Create a new Process
delete ( string $path, string $content = null, boolean $is_authenticated = true ) Wrap call to CloudConvert APIs for DELETE requests
get ( string $path, string $content = null, boolean $is_authenticated = true ) Wrap call to CloudConvert APIs for GET requests
getApiKey ( ) : string Get the current API Key
getHttpClient ( ) : Client Return instance of http client
post ( string $path, string $content, boolean $is_authenticated = true ) Wrap call to CloudConvert APIs for POST requests
put ( string $path, string $content, boolean $is_authenticated = true ) Wrap call to CloudConvert APIs for PUT requests

Приватные методы

Метод Описание
rawCall ( string $method, string $path, string $content = null, boolean $is_authenticated = true ) : mixed This is the main method of this wrapper. It will sign a given query and return its result.

Описание методов

__construct() публичный Метод

Construct a new wrapper instance
public __construct ( string $api_key, Client $http_client = null )
$api_key string Key of your application. You can get your API Key on https://cloudconvert.com/user/profile
$http_client GuzzleHttp\Client Instance of http client

convert() публичный Метод

Shortcut: Create a new Process and start it
public convert ( array $parameters ) : Process
$parameters array Parameters for starting the Process. See https://cloudconvert.com/apidoc#start
Результат Process

createProcess() публичный Метод

Create a new Process
public createProcess ( array $parameters ) : Process
$parameters array Parameters for creating the Process. See https://cloudconvert.com/apidoc#create
Результат Process

delete() публичный Метод

Wrap call to CloudConvert APIs for DELETE requests
public delete ( string $path, string $content = null, boolean $is_authenticated = true )
$path string path ask inside api
$content string content to send inside body of request
$is_authenticated boolean if the request use authentication

get() публичный Метод

Wrap call to CloudConvert APIs for GET requests
public get ( string $path, string $content = null, boolean $is_authenticated = true )
$path string path ask inside api
$content string content to send inside body of request
$is_authenticated boolean if the request use authentication

getApiKey() публичный Метод

Get the current API Key
public getApiKey ( ) : string
Результат string

getHttpClient() публичный Метод

Return instance of http client
public getHttpClient ( ) : Client
Результат GuzzleHttp\Client

post() публичный Метод

Wrap call to CloudConvert APIs for POST requests
public post ( string $path, string $content, boolean $is_authenticated = true )
$path string path ask inside api
$content string content to send inside body of request
$is_authenticated boolean if the request use authentication

put() публичный Метод

Wrap call to CloudConvert APIs for PUT requests
public put ( string $path, string $content, boolean $is_authenticated = true )
$path string path ask inside api
$content string content to send inside body of request
$is_authenticated boolean if the request use authentication