10 defined(
'JPATH_PLATFORM') or die();
37 public function updateProfile($name = null, $url = null, $location = null, $description = null, $entities = null, $skip_status = null)
40 $this->checkRateLimit(
'account',
'update_profile');
47 $data[
'name'] = $name;
59 $data[
'location'] = $location;
65 $data[
'description'] = $description;
69 if (!is_null($entities))
71 $data[
'include_entities'] = $entities;
75 if (!is_null($skip_status))
77 $data[
'skip_status'] = $skip_status;
81 $path =
'/account/update_profile.json';
84 return $this->sendRequest($path,
'POST', $data);
102 public function updateProfileBackgroundImage($image = null, $tile =
false, $entities = null, $skip_status = null, $use =
false)
105 $this->checkRateLimit(
'account',
'update_profile_background_image');
112 $data[
'image'] =
"@{$image}";
118 $data[
'tile'] = $tile;
122 if (!is_null($entities))
124 $data[
'include_entities'] = $entities;
128 if (!is_null($skip_status))
130 $data[
'skip_status'] = $skip_status;
140 $path =
'/account/update_profile_background_image.json';
142 $header = array(
'Content-Type' =>
'multipart/form-data',
'Expect' =>
'');
145 return $this->sendRequest($path,
'POST', $data, $header);
160 public function updateProfileImage($image = null, $entities = null, $skip_status = null)
163 $this->checkRateLimit(
'account',
'update_profile_image');
170 $data[
'image'] =
"@{$image}";
174 if (!is_null($entities))
176 $data[
'include_entities'] = $entities;
180 if (!is_null($skip_status))
182 $data[
'skip_status'] = $skip_status;
186 $path =
'/account/update_profile_image.json';
188 $header = array(
'Content-Type' =>
'multipart/form-data',
'Expect' =>
'');
191 return $this->sendRequest($path,
'POST', $data, $header);
210 public function updateProfileColors($background = null, $link = null, $sidebar_border = null, $sidebar_fill = null, $text = null,
211 $entities = null, $skip_status = null)
214 $this->checkRateLimit(
'account',
'update_profile_colors');
221 $data[
'profile_background_color'] = $background;
227 $data[
'profile_link_color'] = $link;
233 $data[
'profile_sidebar_border_color'] = $sidebar_border;
239 $data[
'profile_sidebar_fill_color'] = $sidebar_fill;
245 $data[
'profile_text_color'] = $text;
249 if (!is_null($entities))
251 $data[
'include_entities'] = $entities;
255 if (!is_null($skip_status))
257 $data[
'skip_status'] = $skip_status;
261 $path =
'/account/update_profile_colors.json';
264 return $this->sendRequest($path,
'POST', $data);
274 public function getSettings()
277 $this->checkRateLimit(
'account',
'settings');
280 $path =
'/account/settings.json';
283 return $this->sendRequest($path);
301 public function updateSettings($location = null, $sleep_time =
false, $start_sleep = null, $end_sleep = null,
302 $time_zone = null, $lang = null)
309 $data[
'trend_location_woeid '] = $location;
315 $data[
'sleep_time_enabled'] = $sleep_time;
321 $data[
'start_sleep_time'] = $start_sleep;
327 $data[
'end_sleep_time'] = $end_sleep;
333 $data[
'time_zone'] = $time_zone;
339 $data[
'lang'] = $lang;
343 $path =
'/account/settings.json';
346 return $this->sendRequest($path,
'POST', $data);