JTwitterUsers
Extends \JTwitterObjectTwitter API Users class for the Joomla Platform.
since |
3.1.4 |
---|---|
deprecated |
4.0 Use the |
package |
Joomla.Platform |
Methods
__construct
Constructor.
__construct(\Joomla\Registry\Registry &$options = null, \JHttp $client = null, \JTwitterOAuth $oauth = null)
since |
3.1.4 |
---|
Arguments
- $options
- $client
\JHttp
The HTTP client object.- $oauth
\JTwitterOAuth
The OAuth client.
checkRateLimit
Method to check the rate limit for the requesting IP address
checkRateLimit(string $resource = null, string $action = null) : void
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $resource
string
A resource or a comma-separated list of resource families you want to know the current rate limit disposition for.- $action
string
An action for the specified resource, if only one resource is specified.
fetchUrl
Method to build and return a full request URL for the request. This method will add appropriate pagination details if necessary and also prepend the API url to have a complete URL for the request.
fetchUrl(string $path, array $parameters = null) : string
since |
3.1.4 |
---|
Arguments
- $path
string
URL to inflect- $parameters
array
The parameters passed in the URL.
Response
string
The request URL.
getContributees
Method to get an array of users that the specified user can contribute to.
getContributees(mixed $user, boolean $entities = null, boolean $skipStatus = null) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $user
mixed
Either an integer containing the user ID or a string containing the screen name.- $entities
boolean
Set to true to return IDs as strings, false to return as integers.- $skipStatus
boolean
When set to either true, t or 1 statuses will not be included in the returned user objects.
Response
array
The decoded JSON response
getContributors
Method to get an array of users who can contribute to the specified account.
getContributors(mixed $user, boolean $entities = null, boolean $skipStatus = null) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $user
mixed
Either an integer containing the user ID or a string containing the screen name.- $entities
boolean
Set to true to return IDs as strings, false to return as integers.- $skipStatus
boolean
When set to either true, t or 1 statuses will not be included in the returned user objects.
Response
array
The decoded JSON response
getOption
Get an option from the JTwitterObject instance.
getOption(string $key) : mixed
since |
3.1.4 |
---|
Arguments
- $key
string
The name of the option to get.
Response
mixed
The option value.
getRateLimit
Method to retrieve the rate limit for the requesting IP address
getRateLimit(string $resource) : array
since |
3.1.4 |
---|
Arguments
- $resource
string
A resource or a comma-separated list of resource families you want to know the current rate limit disposition for.
Response
array
The JSON response decoded
getSuggestions
Method access to Twitter's suggested user list.
getSuggestions(boolean $lang = null) : array
since |
3.1.4 |
---|
Arguments
- $lang
boolean
Restricts the suggested categories to the requested language.
Response
array
The decoded JSON response
getSuggestionsSlug
method to access the users in a given category of the Twitter suggested user list.
getSuggestionsSlug(string $slug, boolean $lang = null) : array
since |
3.1.4 |
---|
Arguments
- $slug
string
The short name of list or a category.- $lang
boolean
Restricts the suggested categories to the requested language.
Response
array
The decoded JSON response
getSuggestionsSlugMembers
Method to access the users in a given category of the Twitter suggested user list and return their most recent status if they are not a protected user.
getSuggestionsSlugMembers(string $slug) : array
since |
3.1.4 |
---|
Arguments
- $slug
string
The short name of list or a category.
Response
array
The decoded JSON response
getUser
Method to get extended information of a given user, specified by ID or screen name as per the required id parameter.
getUser(mixed $user, boolean $entities = null) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $user
mixed
Either an integer containing the user ID or a string containing the screen name.- $entities
boolean
Set to true to return IDs as strings, false to return as integers.
Response
array
The decoded JSON response
getUserProfileBanner
Method to access the profile banner in various sizes for the user with the indicated screen_name.
getUserProfileBanner(mixed $user) : array
since |
3.1.4 |
---|
Arguments
- $user
mixed
Either an integer containing the user ID or a string containing the screen name.
Response
array
The decoded JSON response
getUsersLookup
Method to get up to 100 users worth of extended information, specified by either ID, screen name, or combination of the two.
getUsersLookup(string $screenName = null, string $id = null, boolean $entities = null) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $screenName
string
A comma separated list of screen names, up to 100 are allowed in a single request.- $id
string
A comma separated list of user IDs, up to 100 are allowed in a single request.- $entities
boolean
When set to either true, t or 1, each tweet will include a node called "entities,". This node offers a variety of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags.
Response
array
The decoded JSON response
searchUsers
Method used to search for users
searchUsers(string $query, integer $page, integer $count, boolean $entities = null) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $query
string
The search query to run against people search.- $page
integer
Specifies the page of results to retrieve.- $count
integer
The number of people to retrieve. Maximum of 20 allowed per page.- $entities
boolean
When set to either true, t or 1, each tweet will include a node called "entities,". This node offers a variety of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags.
Response
array
The decoded JSON response
sendRequest
Method to send the request.
sendRequest(string $path, string $method = 'GET', mixed $data = array(), array $headers = array()) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $path
string
The path of the request to make- $method
string
The request method.- $data
mixed
Either an associative array or a string to be sent with the post request.- $headers
array
An array of name-value pairs to include in the header of the request
Response
array
The decoded JSON response
setOption
Set an option for the JTwitterObject instance.
setOption(string $key, mixed $value) : \JTwitterObject
since |
3.1.4 |
---|
Arguments
- $key
string
The name of the option to set.- $value
mixed
The option value to set.
Response
\JTwitterObject
This object for method chaining.
Properties
client
The HTTP client object to use in sending HTTP requests.
since |
3.1.4 |
---|
Type(s)
\JHttp