Class TwitterBase

Description

Twitter API abstract class

  • abstract:

Located in /twitter.lib.php (line 39)


	
			
Direct descendents
Class Description
Twitter Access to the Twitter API through HTTP auth
Method Summary
string blockExists (array $options, [string $format = 'xml'])
string createBlock (integer|string $id, [string $format = 'xml'])
string createFavorite (integer|string $id, [string $format = 'xml'])
string createFriendship ([array $options = array()], [string $format = 'xml'])
string destroyBlock (integer|string $id, [string $format = 'xml'])
string destroyFavorite (integer|string $id, [string $format = 'xml'])
string destroyFriendship (integer|string $id, [string $format = 'xml'])
string destroyMessage (integer|string $id, [string $format = 'xml'])
string destroyStatus (integer|string $id, [string $format = 'xml'])
string endSession ([string $format = 'xml'])
string follow (integer|string $id, [string $format = 'xml'])
string friendshipExists (integer|string $user_a, integer|string $user_b, [string $format = 'xml'])
string getBlocking (array $options, [string $format = 'xml'])
string getBlockingIDs ([string $format = 'xml'], array $options)
string getFavorites ([array $options = array()], [string $format = 'xml'])
string getFollowerIDs ([array $options = array()], [string $format = 'xml'])
string getFollowers ([array $options = array()], [string $format = 'xml'])
string getFriendIDs ([array $options = array()], [string $format = 'xml'])
string getFriends ([array $options = array()], [string $format = 'xml'])
string getFriendsTimeline ([array $options = array()], [string $format = 'xml'])
string getMentions ([array $options = array()], [string $format = 'xml'])
string getMessages ([array $options = array()], [string $format = 'xml'])
string getPublicTimeline ([string $format = 'xml'])
string getReplies ([array $options = array()], [string $format = 'xml'])
string getSentMessages ([array $options = array()], [string $format = 'xml'])
string getStatus (string|integer $id, [string $format = 'xml'])
string getUserTimeline ([array $options = array()], [string $format = 'xml'])
string lastApiCall ()
integer lastStatusCode ()
string leave (integer|string $id, [string $format = 'xml'])
string newMessage (string $user, string $text, [string $format = 'xml'])
string rateLimitStatus ([boolean $authenticate = false], [string $format = 'xml'])
string showUser ([array $options = array()], [string $format = 'xml'])
string test ([string $format = 'xml'])
string updateDeliveryDevice (string $device, [ $format = 'xml'])
string updateProfile (array $options, [string $format = 'xml'])
string updateProfileColors (array $options, [string $format = 'xml'])
string updateStatus (string $status, [string|integer $reply_to = null], [string $format = 'xml'])
string verifyCredentials ([string $format = 'xml'])
Methods
blockExists (line 426)

Returns if the authenticating user is blocking a target user.

string blockExists (array $options, [string $format = 'xml'])
  • array $options: Options to pass to the method
  • string $format: Return format
createBlock (line 404)

Blocks the user specified in the ID parameter as the authenticating user.

string createBlock (integer|string $id, [string $format = 'xml'])
  • integer|string $id: The ID or screen name of the user to block
  • string $format: Return format
createFavorite (line 360)

Favorites the status specified in the ID parameter as the authenticating user.

string createFavorite (integer|string $id, [string $format = 'xml'])
  • integer|string $id: The ID of the status to favorite
  • string $format: Return format
createFriendship (line 232)

Befriends the user specified in the ID parameter as the authenticating user.

string createFriendship ([array $options = array()], [string $format = 'xml'])
  • array $options: Options to pass to the method
  • string $format: Return format
destroyBlock (line 415)

Unblocks the user specified in the ID parameter as the authenticating user.

string destroyBlock (integer|string $id, [string $format = 'xml'])
  • integer|string $id: The ID or screen name of the user to unblock
  • string $format: Return format
destroyFavorite (line 371)

Un-favorites the status specified in the ID parameter as the authenticating user.

string destroyFavorite (integer|string $id, [string $format = 'xml'])
  • integer|string $id: The ID of the status to un-favorite
  • string $format: Return format
destroyFriendship (line 245)

Discontinues friendship with the user specified in the ID parameter as the authenticating user.

string destroyFriendship (integer|string $id, [string $format = 'xml'])
  • integer|string $id: The ID or screen name of the user to unfriend
  • string $format: Return format
destroyMessage (line 222)

Destroys the direct message specified in the required $id parameter.

string destroyMessage (integer|string $id, [string $format = 'xml'])
  • integer|string $id: The ID of the direct message to destroy
  • string $format: Return format
destroyStatus (line 144)

Destroys the status specified by the required ID parameter. The authenticating user must be the author of the specified status.

string destroyStatus (integer|string $id, [string $format = 'xml'])
  • integer|string $id: ID of the status to destroy
  • string $format: Return format
endSession (line 309)

Ends the session of the authenticating user, returning a null cookie.

string endSession ([string $format = 'xml'])
  • string $format: Return format
follow (line 382)

Enables notifications for updates from the specified user to the authenticating user.

string follow (integer|string $id, [string $format = 'xml'])
  • integer|string $id: The ID or screen name of the user to follow
  • string $format: Return format
friendshipExists (line 257)

Tests if a friendship exists between two users.

string friendshipExists (integer|string $user_a, integer|string $user_b, [string $format = 'xml'])
  • integer|string $user_a: The ID or screen name of the first user
  • integer|string $user_b: The ID or screen name of the second user
  • string $format: Return format
getBlocking (line 436)

Returns an array of user objects that the authenticating user is blocking.

string getBlocking (array $options, [string $format = 'xml'])
  • array $options: Options to pass to the method
  • string $format: Return format
