PHP Класс Apple_Push_API\API

С версии: 0.2.0
Показать файл Открыть проект

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

Метод Описание
__construct ( $endpoint, $credentials, $debug = false ) Constructor.
delete_article ( integer $article_id ) : object Deletes an article using a DELETE request.
get_article ( integer $article_id ) : object Gets article information.
get_channel ( string $channel_uuid ) : object Gets channel information.
get_section ( string $section_id ) : object Gets information for a section.
get_sections ( string $channel_uuid ) : object Gets all sections in the given channel.
post_article_to_channel ( string $article, string $channel_uuid, array $bundles = [], array $meta = [] ) : object Sends a new article to a given channel.
update_article ( string $uid, $revision, string $article, array $bundles = [], $meta = [] ) : object Updates an existing article to a given channel.

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

Метод Описание
send_delete_request ( string $url ) : object Send a delete request.
send_get_request ( string $url ) : object Send a get request.
send_post_request ( string $url, string $article, array $bundles, array $meta = null ) : object Send a post request.

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

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

Constructor.
public __construct ( $endpoint, $credentials, $debug = false )

delete_article() публичный метод

Deletes an article using a DELETE request.
С версии: 0.4.0
public delete_article ( integer $article_id ) : object
$article_id integer
Результат object

get_article() публичный метод

Gets article information.
С версии: 0.2.0
public get_article ( integer $article_id ) : object
$article_id integer
Результат object

get_channel() публичный метод

Gets channel information.
С версии: 0.2.0
public get_channel ( string $channel_uuid ) : object
$channel_uuid string
Результат object

get_section() публичный метод

Gets information for a section.
С версии: 0.2.0
public get_section ( string $section_id ) : object
$section_id string
Результат object

get_sections() публичный метод

Gets all sections in the given channel.
С версии: 0.2.0
public get_sections ( string $channel_uuid ) : object
$channel_uuid string
Результат object

post_article_to_channel() публичный метод

Sends a new article to a given channel.
С версии: 0.2.0
public post_article_to_channel ( string $article, string $channel_uuid, array $bundles = [], array $meta = [] ) : object
$article string The JSON string representing the article
$channel_uuid string
$bundles array An array of file paths for the article attachments
$meta array
Результат object

update_article() публичный метод

Updates an existing article to a given channel.
С версии: 0.2.0
public update_article ( string $uid, $revision, string $article, array $bundles = [], $meta = [] ) : object
$uid string
$article string The JSON string representing the article
$bundles array An array of file paths for the article attachments
Результат object