PHP Class Apple_Push_API\Request\Request

Since: 0.2.0
Exibir arquivo Open project: alleyinteractive/apple-news Class Usage Examples

Public Methods

Method Description
__construct ( Credentials $credentials, boolean $debug = false, Mime_Builder $mime_builder = null ) Constructor.
delete ( string $url ) : mixed Sends a DELETE request for the given article and bundles.
get ( string $url ) : mixed Sends a GET request for the given article and bundles.
post ( string $url, string $article, array $bundles = [], array $meta = null ) : mixed Sends a POST request with the given article and bundles.

Private Methods

Method Description
build_content ( string $article, array $bundles = [], array $meta = [] ) : string Parses the API response and checks for errors.
parse_response ( array $response, boolean $json = true, string $type = 'post', array $meta = null, array $bundles = null, string $article = '', $debug_mime_request = '' ) : mixed Parses the API response and checks for errors.
sign ( string $url, string $verb, string $content = null ) : array Signs the API request.

Method Details

__construct() public method

Constructor.
public __construct ( Credentials $credentials, boolean $debug = false, Mime_Builder $mime_builder = null )
$credentials Credentials
$debug boolean
$mime_builder Mime_Builder

delete() public method

Sends a DELETE request for the given article and bundles.
Since: 0.2.0
public delete ( string $url ) : mixed
$url string
return mixed

get() public method

Sends a GET request for the given article and bundles.
Since: 0.2.0
public get ( string $url ) : mixed
$url string
return mixed

post() public method

Sends a POST request with the given article and bundles.
Since: 0.2.0
public post ( string $url, string $article, array $bundles = [], array $meta = null ) : mixed
$url string
$article string
$bundles array
$meta array
return mixed