Class JTwitterFriends
Twitter API Friends class for the Joomla Platform.
-
JTwitterObject
-
JTwitterFriends
Methods summary
public
array
|
#
getFriendIds( mixed $user, integer $cursor = null, boolean $string_ids = null, integer $count = 0 )
Method to get an array of user IDs the specified user follows.
Method to get an array of user IDs the specified user follows.
Parameters
- $user
mixed - $user Either an integer containing the user ID or a string containing the screen
name.
- $cursor
integer - $cursor 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."
- $string_ids
boolean - $string_ids Set to true to return IDs as strings, false to return as integers.
- $count
integer - $count Specifies the number of IDs attempt retrieval of, up to a maximum of
5,000 per distinct request.
Returns
array - The decoded JSON response
Throws
Since
12.3
|
public
array
|
#
getFriendshipDetails( mixed $user_a, mixed $user_b )
Method to display detailed friend information between two users.
Method to display detailed friend information between two users.
Parameters
- $user_a
mixed - $user_a Either an integer containing the user ID or a string containing the
screen name of the first user.
- $user_b
mixed - $user_b Either an integer containing the user ID or a string containing the
screen name of the second user.
Returns
array - The decoded JSON response
Throws
Since
12.3
|
public
array
|
#
getFollowerIds( mixed $user, integer $cursor = null, boolean $string_ids = null, integer $count = 0 )
Method to get an array of user IDs the specified user is followed by.
Method to get an array of user IDs the specified user is followed by.
Parameters
- $user
mixed - $user Either an integer containing the user ID or a string containing the screen
name.
- $cursor
integer - $cursor 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."
- $string_ids
boolean - $string_ids Set to true to return IDs as strings, false to return as integers.
- $count
integer - $count Specifies the number of IDs attempt retrieval of, up to a maximum of
5,000 per distinct request.
Returns
array - The decoded JSON response
Throws
Since
12.3
|
public
array
|
#
getFriendshipsIncoming( integer $cursor = null, boolean $string_ids = null )
Method to determine pending requests to follow the authenticating user.
Method to determine pending requests to follow the authenticating user.
Parameters
- $cursor
integer - $cursor 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."
- $string_ids
boolean - $string_ids Set to true to return IDs as strings, false to return as integers.
Returns
array - The decoded JSON response
Since
12.3
|
public
array
|
#
getFriendshipsOutgoing( integer $cursor = null, boolean $string_ids = null )
Method to determine every protected user for whom the authenticating user has
a pending follow request.
Method to determine every protected user for whom the authenticating user has
a pending follow request.
Parameters
- $cursor
integer - $cursor 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."
- $string_ids
boolean - $string_ids Set to true to return IDs as strings, false to return as integers.
Returns
array - The decoded JSON response
Since
12.3
|
public
array
|
#
follow( mixed $user, boolean $follow = false )
Allows the authenticating users to follow the user specified in the ID
parameter.
Allows the authenticating users to follow the user specified in the ID
parameter.
Parameters
- $user
mixed - $user Either an integer containing the user ID or a string containing the screen
name.
- $follow
boolean - $follow Enable notifications for the target user.
Returns
array - The decoded JSON response
Throws
Since
12.3
|
public
array
|
#
unfollow( mixed $user )
Allows the authenticating users to unfollow the user specified in the ID
parameter.
Allows the authenticating users to unfollow the user specified in the ID
parameter.
Parameters
- $user
mixed - $user Either an integer containing the user ID or a string containing the screen
name.
Returns
array - The decoded JSON response
Throws
Since
12.3
|
public
array
|
#
getFriendshipsLookup( string $screen_name = null, string $id = null )
Method to get the relationship of the authenticating user to the comma
separated list of up to 100 screen_names or user_ids provided.
Method to get the relationship of the authenticating user to the comma
separated list of up to 100 screen_names or user_ids provided.
Parameters
- $screen_name
string - $screen_name A comma separated list of screen names, up to 100 are allowed in a
single request.
- $id
string - $id A comma separated list of user IDs, up to 100 are allowed in a single
request.
Returns
array - The decoded JSON response
Throws
Since
12.3
|
public
array
|
#
updateFriendship( mixed $user, boolean $device = null, boolean $retweets = null )
Allows one to enable or disable retweets and device notifications from the
specified user.
Allows one to enable or disable retweets and device notifications from the
specified user.
Parameters
- $user
mixed - $user Either an integer containing the user ID or a string containing the screen
name.
- $device
boolean - $device Enable/disable device notifications from the target user.
- $retweets
boolean - $retweets Enable/disable retweets from the target user.
Returns
array - The decoded JSON response
Throws
Since
12.3
|
__construct()
,
checkRateLimit()
,
fetchUrl()
,
getOption()
,
getRateLimit()
,
sendRequest()
,
setOption()
Magic methods summary
Properties summary
$client
,
$oauth
,
$options