Public Member Functions | |
__construct (string $subredditName) | |
validate () | |
![]() | |
__construct (string $subredditName, string $sort) | |
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_GEO = 'g' |
const | GEO_VALUES |
![]() | |
const | SORT_CONTRO = 'controversial' |
const | SORT_HOT = 'hot' |
const | SORT_NEW = 'new' |
const | SORT_RANDOM = 'random' |
const | SORT_RISING = 'rising' |
const | SORT_TOP = 'top' |
const | PARAM_AFTER = 'after' |
const | PARAM_BEFORE = 'before' |
const | PARAM_COUNT = 'count' |
const | PARAM_INCLUDE_CATEGORIES = 'include_categories' |
const | PARAM_LIMIT = 'limit' |
const | PARAM_SHOW = 'show' |
const | PARAM_SR_DETAIL = 'sr_detail' |
![]() | |
const | API_URIS |
const | VERB_GET = 'GET' |
const | VERB_POST = 'POST' |
const | VERB_DELETE = 'DELETE' |
Additional Inherited Members | |
![]() | |
static | getValidSorts () |
![]() | |
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 | |
HotLinks defines the structure and parameters of a request to the /r/[subreddit]/hot API endpoint.
This endpoint returns links from the specified subreddit, presented in the "hot" sort order.
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\Links\HotLinks::validate | ( | ) |
Overrides and calls parent. Performs parameter validation specific to this type of Request.
References snuze\Request\Request\getParameter().
const snuze\Request\Links\HotLinks::GEO_VALUES |
Define an array of acceptable values for PARAM_GEO.
const snuze\Request\Links\HotLinks::PARAM_GEO = 'g' |
Defines the "g" parameter as valid
A geographic region code, as specified by Reddit, that can be used as a hint when requesting the "hot" listing for a subreddit. This is ONLY a valid parameter when the sort order is SORT_HOT, but is never required. The value is restricted to a predefined list of options set by Reddit (see ::validate(), below).