$api_key_id
$api_key_id : \ChapterThree\AppleNewsAPI\PublisherAPI\(string)
PublisherAPI Abstract class
__construct(\ChapterThree\AppleNewsAPI\PublisherAPI\(string) $key, \ChapterThree\AppleNewsAPI\PublisherAPI\(string) $secret, \ChapterThree\AppleNewsAPI\PublisherAPI\(string) $endpoint)
Initialize variables needed in the communication with the API.
\ChapterThree\AppleNewsAPI\PublisherAPI\(string) | $key | API Key. |
\ChapterThree\AppleNewsAPI\PublisherAPI\(string) | $secret | API Secret Key. |
\ChapterThree\AppleNewsAPI\PublisherAPI\(string) | $endpoint | API endpoint URL. |
get(\ChapterThree\AppleNewsAPI\PublisherAPI\(string) $path, \ChapterThree\AppleNewsAPI\PublisherAPI\(array) $path_args, \ChapterThree\AppleNewsAPI\PublisherAPI\(array) $data) : object
Create GET request to a specified endpoint.
\ChapterThree\AppleNewsAPI\PublisherAPI\(string) | $path | Path to API endpoint. |
\ChapterThree\AppleNewsAPI\PublisherAPI\(array) | $path_args | Endpoint path arguments to replace tokens in the path. |
\ChapterThree\AppleNewsAPI\PublisherAPI\(array) | $data | Raw content of the request or associative array to pass to endpoints. |
Preprocessed structured object.
post(\ChapterThree\AppleNewsAPI\PublisherAPI\(string) $path, \ChapterThree\AppleNewsAPI\PublisherAPI\(array) $path_args, \ChapterThree\AppleNewsAPI\PublisherAPI\(array) $data) : object
Create POST request to a specified endpoint.
\ChapterThree\AppleNewsAPI\PublisherAPI\(string) | $path | Path to API endpoint. |
\ChapterThree\AppleNewsAPI\PublisherAPI\(array) | $path_args | Endpoint path arguments to replace tokens in the path. |
\ChapterThree\AppleNewsAPI\PublisherAPI\(array) | $data | Raw content of the request or associative array to pass to endpoints. |
Preprocessed structured object.
delete(\ChapterThree\AppleNewsAPI\PublisherAPI\(string) $path, \ChapterThree\AppleNewsAPI\PublisherAPI\(array) $path_args, \ChapterThree\AppleNewsAPI\PublisherAPI\(array) $data) : object
Create DELETE request to a specified endpoint.
\ChapterThree\AppleNewsAPI\PublisherAPI\(string) | $path | Path to API endpoint. |
\ChapterThree\AppleNewsAPI\PublisherAPI\(array) | $path_args | Endpoint path arguments to replace tokens in the path. |
\ChapterThree\AppleNewsAPI\PublisherAPI\(array) | $data | Raw content of the request or associative array to pass to endpoints. |
Preprocessed structured object and returns 204 No Content on success, with no response body.
triggerError(\ChapterThree\AppleNewsAPI\PublisherAPI\(string) $message, \ChapterThree\AppleNewsAPI\PublisherAPI\(const) $message_type = E_USER_NOTICE)
Error handler.
\ChapterThree\AppleNewsAPI\PublisherAPI\(string) | $message | Error message to display. |
\ChapterThree\AppleNewsAPI\PublisherAPI\(const) | $message_type | Predefined Constants |
hhmac(\ChapterThree\AppleNewsAPI\PublisherAPI\(string) $string, \ChapterThree\AppleNewsAPI\PublisherAPI\(string) $api_key_secret) : \ChapterThree\AppleNewsAPI\PublisherAPI\(string)
Generate HMAC cryptographic hash.
\ChapterThree\AppleNewsAPI\PublisherAPI\(string) | $string | Message to be hashed. |
\ChapterThree\AppleNewsAPI\PublisherAPI\(string) | $api_key_secret | Shared secret key used for generating the HMAC. |
Authorization token used in the HTTP headers.
auth(\ChapterThree\AppleNewsAPI\PublisherAPI\(string) $string = '') : \ChapterThree\AppleNewsAPI\PublisherAPI\(string)
Create canonical version of the request as a byte-wise concatenation.
\ChapterThree\AppleNewsAPI\PublisherAPI\(string) | $string | String to concatenate (see POST method). |
HMAC cryptographic hash
initVars(\ChapterThree\AppleNewsAPI\PublisherAPI\(string) $method, \ChapterThree\AppleNewsAPI\PublisherAPI\(string) $path, \ChapterThree\AppleNewsAPI\PublisherAPI\(array) $path_args, \ChapterThree\AppleNewsAPI\PublisherAPI\(array) $data)
Initialize variables needed to make a request.
\ChapterThree\AppleNewsAPI\PublisherAPI\(string) | $method | Request method (POST/GET/DELETE). |
\ChapterThree\AppleNewsAPI\PublisherAPI\(string) | $path | Path to API endpoint. |
\ChapterThree\AppleNewsAPI\PublisherAPI\(array) | $path_args | Endpoint path arguments to replace tokens in the path. |
\ChapterThree\AppleNewsAPI\PublisherAPI\(array) | $data | Data to pass to the endpoint. |
request(\ChapterThree\AppleNewsAPI\PublisherAPI\(array|\ChapterThree\AppleNewsAPI\PublisherAPI\string) $data) : \ChapterThree\AppleNewsAPI\PublisherAPI\(object)
Create HTTP request.
\ChapterThree\AppleNewsAPI\PublisherAPI\(array|\ChapterThree\AppleNewsAPI\PublisherAPI\string) | $data | Raw content of the request or associative array to pass to endpoints. |
HTTP Response object.
response(\ChapterThree\AppleNewsAPI\PublisherAPI\(object) $response) : \ChapterThree\AppleNewsAPI\PublisherAPI\(object)
Preprocess HTTP response.
\ChapterThree\AppleNewsAPI\PublisherAPI\(object) | $response | Structured object. |
HTTP Response object.
onErrorResponse(\ChapterThree\AppleNewsAPI\PublisherAPI\(int) $error_code, \ChapterThree\AppleNewsAPI\PublisherAPI\(string) $error_message, \ChapterThree\AppleNewsAPI\PublisherAPI\(object) $response)
Callback for error HTTP response.
\ChapterThree\AppleNewsAPI\PublisherAPI\(int) | $error_code | HTTP status code. |
\ChapterThree\AppleNewsAPI\PublisherAPI\(string) | $error_message | HTTP status message. |
\ChapterThree\AppleNewsAPI\PublisherAPI\(object) | $response | Structured object. |