Joomla Platform  13.1
Documentation des API du framework Joomla Platform
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe JTwitterProfile
+ Graphe d'héritage de JTwitterProfile:
+ Graphe de collaboration de JTwitterProfile:

Liste de tous les membres

Fonctions membres publiques

 updateProfile ($name=null, $url=null, $location=null, $description=null, $entities=null, $skip_status=null)
 updateProfileBackgroundImage ($image=null, $tile=false, $entities=null, $skip_status=null, $use=false)
 updateProfileImage ($image=null, $entities=null, $skip_status=null)
 updateProfileColors ($background=null, $link=null, $sidebar_border=null, $sidebar_fill=null, $text=null, $entities=null, $skip_status=null)
 getSettings ()
 updateSettings ($location=null, $sleep_time=false, $start_sleep=null, $end_sleep=null, $time_zone=null, $lang=null)
- Fonctions membres publiques inherited from JTwitterObject
 __construct (JRegistry &$options=null, JHttp $client=null, JTwitterOAuth $oauth=null)
 checkRateLimit ($resource=null, $action=null)
 fetchUrl ($path, $parameters=null)
 getRateLimit ($resource)
 sendRequest ($path, $method= 'GET', $data=array(), $headers=array())
 getOption ($key)
 setOption ($key, $value)

Additional Inherited Members

- Attributs protégés inherited from JTwitterObject
 $options
 $client
 $oauth

Description détaillée

Définition à la ligne 19 du fichier profile.php.


Documentation des fonctions membres

JTwitterProfile::getSettings ( )

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

Renvoie:
array The decoded JSON response
Depuis:
12.3

Définition à la ligne 274 du fichier profile.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('account', 'settings');
// Set the API path
$path = '/account/settings.json';
// Send the request.
return $this->sendRequest($path);
}
JTwitterProfile::updateProfile (   $name = null,
  $url = null,
  $location = null,
  $description = null,
  $entities = null,
  $skip_status = null 
)

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

Paramètres:
string$nameFull name associated with the profile. Maximum of 20 characters.
string$urlURL associated with the profile. Will be prepended with "http://" if not present. Maximum of 100 characters.
string$locationThe 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.
string$descriptionA description of the user owning the account. Maximum of 160 characters.
boolean$entitiesWhen 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.
boolean$skip_statusWhen set to either true, t or 1 statuses will not be included in the returned user objects.
Renvoie:
array The decoded JSON response
Depuis:
12.3

Définition à la ligne 37 du fichier profile.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('account', 'update_profile');
$data = array();
// Check if name is specified.
if ($name)
{
$data['name'] = $name;
}
// Check if url is specified.
if ($url)
{
$data['url'] = $url;
}
// Check if location is specified.
if ($location)
{
$data['location'] = $location;
}
// Check if description is specified.
if ($description)
{
$data['description'] = $description;
}
// Check if entities is specified.
if (!is_null($entities))
{
$data['include_entities'] = $entities;
}
// Check if skip_status is specified.
if (!is_null($skip_status))
{
$data['skip_status'] = $skip_status;
}
// Set the API path
$path = '/account/update_profile.json';
// Send the request.
return $this->sendRequest($path, 'POST', $data);
}
JTwitterProfile::updateProfileBackgroundImage (   $image = null,
  $tile = false,
  $entities = null,
  $skip_status = null,
  $use = false 
)

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

Paramètres:
string$imageThe background image for the profile.
boolean$tileWhether or not to tile the background image.
boolean$entitiesWhen 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.
boolean$skip_statusWhen set to either true, t or 1 statuses will not be included in the returned user objects.
boolean$useDetermines whether to display the profile background image or not.
Renvoie:
array The decoded JSON response
Depuis:
12.3

Définition à la ligne 102 du fichier profile.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('account', 'update_profile_background_image');
$data = array();
// Check if image is specified.
if ($image)
{
$data['image'] = "@{$image}";
}
// Check if url is true.
if ($tile)
{
$data['tile'] = $tile;
}
// Check if entities is specified.
if (!is_null($entities))
{
$data['include_entities'] = $entities;
}
// Check if skip_status is specified.
if (!is_null($skip_status))
{
$data['skip_status'] = $skip_status;
}
// Check if use is true.
if ($use)
{
$data['use'] = $use;
}
// Set the API path
$path = '/account/update_profile_background_image.json';
$header = array('Content-Type' => 'multipart/form-data', 'Expect' => '');
// Send the request.
return $this->sendRequest($path, 'POST', $data, $header);
}
JTwitterProfile::updateProfileColors (   $background = null,
  $link = null,
  $sidebar_border = null,
  $sidebar_fill = null,
  $text = null,
  $entities = null,
  $skip_status = null 
)

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