getBlockingIDs (line 446)

Returns an array of numeric user ids the authenticating user is blocking.

string getBlockingIDs ([string $format = 'xml'], array $options)
  • array $options: Options to pass to the method
  • string $format: Return format
getFavorites (line 350)

Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.

string getFavorites ([array $options = array()], [string $format = 'xml'])
  • array $options: Options to pass to the method
  • string $format: Return format
getFollowerIDs (line 281)

Returns an array of numeric IDs for every user the specified user is following.

string getFollowerIDs ([array $options = array()], [string $format = 'xml'])
  • array $options: Options to pass to the method
  • string $format: Return format
getFollowers (line 164)

Returns the authenticating user's followers, each with current status inline.

string getFollowers ([array $options = array()], [string $format = 'xml'])
  • array $options: Options to pass to the method
  • string $format: Return format
getFriendIDs (line 271)

Returns an array of numeric IDs for every user the specified user is followed by.

string getFriendIDs ([array $options = array()], [string $format = 'xml'])
  • array $options: Options to pass to the method
  • string $format: Return format
getFriends (line 154)

Returns the authenticating user's friends, each with current status inline.

string getFriends ([array $options = array()], [string $format = 'xml'])
  • array $options: Options to pass to the method
  • string $format: Return format
getFriendsTimeline (line 78)

Returns the 20 most recent statuses posted by the authenticating user and that user's friends.

string getFriendsTimeline ([array $options = array()], [string $format = 'xml'])
  • array $options: Options to pass to the method
  • string $format: Return format
getMentions (line 98)

Returns the 20 most recent mentions (status containing @username) for the authenticating user.

string getMentions ([array $options = array()], [string $format = 'xml'])
  • array $options: Options to pass to the method
  • string $format: Return format
getMessages (line 187)

Returns a list of the 20 most recent direct messages sent to the authenticating user.

string getMessages ([array $options = array()], [string $format = 'xml'])
  • array $options: Options to pass to the method
  • string $format: Return format
getPublicTimeline (line 67)

Returns the 20 most recent statuses from non-protected users who have set a custom user icon.

string getPublicTimeline ([string $format = 'xml'])
  • string $format: Return format
getReplies (line 109)

Returns the 20 most recent @replies (status updates prefixed with @username) for the authenticating user.

  • deprecated:
string getReplies ([array $options = array()], [string $format = 'xml'])
  • array $options: Options to pass to the method
  • string $format: Return format
getSentMessages (line 197)

Returns a list of the 20 most recent direct messages sent by the authenticating user.

string getSentMessages ([array $options = array()], [string $format = 'xml'])
  • array $options: Options to pass to the method
  • string $format: Return format
getStatus (line 119)

Returns a single status, specified by the $id parameter.

string getStatus (string|integer $id, [string $format = 'xml'])
  • string|integer $id: The numerical ID of the status to retrieve
  • string $format: Return format
getUserTimeline (line 88)

Returns the 20 most recent statuses posted from the authenticating user.

string getUserTimeline ([array $options = array()], [string $format = 'xml'])
  • array $options: Options to pass to the method
  • string $format: Return format
lastApiCall (line 471)

Returns the URL of the last API call

string lastApiCall ()
lastStatusCode (line 463)

Returns the last HTTP status code

integer lastStatusCode ()
leave (line 393)

Disables notifications for updates from the specified user to the authenticating user.

string leave (integer|string $id, [string $format = 'xml'])
  • integer|string $id: The ID or screen name of the user to leave
  • string $format: Return format
newMessage (line 208)

Sends a new direct message to the specified user from the authenticating user.

string newMessage (string $user, string $text, [string $format = 'xml'])
  • string $user: The ID or screen name of a recipient
  • string $text: The message to send
  • string $format: Return format
rateLimitStatus (line 300)

Returns the remaining number of API requests available to the requesting user before the API limit is reached for the current hour.

string rateLimitStatus ([boolean $authenticate = false], [string $format = 'xml'])
  • boolean $authenticate: Authenticate before calling method
  • string $format: Return format
showUser (line 174)

Returns extended information of a given user.

string showUser ([array $options = array()], [string $format = 'xml'])
  • array $options: Options to pass to the method
  • string $format: Return format
test (line 455)

Returns the string "ok" in the requested format with a 200 OK HTTP status code.

string test ([string $format = 'xml'])
  • string $format: Return format
updateDeliveryDevice (line 318)

Sets which device Twitter delivers updates to for the authenticating user.

string updateDeliveryDevice (string $device, [ $format = 'xml'])
  • string $device: The delivery device used. Must be sms, im, or none
  • $format
updateProfile (line 339)

Sets values that users are able to set under the "Account" tab of their settings page.

string updateProfile (array $options, [string $format = 'xml'])
  • array $options: Options to pass to the method
  • string $format: Return format
updateProfileColors (line 329)

Sets one or more hex values that control the color scheme of the authenticating user's profile page on twitter.com.

string updateProfileColors (array $options, [string $format = 'xml'])
  • array $options: Options to pass to the method
  • string $format: Return format
updateStatus (line 130)

Updates the authenticated user's status.

string updateStatus (string $status, [string|integer $reply_to = null], [string $format = 'xml'])
  • string $status: Text of the status, no URL encoding necessary
  • string|integer $reply_to: ID of the status to reply to. Optional
  • string $format: Return format
verifyCredentials (line 290)

Returns an HTTP 200 OK response code and a representation of the requesting user if authentication was successful; returns a 401 status code and an error message if not.

string verifyCredentials ([string $format = 'xml'])
  • string $format: Return format

Documentation generated on Thu, 14 May 2009 05:53:14 -0400 by phpDocumentor 1.4.2