JTwitterProfile

Extends \JTwitterObject

Twitter API Profile class for the Joomla Platform.

deprecated
since

3.1.4

deprecated

4.0 Use the joomla/twitter package via Composer instead

package

Joomla.Platform

Methods

__construct

Constructor.

__construct(\Joomla\Registry\Registry &$options = null, \JHttp $client = null, \JTwitterOAuth $oauth = null) 
inherited
since

3.1.4

Arguments

$options

\Joomla\Registry\Registry

$client

\JHttpThe HTTP client object.

$oauth

\JTwitterOAuthThe OAuth client.

checkRateLimit

Method to check the rate limit for the requesting IP address

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

3.1.4

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.

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

3.1.4

Arguments

$path

stringURL to inflect

$parameters

arrayThe parameters passed in the URL.

Response

stringThe request URL.

getOption

Get an option from the JTwitterObject instance.

getOption(string $key) : mixed
inherited
since

3.1.4

Arguments

$key

stringThe name of the option to get.

Response

mixedThe option value.

getRateLimit

Method to retrieve the rate limit for the requesting IP address

getRateLimit(string $resource) : array
inherited
since

3.1.4

Arguments

$resource

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

Response

arrayThe JSON response decoded

getSettings

Method to get the settings (including current trend, geo and sleep time information) for the authenticating user.

getSettings() : array
since

3.1.4

Response

arrayThe decoded JSON response

sendRequest

Method to send the request.

sendRequest(string $path, string $method = 'GET', mixed $data = array(), array $headers = array()) : array
inherited
since

3.1.4

throws

\RuntimeException

Arguments

$path

stringThe path of the request to make

$method

stringThe request method.

$data

mixedEither an associative array or a string to be sent with the post request.

$headers

arrayAn array of name-value pairs to include in the header of the request

Response

arrayThe decoded JSON response

setOption

Set an option for the JTwitterObject instance.

setOption(string $key, mixed $value) : \JTwitterObject
inherited
since

3.1.4

Arguments

$key

stringThe name of the option to set.

$value

mixedThe option value to set.

Response

\JTwitterObjectThis object for method chaining.

updateProfile

Method to et values that users are able to set under the "Account" tab of their settings page.

updateProfile(string $name = null, string $url = null, string $location = null, string $description = null, boolean $entities = null, boolean $skip_status = null) : array
since

3.1.4

Arguments

$name

stringFull name associated with the profile. Maximum of 20 characters.

$url

stringURL associated with the profile. Will be prepended with "http://" if not present. Maximum of 100 characters.

$location

stringThe city or country describing where the user of the account is located. The contents are not normalized or geocoded in any way. Maximum of 30 characters.

$description

stringA description of the user owning the account. Maximum of 160 characters.

$entities

booleanWhen 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.

$skip_status

booleanWhen set to either true, t or 1 statuses will not be included in the returned user objects.

Response

arrayThe decoded JSON response

updateProfileBackgroundImage

Method to update the authenticating user's profile background image. This method can also be used to enable or disable the profile background image.

updateProfileBackgroundImage(string $image = null, boolean $tile = false, boolean $entities = null, boolean $skip_status = null, boolean $use = false) : array
since

3.1.4

Arguments

$image

stringThe background image for the profile.

$tile

booleanWhether or not to tile the background image.

$entities

booleanWhen 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.

$skip_status

booleanWhen set to either true, t or 1 statuses will not be included in the returned user objects.

$use

booleanDetermines whether to display the profile background image or not.

Response

arrayThe decoded JSON response

updateProfileColors

Method to set one or more hex values that control the color scheme of the authenticating user's profile page on twitter.com.

updateProfileColors(string $background = null, string $link = null, string $sidebar_border = null, string $sidebar_fill = null, string $text = null, boolean $entities = null, boolean $skip_status = null) : array
since

3.1.4

Arguments

$background

stringProfile background color.

$link

stringProfile link color.

$sidebar_border

stringProfile sidebar's border color.

$sidebar_fill

stringProfile sidebar's fill color.

$text

stringProfile text color.

$entities

booleanWhen 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.

$skip_status

booleanWhen set to either true, t or 1 statuses will not be included in the returned user objects.

Response

arrayThe decoded JSON response

updateProfileImage

Method to update the authenticating user's profile image.

updateProfileImage(string $image = null, boolean $entities = null, boolean $skip_status = null) : array
since

3.1.4

Arguments

$image

stringThe background image for the profile.

$entities

booleanWhen 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.

$skip_status

booleanWhen set to either true, t or 1 statuses will not be included in the returned user objects.

Response

arrayThe decoded JSON response

updateSettings

Method to update the authenticating user's settings.

updateSettings(integer $location = null, boolean $sleep_time = false, integer $start_sleep = null, integer $end_sleep = null, string $time_zone = null, string $lang = null) : array
since

3.1.4

Arguments

$location

integerThe Yahoo! Where On Earth ID to use as the user's default trend location.

$sleep_time

booleanWhen set to true, t or 1, will enable sleep time for the user.

$start_sleep

integerThe hour that sleep time should begin if it is enabled.

$end_sleep

integerThe hour that sleep time should end if it is enabled.

$time_zone

stringThe timezone dates and times should be displayed in for the user. The timezone must be one of the Rails TimeZone names.

$lang

stringThe language which Twitter should render in for this user.

Response

arrayThe decoded JSON response

Properties

options

Options for the Twitter object.

inherited
since

3.1.4

Type(s)

\Joomla\Registry\Registry

client

The HTTP client object to use in sending HTTP requests.

inherited
since

3.1.4

Type(s)

\JHttp

oauth

The OAuth client.

inherited
since

3.1.4

Type(s)

\JTwitterOAuth