Public Member Functions | |
__construct (string $subredditName, string $sort) | |
validate () | |
Public Member Functions inherited from snuze\Request\Request | |
addHeader (string $name, string $value) | |
getHeaders () | |
addParameter (string $name, $value=null) | |
getParameter (string $name) | |
getParameters () | |
getApiUri () | |
getEndpointPath () | |
getVerb () | |
getRequiresAuthentication () | |
getMandatoryParameters () | |
validate () | |
Public Member Functions inherited from snuze\SnuzeObject | |
__construct (array $args=null) | |
_getSnuzeId () | |
_getSnuzeClass () | |
_ident () | |
Static Public Member Functions | |
static | getValidSorts () |
Static Public Member Functions inherited from snuze\Request\Request | |
static | getValidParameters () |
static | getValidVerbs () |
Public Attributes | |
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' |
Public Attributes inherited from snuze\Request\Request | |
const | API_URIS |
const | VERB_GET = 'GET' |
const | VERB_POST = 'POST' |
const | VERB_DELETE = 'DELETE' |
Private Member Functions | |
setSort (string $sort) | |
Private Attributes | |
$_sort = null | |
Additional Inherited Members | |
Protected Member Functions inherited from snuze\Request\Request | |
setApiUri (string $apiUri) | |
setEndpointPath (string $endpointPath) | |
setVerb (string $verb) | |
setRequiresAuthentication (bool $requiresAuthentication) | |
Protected Member Functions inherited from snuze\SnuzeObject | |
debug (string $message, bool $echo=false) | |
info (string $message, bool $echo=false) | |
warning (string $message, bool $echo=false) | |
error (string $message, bool $echo=false) | |
Protected Attributes inherited from snuze\Request\Request | |
$parameters = [] | |
$mandatoryParameters = [] | |
Protected Attributes inherited from snuze\SnuzeObject | |
$_snuzeId = null | |
$_snuzeClass = null | |
The Links class represents the common properties of all requests for links (AKA posts or submissions) from a subreddit. Parameters that can be used by all Links subtypes are defined here. Several subtypes of Links exist to define the properties specific to those request types.
You can't instantiate a generic Links request; instead, you should create and use the various subtypes: HotLinks, NewLinks, RisingLinks, etc.
snuze\Request\Links\Links::__construct | ( | string | $subredditName, |
string | $sort | ||
) |
Constructor. Calls parent, then sets properties specific to this Request.
References snuze\Request\Request\setEndpointPath(), and snuze\Request\Request\setVerb().
|
static |
Get an array of supported sort orders.
snuze\Request\Links\Links::validate | ( | ) |
Overrides and calls parent. Performs parameter validation specific to this type of Request.
References snuze\Request\Request\getParameter().
const snuze\Request\Links\Links::PARAM_AFTER = 'after' |
Defines the "after" parameter as valid. Used to control pagination. If set, this should be a link's fullname e.g. "t3_ce4vtr"
const snuze\Request\Links\Links::PARAM_BEFORE = 'before' |
Defines the "before" parameter as valid. Used to control pagination. If set, this should be a link's fullname e.g. "t3_ce4vtr"
const snuze\Request\Links\Links::PARAM_COUNT = 'count' |
Defines the "count" parameter as valid. If set, this should be the number of links that have already been seen in this listing.
const snuze\Request\Links\Links::PARAM_INCLUDE_CATEGORIES = 'include_categories' |
Defines the "include_categories" parameter as valid
const snuze\Request\Links\Links::PARAM_LIMIT = 'limit' |
Defines the "limit" parameter as valid
const snuze\Request\Links\Links::PARAM_SHOW = 'show' |
Defines the "show" parameter as valid. The only acceptable value for this parameter is 'all'. When set, any filters the authenticated user has set ("don't show me submissions..." preferences) will be disabled for this listing.
const snuze\Request\Links\Links::PARAM_SR_DETAIL = 'sr_detail' |
Defines the "sr_detail" parameter as valid
const snuze\Request\Links\Links::SORT_CONTRO = 'controversial' |
Defines the "controversial" sort order
const snuze\Request\Links\Links::SORT_HOT = 'hot' |
Defines the "hot" sort order
const snuze\Request\Links\Links::SORT_NEW = 'new' |
Defines the "new" sort order
const snuze\Request\Links\Links::SORT_RANDOM = 'random' |
Defines the "random" sort order
const snuze\Request\Links\Links::SORT_RISING = 'rising' |
Defines the "rising" sort order
const snuze\Request\Links\Links::SORT_TOP = 'top' |
Defines the "top" sort order