Mutator Methods
In addition to the accessor methods described in the preceding section,you might alsowant to manipulate Twitter data.These methods require a POST operation for mutating
Twitter data and are split into the following categories of methods:
- Account
Twitter maintains a concise profile for every user that can be updated via the account/update_profile method.This can be used to update their name,description,and location.You can also update colors and images via the account/update_profile_background, account/update_profile_colors,and account/update_
profile_image methods.For users who want updates to be sent to their cellphone,you can set the account/update_delivery_device method.Finally,for ending a Twitter session,you should use the account/end_session method,which logs your user out of your application and Twitter.
- Block
One method exists for blocking nuisance users (blocks/create/<<id>>),and another exists for unblocking should a user change his mind (blocks/destroy/<<id>>).www.it-ebooks.info
- Direct messages
Some applications may want to send or delete messages on behalf of their users.Thedirect_messages/destroy/<<id>> and direct_messages/new methods exist for such a use case.
- Favorites
If you want to manage a user’s favorite tweets in your application,both the favorites/create/<<id>> and favorites/destroy/<<id>> methods should come in handy.Simply supplying an <<id>> will add or remove a favorite from a user’s profile.
- Friendships
For managing a user’s friends list,the friendships/create/<<id>> and friendships/destroy/<<id>> methods are particularly useful for creating and destroying connections.Like the methods for manipulating favorites,all you need to provide is an <<id>> of the user to follow or un-follow.
- Notifications
If users request to receive updates to their cell phone,you can use the notifications/follow/<<id>> and notifications/leave/<<id>> methods to set which friends they receive updates from.
- Saved searches
Users sometimes may want to store frequently requested searches into their profile so that they are easy to access at later dates.The saved_searches/create and saved_searches/destroy/<<id>> methods make this action seamless.
- Statuses
You can use status methods to create statuses (statuses/update) and to delete them (statuses/destroy/<<id>>).You can also use a status method to retweet a status (statuses/retweet/<<id>>).