Stack.PHP
A simple and easy to use PHP library for the Stack Exchange API.
Public Member Functions | List of all members
UserRequest Class Reference

A request for users. More...

Inheritance diagram for UserRequest:
PagedRequest

Public Member Functions

 __construct ($domain_name, $access_token=null)
 Constructor for a user request. More...
 
 Answers ()
 Retrieves the answers written by the current set of users. More...
 
 Associated ()
 Retrieves the users associated with the provided access token. More...
 
 Badges ()
 Retrieves the badges earned by the current set of users. More...
 
 Comments ()
 Retrieves the comments posted by the current set of users. More...
 
 CommentsTo ($user_id)
 Retrieves the comments posted by the current set of users in reply to the specified user. More...
 
 Elected ()
 Retrieves only the moderators that have been elected. More...
 
 Favorites ()
 Retrieves the questions that the current set of users have favorited. More...
 
 Inbox ($access_token=null)
 Retrieves the items in the user's inbox. More...
 
 Mentioned ()
 Retrieves all of the comments that mention the current set of users. More...
 
 Moderators ()
 Retrieves only the moderator users. More...
 
 Privileges ()
 Retrieves the privileges available for a user. More...
 
 Questions ()
 Retrieves the questions asked by the current set of users. More...
 
 Reputation ()
 Retrieves reputation changes for the current set of users. More...
 
 SuggestedEdits ()
 Retrieves the edit suggestions made by the current set of users. More...
 
 Tags ($tag=null)
 Retrieves the set of tags the current set of users are active in. More...
 
 Timeline ()
 Retrieves the actions that a user has performed. More...
 
 TopAnswerTags ()
 Retrieves the top 30 tags a user has posted answers for. More...
 
 TopQuestionTags ()
 Retrieves the top 30 tags a user has asked questions for. More...
 
 SortByModified ()
 Causes users to be sorted according to their time of last modification. More...
 
 SortByReputation ()
 Causes users to be sorted according to their reputation. More...
 
- Public Member Functions inherited from PagedRequest
 __construct ($url, $return_object, $category=null, $method=null)
 Constructor for a paged request. More...
 
 Exec ()
 Performs the HTTP request. More...
 
 ID ($id)
 Adds the provided ID(s) to the request. More...
 
 Tag ($tag)
 Adds the provided tags to the request. More...
 
 FromDate ($date)
 Ensures that only items created after the specified date are returned in the response. More...
 
 ToDate ($date)
 Ensures that only items created before the specified date are returned in the response. More...
 
 Min ($minimum)
 Sets the minimum value for the range of the current sort. More...
 
 Max ($maximum)
 Sets the maximum value for the range of the current sort. More...
 
 Filter ($filter, $pagination_filter=null)
 Sets the specified filter for the request. More...
 
 URL ()
 Returns the URL constructed from this request. More...
 
 Ascending ()
 Causes the items to be returned in ascending order. More...
 
 Descending ()
 Causes the items to be returned in descending order. More...
 
 InName ($name)
 Returns only the items that contain the specified text in their names. More...
 
 SortBy ($method)
 Sort the results by the provided sort method. More...
 
 SortByActivity ()
 Orders the returned items by activity. More...
 
 SortByCreation ()
 Orders the returned items by creation date. More...
 
 SortByName ()
 Orders the returned items by their name. More...
 
 SortByVotes ()
 Orders the returned items by their score. More...
 

Additional Inherited Members

- Protected Attributes inherited from PagedRequest
 $url
 The URL that will be modified as methods are called.
 

Detailed Description

A request for users.

Constructor & Destructor Documentation

◆ __construct()

UserRequest::__construct (   $domain_name,
  $access_token = null 
)

Constructor for a user request.

Parameters
$domain_namethe domain name of the site
$access_tokena valid access token

Member Function Documentation

◆ Answers()

UserRequest::Answers ( )

Retrieves the answers written by the current set of users.

Returns
a PostRequest object

◆ Associated()

UserRequest::Associated ( )

Retrieves the users associated with the provided access token.

Returns
a PagedRequest object

◆ Badges()

UserRequest::Badges ( )

Retrieves the badges earned by the current set of users.

Returns
a BadgeRequest object

◆ Comments()

UserRequest::Comments ( )

Retrieves the comments posted by the current set of users.

Returns
a PagedRequest object

◆ CommentsTo()

UserRequest::CommentsTo (   $user_id)

Retrieves the comments posted by the current set of users in reply to the specified user.

Parameters
$user_ida user ID
Returns
a PagedRequest object

◆ Elected()

UserRequest::Elected ( )

Retrieves only the moderators that have been elected.

Returns
the current instance

◆ Favorites()

UserRequest::Favorites ( )

Retrieves the questions that the current set of users have favorited.

Returns
a QuestionRequest object

◆ Inbox()

UserRequest::Inbox (   $access_token = null)

Retrieves the items in the user's inbox.

Parameters
$access_tokena valid access token
Returns
an InboxItemRequest object

◆ Mentioned()

UserRequest::Mentioned ( )

Retrieves all of the comments that mention the current set of users.

Returns
a PagedRequest object

◆ Moderators()

UserRequest::Moderators ( )

Retrieves only the moderator users.

Returns
the current instance

◆ Privileges()

UserRequest::Privileges ( )

Retrieves the privileges available for a user.

Returns
a PagedResponse object

◆ Questions()

UserRequest::Questions ( )

Retrieves the questions asked by the current set of users.

Returns
a QuestionRequest object

◆ Reputation()

UserRequest::Reputation ( )

Retrieves reputation changes for the current set of users.

Returns
a PagedRequest object

◆ SortByModified()

UserRequest::SortByModified ( )

Causes users to be sorted according to their time of last modification.

Returns
the current instance

◆ SortByReputation()

UserRequest::SortByReputation ( )

Causes users to be sorted according to their reputation.

Returns
the current instance

◆ SuggestedEdits()

UserRequest::SuggestedEdits ( )

Retrieves the edit suggestions made by the current set of users.

Returns
a SuggestedEditRequest object

◆ Tags()

UserRequest::Tags (   $tag = null)

Retrieves the set of tags the current set of users are active in.

Parameters
$tageither a single tag or an array of tags
Returns
a TagRequest object

◆ Timeline()

UserRequest::Timeline ( )

Retrieves the actions that a user has performed.

Returns
a PagedRequest object

◆ TopAnswerTags()

UserRequest::TopAnswerTags ( )

Retrieves the top 30 tags a user has posted answers for.

Returns
a PagedResponse object

◆ TopQuestionTags()

UserRequest::TopQuestionTags ( )

Retrieves the top 30 tags a user has asked questions for.

Returns
a PagedResponse object

The documentation for this class was generated from the following file: