PHP Class CloudConvert\Api

Http connections use guzzle http client api and result of request are object from this http wrapper
Author: Josias Montag ([email protected])
Afficher le fichier Open project: cloudconvert/cloudconvert-php

Méthodes publiques

Méthode Description
__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

Private Methods

Méthode Description
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.

Method Details

__construct() public méthode

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() public méthode

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
Résultat Process

createProcess() public méthode

Create a new Process
public createProcess ( array $parameters ) : Process
$parameters array Parameters for creating the Process. See https://cloudconvert.com/apidoc#create
Résultat Process

delete() public méthode

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() public méthode

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() public méthode

Get the current API Key
public getApiKey ( ) : string
Résultat string

getHttpClient() public méthode

Return instance of http client
public getHttpClient ( ) : Client
Résultat GuzzleHttp\Client

post() public méthode

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() public méthode

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