JTwitterFriends
Extends \JTwitterObjectTwitter API Friends 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.
follow
Allows the authenticating users to follow the user specified in the ID parameter.
follow(mixed $user, boolean $follow = false) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $user
mixed
Either an integer containing the user ID or a string containing the screen name.- $follow
boolean
Enable notifications for the target user.
Response
array
The decoded JSON response
getFollowerIds
Method to get an array of user IDs the specified user is followed by.
getFollowerIds(mixed $user, integer $cursor = null, boolean $stringIds = null, integer $count) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $user
mixed
Either an integer containing the user ID or a string containing the screen name.- $cursor
integer
Causes the list of IDs to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor is provided, a value of -1 will be assumed, which is the first "page."- $stringIds
boolean
Set to true to return IDs as strings, false to return as integers.- $count
integer
Specifies the number of IDs attempt retrieval of, up to a maximum of 5,000 per distinct request.
Response
array
The decoded JSON response
getFriendIds
Method to get an array of user IDs the specified user follows.
getFriendIds(mixed $user, integer $cursor = null, boolean $stringIds = null, integer $count) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $user
mixed
Either an integer containing the user ID or a string containing the screen name.- $cursor
integer
Causes the list of connections to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor is provided, a value of -1 will be assumed, which is the first "page."- $stringIds
boolean
Set to true to return IDs as strings, false to return as integers.- $count
integer
Specifies the number of IDs attempt retrieval of, up to a maximum of 5,000 per distinct request.
Response
array
The decoded JSON response
getFriendshipDetails
Method to display detailed friend information between two users.
getFriendshipDetails(mixed $userA, mixed $userB) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $userA
mixed
Either an integer containing the user ID or a string containing the screen name of the first user.- $userB
mixed
Either an integer containing the user ID or a string containing the screen name of the second user.
Response
array
The decoded JSON response
getFriendshipNoRetweetIds
Method to get the user ids that currently authenticated user does not want to see retweets from.
getFriendshipNoRetweetIds(boolean $stringIds = null) : array
since |
3.1.4 |
---|
Arguments
- $stringIds
boolean
Set to true to return IDs as strings, false to return as integers.
Response
array
The decoded JSON response
getFriendshipsIncoming
Method to determine pending requests to follow the authenticating user.
getFriendshipsIncoming(integer $cursor = null, boolean $stringIds = null) : array
since |
3.1.4 |
---|
Arguments
- $cursor
integer
Causes the list of IDs to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor is provided, a value of -1 will be assumed, which is the first "page."- $stringIds
boolean
Set to true to return IDs as strings, false to return as integers.
Response
array
The decoded JSON response
getFriendshipsLookup
Method to get the relationship of the authenticating user to the comma separated list of up to 100 screen_names or user_ids provided.
getFriendshipsLookup(string $screenName = null, string $id = 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.
Response
array
The decoded JSON response
getFriendshipsOutgoing
Method to determine every protected user for whom the authenticating user has a pending follow request.
getFriendshipsOutgoing(integer $cursor = null, boolean $stringIds = null) : array
since |
3.1.4 |
---|
Arguments
- $cursor
integer
Causes the list of IDs to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor is provided, a value of -1 will be assumed, which is the first "page."- $stringIds
boolean
Set to true to return IDs as strings, false to return as integers.
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
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.
unfollow
Allows the authenticating users to unfollow the user specified in the ID parameter.
unfollow(mixed $user) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $user
mixed
Either an integer containing the user ID or a string containing the screen name.
Response
array
The decoded JSON response
updateFriendship
Allows one to enable or disable retweets and device notifications from the specified user.
updateFriendship(mixed $user, boolean $device = null, boolean $retweets = null) : array
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $user
mixed
Either an integer containing the user ID or a string containing the screen name.- $device
boolean
Enable/disable device notifications from the target user.- $retweets
boolean
Enable/disable retweets from the target user.
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