Statuses

Extends \Joomla\Twitter\Object

Twitter API Statuses class for the Joomla Framework.

deprecated
since

1.0

deprecated

The joomla/twitter package is deprecated

Methods

__construct

Constructor.

__construct(array &$options, \Joomla\Http\Http $client, \Joomla\Twitter\OAuth $oauth) 
inherited
since

Arguments

$options

arrayTwitter options array.

$client

\Joomla\Http\HttpThe HTTP client object.

$oauth

\Joomla\Twitter\OAuthThe OAuth client.

checkRateLimit

Method to check the rate limit for the requesting IP address

checkRateLimit(string $resource = null, string $action = null) : void
inherited
since
throws

\RuntimeException

Arguments

$resource

stringA resource or a comma-separated list of resource families you want to know the current rate limit disposition for.

$action

stringAn action for the specified resource, if only one resource is specified.

deleteTweet

Method to delete the status specified by the required ID parameter.

deleteTweet(integer $id, boolean $trimUser = null) : array
since

1.0

Arguments

$id

integerThe numerical ID of the desired status.

$trimUser

booleanWhen set to true, each tweet returned in a timeline will include a user object including only the status author's numerical ID.

Response

arrayThe 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
inherited
since

Arguments

$path

stringURL to inflect

$parameters

arrayThe parameters passed in the URL.

Response

stringThe request URL.

getHomeTimeline

Method to retrieve collection of the most recent Tweets and retweets posted by the authenticating user and the users they follow.

getHomeTimeline(integer $count = 20, boolean $noReplies = null, integer $sinceId, integer $maxId, boolean $trimUser = null, boolean $contributor = null, boolean $entities = null) : array

The home timeline is central to how most users interact with the Twitter service.

since

1.2.0

throws

\RuntimeException

Arguments

$count

integerSpecifies the number of tweets to try and retrieve, up to a maximum of 200. Retweets are always included in the count, so it is always suggested to set $includeRts to true

$noReplies

booleanThis parameter will prevent replies from appearing in the returned timeline. This parameter is only supported for JSON and XML responses.

$sinceId

integerReturns results with an ID greater than (that is, more recent than) the specified ID.

$maxId

integerReturns results with an ID less than (that is, older than) the specified ID.

$trimUser

booleanWhen set to true, each tweet returned in a timeline will include a user object including only the status author's numerical ID.

$contributor

booleanThis parameter enhances the contributors element of the status response to include the screen_name of the contributor. By default only the user_id of the contributor is included.

$entities

booleanIf set to true, this will include an addition entities node in the response object.

Response

arrayThe decoded JSON response

getMentions

Method to retrieve the most recent mentions for the authenticating user.

getMentions(integer $count = 20, boolean $includeRts = null, boolean $entities = null, integer $sinceId, integer $maxId, boolean $trimUser = null, string $contributor = null) : array
since

1.0

throws

\RuntimeException

Arguments

$count

integerSpecifies the number of tweets to try and retrieve, up to a maximum of 200. Retweets are always included in the count, so it is always suggested to set $includeRts to true

$includeRts

booleanWhen set to true, the timeline will contain native retweets in addition to the standard stream of tweets.

$entities

booleanWhen set to true, 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.

$sinceId

integerReturns results with an ID greater than (that is, more recent than) the specified ID.

$maxId

integerReturns results with an ID less than (that is, older than) the specified ID.

$trimUser

booleanWhen set to true, each tweet returned in a timeline will include a user object including only the status author's numerical ID.

$contributor

stringThis parameter enhances the contributors element of the status response to include the screen_name of the contributor.

Response

arrayThe decoded JSON response

getOembed

Method to get information allowing the creation of an embedded representation of a Tweet on third party sites.

getOembed(integer $id = null, string $url = null, integer $maxwidth = null, boolean $hideMedia = null, boolean $hideThread = null, boolean $omitScript = null, string $align = null, string $related = null, string $lang = null) : array

Note: either the id or url parameters must be specified in a request. It is not necessary to include both.

since

1.0

throws

\RuntimeException

Arguments

$id

integerThe Tweet/status ID to return embed code for.

$url

stringThe URL of the Tweet/status to be embedded.

$maxwidth

integerThe maximum width in pixels that the embed should be rendered at. This value is constrained to be between 250 and 550 pixels.

$hideMedia

booleanSpecifies whether the embedded Tweet should automatically expand images which were uploaded via POST statuses/update_with_media.

$hideThread

booleanSpecifies whether the embedded Tweet should automatically show the original message in the case that the embedded Tweet is a reply.

$omitScript

booleanSpecifies whether the embedded Tweet HTML should include a