Public Member Functions | |
__construct () | |
validate () | |
![]() | |
addHeader (string $name, string $value) | |
getHeaders () | |
addParameter (string $name, $value=null) | |
getParameter (string $name) | |
getParameters () | |
getApiUri () | |
getEndpointPath () | |
getVerb () | |
getRequiresAuthentication () | |
getMandatoryParameters () | |
validate () | |
![]() | |
__construct (array $args=null) | |
_getSnuzeId () | |
_getSnuzeClass () | |
_ident () | |
Public Attributes | |
const | PARAM_ID = 'id' |
const | REGEX_VALID_ID = '|^(?:(?:t[135]_[a-z0-9]{1,13}),?)+$|i' |
![]() | |
const | API_URIS |
const | VERB_GET = 'GET' |
const | VERB_POST = 'POST' |
const | VERB_DELETE = 'DELETE' |
Additional Inherited Members | |
![]() | |
static | getValidParameters () |
static | getValidVerbs () |
![]() | |
setApiUri (string $apiUri) | |
setEndpointPath (string $endpointPath) | |
setVerb (string $verb) | |
setRequiresAuthentication (bool $requiresAuthentication) | |
![]() | |
debug (string $message, bool $echo=false) | |
info (string $message, bool $echo=false) | |
warning (string $message, bool $echo=false) | |
error (string $message, bool $echo=false) | |
![]() | |
$parameters = [] | |
$mandatoryParameters = [] | |
![]() | |
$_snuzeId = null | |
$_snuzeClass = null | |
Info defines the structure and parameters of a request to the /api/info API endpoint.
This endpoint returns information about up to 100 different "thing" entities as specified by their fullname identifiers.
This file is part of Snuze, a PHP client for the Reddit API. Copyright 2019 Shaun Cummiskey shaun @sha unc.c omhttps://shaunc.com/ Repository: https://github.com/snuze/snuze/ Documentation: https://snuze.shaunc.com/
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
snuze\Request\Info::__construct | ( | ) |
Constructor. Calls parent, then sets properties specific to this Request.
References snuze\Request\Info\PARAM_ID, snuze\Request\Request\setEndpointPath(), and snuze\Request\Request\setVerb().
snuze\Request\Info::validate | ( | ) |
Overrides and calls parent. Performs parameter validation specific to this type of Request.
References snuze\Request\Request\getParameter().
const snuze\Request\Info::PARAM_ID = 'id' |
Defines the "id" parameter as valid. This parameter is mandatory and must be a Thing's fullname e.g. "t3_ce4vtr" or multiple comma-separated Thing fullnames e.g. "t5_abc,t1_def,t3_ghi". Only comments, links, and subreddits (t1_, t3_, and t5) can be retrieved through this Request.
const snuze\Request\Info::REGEX_VALID_ID = '|^(?:(?:t[135]_[a-z0-9]{1,13}),?)+$|i' |
Defines a regular expression to test whether or not the "id" parameter's value is valid