JTwitterLists
Extends \JTwitterObjectTwitter API Lists 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.
addMembers
Method to add multiple members to a list, by specifying a comma-separated list of member ids or screen names.
addMembers(mixed $list, string $userId = null, string $screenName = null, mixed $owner = null) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $list
mixed
Either an integer containing the list ID or a string containing the list slug.- $userId
string
A comma separated list of user IDs, up to 100 are allowed in a single request.- $screenName
string
A comma separated list of screen names, up to 100 are allowed in a single request.- $owner
mixed
Either an integer containing the user ID or a string containing the screen name of the owner.
Response
array
The decoded JSON response
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.
create
Method to create a new list for the authenticated user.
create(string $name, string $mode = null, string $description = null) : array
since |
3.1.4 |
---|
Arguments
- $name
string
The name of the list.- $mode
string
Whether your list is public or private. Values can be public or private. If no mode is specified the list will be public.- $description
string
The description to give the list.
Response
array
The decoded JSON response
delete
Method to delete a specified list.
delete(mixed $list, mixed $owner = null) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $list
mixed
Either an integer containing the list ID or a string containing the list slug.- $owner
mixed
Either an integer containing the user ID or a string containing the screen name of the owner.
Response
array
The decoded JSON response
deleteMembers
Method to remove multiple members from a list, by specifying a comma-separated list of member ids or screen names.
deleteMembers(mixed $list, string $userId = null, string $screenName = null, mixed $owner = null) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $list
mixed
Either an integer containing the list ID or a string containing the list slug.- $userId
string
A comma separated list of user IDs, up to 100 are allowed in a single request.- $screenName
string
A comma separated list of screen names, up to 100 are allowed in a single request.- $owner
mixed
Either an integer containing the user ID or a string containing the screen name of the owner.
Response
array
The decoded JSON response
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.
getListById
Method to get the specified list.
getListById(mixed $list, mixed $owner = null) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $list
mixed
Either an integer containing the list ID or a string containing the list slug.- $owner
mixed
Either an integer containing the user ID or a string containing the screen name.
Response
array
The decoded JSON response
getLists
Method to get all lists the authenticating or specified user subscribes to, including their own.
getLists(mixed $user, boolean $reverse = null) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $user
mixed
Either an integer containing the user ID or a string containing the screen name.- $reverse
boolean
Set this to true if you would like owned lists to be returned first. See description above for information on how this parameter works.
Response
array
The decoded JSON response
getMembers
Method to get the members of the specified list.
getMembers(mixed $list, mixed $owner = null, boolean $entities = null, boolean $skipStatus = null) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $list
mixed
Either an integer containing the list ID or a string containing the list slug.- $owner
mixed
Either an integer containing the user ID or a string containing the screen name.- $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.- $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
getStatuses
Method to get tweet timeline for members of the specified list
getStatuses(mixed $list, mixed $owner = null, integer $sinceId, integer $maxId, integer $count, boolean $entities = null, boolean $includeRts = null) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $list
mixed
Either an integer containing the list ID or a string containing the list slug.- $owner
mixed
Either an integer containing the user ID or a string containing the screen name.- $sinceId
integer
Returns results with an ID greater than (that is, more recent than) the specified ID.- $maxId
integer
Returns results with an ID less than (that is, older than) or equal to the specified ID.- $count
integer
Specifies the number of results to retrieve 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.- $includeRts
boolean
When set to either true, t or 1, the list timeline will contain native retweets (if they exist) in addition to the standard stream of tweets.
Response
array
The decoded JSON response
getSubscribers
Method to get the subscribers of the specified list.
getSubscribers(mixed $list, mixed $owner = null, integer $cursor = null, boolean $entities = null, boolean $skipStatus = null) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $list
mixed
Either an integer containing the list ID or a string containing the list slug.- $owner
mixed
Either an integer containing the user ID or a string containing the screen name.- $cursor
integer
Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging.- $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.- $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
getSubscriptions
Method to get a collection of the lists the specified user is subscribed to, 20 lists per page by default. Does not include the user's own lists.
getSubscriptions(mixed $user, integer $count, integer $cursor = null) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $user
mixed
Either an integer containing the user ID or a string containing the screen name.- $count
integer
The amount of results to return per page. Defaults to 20. Maximum of 1,000 when using cursors.- $cursor
integer
Breaks the results into pages. Provide a value of -1 to begin paging.
Response
array
The decoded JSON response
isMember
Method to check if the specified user is a member of the specified list.
isMember(mixed $list, mixed $user, mixed $owner = null, boolean $entities = null, boolean $skipStatus = null) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $list
mixed
Either an integer containing the list ID or a string containing the list slug.- $user
mixed
Either an integer containing the user ID or a string containing the screen name of the user to remove.- $owner
mixed
Either an integer containing the user ID or a string containing the screen name of the owner.- $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.- $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
isSubscriber
Method to check if the specified user is a subscriber of the specified list.
isSubscriber(mixed $list, mixed $user, mixed $owner = null, boolean $entities = null, boolean $skipStatus = null) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $list
mixed
Either an integer containing the list ID or a string containing the list slug.- $user
mixed
Either an integer containing the user ID or a string containing the screen name of the user to remove.- $owner
mixed
Either an integer containing the user ID or a string containing the screen name of the owner.- $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.- $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
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.
subscribe
Method to subscribe the authenticated user to the specified list.
subscribe(mixed $list, mixed $owner = null) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $list
mixed
Either an integer containing the list ID or a string containing the list slug.- $owner
mixed
Either an integer containing the user ID or a string containing the screen name of the owner.
Response
array
The decoded JSON response
unsubscribe
Method to unsubscribe the authenticated user from the specified list.
unsubscribe(mixed $list, mixed $owner = null) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $list
mixed
Either an integer containing the list ID or a string containing the list slug.- $owner
mixed
Either an integer containing the user ID or a string containing the screen name of the owner.
Response
array
The decoded JSON response
update
Method to update the specified list
update(mixed $list, mixed $owner = null, string $name = null, string $mode = null, string $description = null) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $list
mixed
Either an integer containing the list ID or a string containing the list slug.- $owner
mixed
Either an integer containing the user ID or a string containing the screen name of the owner.- $name
string
The name of the list.- $mode
string
Whether your list is public or private. Values can be public or private. If no mode is specified the list will be public.- $description
string
The description to give the list.
Response
array
The decoded JSON response
Properties
client
The HTTP client object to use in sending HTTP requests.
since |
3.1.4 |
---|
Type(s)
\JHttp