Paramètres:
string$backgroundProfile background color.
string$linkProfile link color.
string$sidebar_borderProfile sidebar's border color.
string$sidebar_fillProfile sidebar's fill color.
string$textProfile text color.
boolean$entitiesWhen 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.
boolean$skip_statusWhen set to either true, t or 1 statuses will not be included in the returned user objects.
Renvoie:
array The decoded JSON response
Depuis:
12.3

Définition à la ligne 210 du fichier profile.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('account', 'update_profile_colors');
$data = array();
// Check if background is specified.
if ($background)
{
$data['profile_background_color'] = $background;
}
// Check if link is specified.
if ($link)
{
$data['profile_link_color'] = $link;
}
// Check if sidebar_border is specified.
if ($sidebar_border)
{
$data['profile_sidebar_border_color'] = $sidebar_border;
}
// Check if sidebar_fill is specified.
if ($sidebar_fill)
{
$data['profile_sidebar_fill_color'] = $sidebar_fill;
}
// Check if text is specified.
if ($text)
{
$data['profile_text_color'] = $text;
}
// Check if entities is specified.
if (!is_null($entities))
{
$data['include_entities'] = $entities;
}
// Check if skip_status is true.
if (!is_null($skip_status))
{
$data['skip_status'] = $skip_status;
}
// Set the API path
$path = '/account/update_profile_colors.json';
// Send the request.
return $this->sendRequest($path, 'POST', $data);
}
JTwitterProfile::updateProfileImage (   $image = null,
  $entities = null,
  $skip_status = null 
)

Method to update the authenticating user's profile image.

Paramètres:
string$imageThe background image for the profile.
boolean$entitiesWhen 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.
boolean$skip_statusWhen set to either true, t or 1 statuses will not be included in the returned user objects.
Renvoie:
array The decoded JSON response
Depuis:
12.3

Définition à la ligne 160 du fichier profile.php.

{
// Check the rate limit for remaining hits
$this->checkRateLimit('account', 'update_profile_image');
$data = array();
// Check if image is specified.
if ($image)
{
$data['image'] = "@{$image}";
}
// Check if entities is specified.
if (!is_null($entities))
{
$data['include_entities'] = $entities;
}
// Check if skip_status is specified.
if (!is_null($skip_status))
{
$data['skip_status'] = $skip_status;
}
// Set the API path
$path = '/account/update_profile_image.json';
$header = array('Content-Type' => 'multipart/form-data', 'Expect' => '');
// Send the request.
return $this->sendRequest($path, 'POST', $data, $header);
}
JTwitterProfile::updateSettings (   $location = null,
  $sleep_time = false,
  $start_sleep = null,
  $end_sleep = null,
  $time_zone = null,
  $lang = null 
)

Method to update the authenticating user's settings.

Paramètres:
integer$locationThe Yahoo! Where On Earth ID to use as the user's default trend location.
boolean$sleep_timeWhen set to true, t or 1, will enable sleep time for the user.
integer$start_sleepThe hour that sleep time should begin if it is enabled.
integer$end_sleepThe hour that sleep time should end if it is enabled.
string$time_zoneThe timezone dates and times should be displayed in for the user. The timezone must be one of the Rails TimeZone names.
string$langThe language which Twitter should render in for this user.
Renvoie:
array The decoded JSON response
Depuis:
12.3

Définition à la ligne 301 du fichier profile.php.

{
$data = array();
// Check if location is specified.
if ($location)
{
$data['trend_location_woeid '] = $location;
}
// Check if sleep_time is true.
if ($sleep_time)
{
$data['sleep_time_enabled'] = $sleep_time;
}
// Check if start_sleep is specified.
if ($start_sleep)
{
$data['start_sleep_time'] = $start_sleep;
}
// Check if end_sleep is specified.
if ($end_sleep)
{
$data['end_sleep_time'] = $end_sleep;
}
// Check if time_zone is specified.
if ($time_zone)
{
$data['time_zone'] = $time_zone;
}
// Check if lang is specified.
if ($lang)
{
$data['lang'] = $lang;
}
// Set the API path
$path = '/account/settings.json';
// Send the request.
return $this->sendRequest($path, 'POST', $data);
}

La documentation de cette classe a été générée à partir du fichier suivant :