PHP Класс Automattic\Wistia\Client

Наследование: use trait Automattic\Wistia\Traits\ApiMethodsTrait
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$client object The HTTP client
$format string Response format
$last_response_code integer The response code of the last request

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

Метод Описание
__construct ( array $params ) Init the HTTP Client
__wakeup ( ) Prevent unserialization
create_media ( string $file, array $query = [] ) : object Create a new media. Wistia handles upload differently than other methods.
delete ( $endpoint, $query = [] ) : string Send a DELETE request
get ( $endpoint, $query = [] ) : string Send a GET request
get_client ( ) : object Returns the client
get_token ( ) : string Get the token
post ( $endpoint, $query = [] ) : string Send a POST request
put ( $endpoint, $query = [] ) : string Send a PUT request

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

Метод Описание
_make_request ( string $type, string $endpoint, $query = [] ) : string Make a request

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

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

Init the HTTP Client
public __construct ( array $params )
$params array

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

Prevent unserialization
public __wakeup ( )

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

The API endpoint is different and the parameters are completely different. We need a new Client to handle this kind of requests.
public create_media ( string $file, array $query = [] ) : object
$file string
$query array
Результат object

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

Send a DELETE request
public delete ( $endpoint, $query = [] ) : string
Результат string

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

Send a GET request
public get ( $endpoint, $query = [] ) : string
Результат string

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

Returns the client
public get_client ( ) : object
Результат object

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

Get the token
public get_token ( ) : string
Результат string

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

Send a POST request
public post ( $endpoint, $query = [] ) : string
Результат string

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

Send a PUT request
public put ( $endpoint, $query = [] ) : string
Результат string

Описание свойств

$client публичное свойство

The HTTP client
public object $client
Результат object

$format публичное свойство

Response format
public string $format
Результат string

$last_response_code публичное свойство

The response code of the last request
public int $last_response_code
Результат integer