class TwitapiaccountAction extends TwitterapiAction {
function is_readonly() {
- return false;
+
+ static $write_methods = array( 'update_location',
+ 'update_delivery_device');
+
+ $cmdtext = explode('.', $this->arg('method'));
+
+ if (in_array($cmdtext[0], $write_methods)) {
+ return false;
+ }
+
+ return true;
}
function verify_credentials($args, $apidata) {
class TwitapifriendshipsAction extends TwitterapiAction {
+ function is_readonly() {
+
+ static $write_methods = array( 'create',
+ 'destroy');
+
+ $cmdtext = explode('.', $this->arg('method'));
+
+ if (in_array($cmdtext[0], $write_methods)) {
+ return false;
+ }
+
+ return true;
+ }
+
function create($args, $apidata) {
parent::handle($args);
class TwitapistatusesAction extends TwitterapiAction {
function is_readonly() {
- return false;
+
+ static $write_methods = array( 'update',
+ 'destroy');
+
+ $cmdtext = explode('.', $this->arg('method'));
+
+ if (in_array($cmdtext[0], $write_methods)) {
+ return false;
+ }
+
+ return true;
}
function public_timeline($args, $apidata) {
parent::handle($args);
-
+
$sitename = common_config('site', 'name');
$siteserver = common_config('site', 'server');
$title = sprintf(_("%s public timeline"), $sitename);
$user = $apidata['user'];
+ $this->is_readonly();
+
+
$notice = DB_DataObject::factory('notice');
$notice->profile_id = $user->id; # user id *is* profile id