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);
}
- //destroy
- //
- //Discontinues friendship with the user specified in the ID parameter as the authenticating user. Returns the un-friended user in the requested format when successful. Returns a string describing the failure condition when unsuccessful.
- //
- //URL: http://twitter.com/friendships/destroy/id.format
- //
- //Formats: xml, json
- //
- //Parameters:
- //
- //* id. Required. The ID or screen name of the user with whom to discontinue friendship. Ex: http://twitter.com/friendships/destroy/12345.json or http://twitter.com/friendships/destroy/bob.xml
-
function destroy($args, $apidata) {
parent::handle($args);
}
- // Tests if a friendship exists between two users.
- //
- //
- // URL: http://twitter.com/friendships/exists.format
- //
- // Formats: xml, json, none
- //
- // Parameters:
- //
- // * user_a. Required. The ID or screen_name of the first user to test friendship for.
- // * user_b. Required. The ID or screen_name of the second user to test friendship for.
- // * Ex: http://twitter.com/friendships/exists.xml?user_a=alice&user_b=bob
-
function exists($args, $apidata) {
parent::handle($args);