$this->end_document('xml');
} elseif ($apidata['content-type'] == 'json') {
$this->init_document('json');
- $this->show_twitter_json_users($twitter_user);
+ $this->show_json_objects($twitter_user);
$this->end_document('json');
} else {
common_user_error(_('API method not found!'), $code = 404);
common_element_end('entry');
}
- function show_twitter_json_statuses($twitter_statuses) {
- print(json_encode($twitter_statuses));
- }
-
- function show_twitter_json_users($twitter_users) {
- print(json_encode($twitter_users));
- }
-
- function show_twitter_json_dmsgs($twitter_dms) {
- print(json_encode($twitter_dms));
+ function show_json_objects($objects) {
+ print(json_encode($objects));
}
function show_single_xml_status($notice) {
function show_single_json_status($notice) {
$this->init_document('json');
$status = $this->twitter_status_array($notice);
- $this->show_twitter_json_statuses($status);
+ $this->show_json_objects($status);
$this->end_document('json');
exit();
}
}
}
- $this->show_twitter_json_statuses($statuses);
+ $this->show_json_objects($statuses);
$this->end_document('json');
}
$this->show_twitter_xml_user($profile_array);
break;
case 'json':
- $this->show_twitter_json_users($profile_array);
+ $this->show_json_objects($profile_array);
break;
default:
$this->client_error(_('Not a supported data format.'));