## Class Twitter

(line 22)

## Description

    BaseService
       |
       --Twitter

Located in File: /services/Twitter.php

##### SWX Twitter API by Aral Balkan. You can call this API using SWX, Amfphp, JSON and XML-RPC.

## Class Variables

Summary:

## Class Constants

Summary:

## Method Detail

Summary:
Twitter Twitter ()
(bool) addFriend ((int) $friendId, (str) $friendUserName, (str) $yourUserName, (str) $yourPassWord)
(array) directMessages ((str) $user, (str) $pass, [(str) $since = NULL])
(array) followers ((str) $user, (str) $pass)
(array) followersWhoAreNotFriends ((str) $user, (str) $pass)
(bool) followFriend ((int) $friendId, (str) $friendUserName, (str) $yourUserName, (str) $yourPassWord)
(array) friends ((str) $user, (str) $pass)
(array) friendsNoAuth ((str) $user)
Array friendsTimeline (Your $user, Your $pass, [(optional) $id = NULL], [(optional) $since = NULL])
array getNumFriendsUpdates ((str) $userName, [(int) $n = 20], [(str) $since = NULL])
array getNumPublicTimelineUpdates ([(int) $n = 20], [(str) $since = NULL])
(bool) leaveFriend ((int) $friendId, (str) $friendUserName, (str) $yourUserName, (str) $yourPassWord)
The newDirectMessage (User $recipient, Message $message, Your $user, Your $pass)
Array publicTimeline ([(optional) $sinceId = NULL], (optional) 1)
(bool) removeFriend ((int) $friendId, (str) $friendUserName, (str) $yourUserName, (str) $yourPassWord)
void showStatus (The $id)
Information showUser ((str/int) $id, (str) $user, (str) $pass)
(array) update ((str) $update, (str) $user, (str) $pass, [(optional, $source = NULL])
void userTimeline ( $user, $pass, [ $id = NULL], [ $count = NULL], [ $since = NULL])

#### Constructor Twitter (line 24)

#### Twitter Twitter( )

#### Info

#### Method addFriend (line 464)

#### (bool) addFriend( (int) $friendId, (str) $friendUserName, (str) $yourUserName, (str) $yourPassWord)

##### Adds friend with passed friend ID and user name.

This method is *not* in the official Twitter API and uses cURL.

#### Parameters

- (int) $friendId: Friend ID
- (str) $friendUserName: Friend's user name
- (str) $yourUserName: Your user name
- (str) $yourPassWord: Your password

#### Info

- return - Success (true/false).
- author - Aral Balkan

#### Method directMessages (line 305)

#### (array) directMessages( (str) $user, (str) $pass, [(str) $since = NULL])

##### Returns the list of direct messages for the passed user.

#### Parameters

- (str) $user: Your user name
- (str) $pass: Your password
- (str) $since: Since (optional)

#### Info

- return - List of direct messages
- author - Aral Balkan

#### Method followers (line 242)

#### (array) followers( (str) $user, (str) $pass)

##### Gets followers for authenticated user.

#### Parameters

- (str) $user: Your username.
- (str) $pass: Your password.

#### Info

- return - List of followers.
- author - Aral Balkan

#### Method followersWhoAreNotFriends (line 152)

#### (array) followersWhoAreNotFriends( (str) $user, (str) $pass)

##### Returns followers who are not friends.

#### Parameters

- (str) $user: User name.
- (str) $pass: Password.

#### Info

- return - List of followers that are not friends.
- author - Aral Balkan

#### Method followFriend (line 488)

#### (bool) followFriend( (int) $friendId, (str) $friendUserName, (str) $yourUserName, (str) $yourPassWord)

##### Follows friend with passed friend ID and user name.

This method is *not* in the official Twitter API and uses cURL.

#### Parameters

- (int) $friendId: Friend ID
- (str) $friendUserName: Friend's user name
- (str) $yourUserName: Your user name
- (str) $yourPassWord: Your password

#### Info

- return - Success (true/false).
- author - Aral Balkan

#### Method friends (line 209)

#### (array) friends( (str) $user, (str) $pass)

##### Gets friends for the passed user.

#### Parameters

- (str) $user: Username.
- (str) $pass: Password.

#### Info

- return - List of friends.
- author - Aral Balkan

#### Method friendsNoAuth (line 226)

#### (array) friendsNoAuth( (str) $user)

##### Gets friends for the passed user name. Doesn't require authentication but will not return friends who have set themselves to private.

#### Parameters

- (str) $user: User name

#### Info

- return - List of friends.
- author - Aral Balkan

#### Method friendsTimeline (line 66)

#### Array friendsTimeline( Your $user, Your $pass, [(optional) $id = NULL], [(optional) $since = NULL])

##### Returns the 20 most recent statuses posted in the last 24 hours from the authenticating user and that user's friends. It's also possible to request another user's friends_timeline via the id parameter.

#### Parameters

- Your $user: username.
- Your $pass: password.
- (optional) $id: ID or screen name of the user for whom to return the friends_timeline.
- (optional) $since: Narrows the returned results to just those statuses created after the specified HTTP-formatted date.

#### Info

- return - of statuses.
- author - Aral Balkan

#### Method getNumFriendsUpdates (line 408)

#### array getNumFriendsUpdates( (str) $userName, [(int) $n = 20], [(str) $since = NULL])

##### Returns the number of updates for the user and her friends (up to 20) for the passed user name (or email).

Note that when calling this without the since parameter, the results appear to be affected by the caching that Twitter has implemented and the results may not be the most recent.

#### Parameters

- (str) $userName: User name (or email)
- (int) $n: Number of updates to get (max 20)
- (str) $since: (optional) URL-encoded date

#### Info

- return - Updates
- author - Aral Balkan

#### Method getNumPublicTimelineUpdates (line 354)

#### array getNumPublicTimelineUpdates( [(int) $n = 20], [(str) $since = NULL])

##### Returns the number of requested updates from the public timeline (max 20).

#### Parameters

- (int) $n: Number of updates to get (max 20)
- (str) $since: URL-encoded date

#### Info

- return - Updates
- author - Aral Balkan

#### Method leaveFriend (line 512)

#### (bool) leaveFriend( (int) $friendId, (str) $friendUserName, (str) $yourUserName, (str) $yourPassWord)

##### Leaves friend with passed friend ID and user name.

This method is *not* in the official Twitter API and uses cURL.

#### Parameters

- (int) $friendId: Friend ID
- (str) $friendUserName: Friend's user name
- (str) $yourUserName: Your user name
- (str) $yourPassWord: Your password

#### Info

- return - Success (true/false).
- author - Aral Balkan

#### Method newDirectMessage (line 328)

#### The newDirectMessage( User $recipient, Message $message, Your $user, Your $pass)

##### Sends a direct message

#### Parameters

- User $recipient: name of recipient
- Message $message: to send
- Your $user: username
- Your $pass: password

#### Info

- return - sent direct message.
- author - Aral Balkan

#### Method publicTimeline (line 44)

#### Array publicTimeline( [(optional) $sinceId = NULL], (optional) 1)

##### Returns the 20 most recent statuses from non-protected users who have set a custom user icon. Does not require authentication.

#### Parameters

- (optional) 1: Narrows the returned results to just those statuses created after the specified HTTP-formatted date.
- (optional) $sinceId: Returns only public statuses with an ID greater than (that is, more recent than) the specified.

#### Info

- return - of statuses.
- author - Aral Balkan

#### Method removeFriend (line 536)

#### (bool) removeFriend( (int) $friendId, (str) $friendUserName, (str) $yourUserName, (str) $yourPassWord)

##### Removes friend with passed friend ID and user name.

This method is *not* in the official Twitter API and uses cURL.

#### Parameters

- (int) $friendId: Friend ID
- (str) $friendUserName: Friend's user name
- (str) $yourUserName: Your user name
- (str) $yourPassWord: Your password

#### Info

- return - Success (true/false).
- author - Aral Balkan

#### Method showStatus (line 103)

#### void showStatus( The $id)

##### Returns a single status, specified by the id parameter below. The status's author will be returned inline.

#### Parameters

- The $id: numerical ID of the status you're trying to retrieve.

#### Info

- author - Aral Balkan

#### Method showUser (line 286)

#### Information showUser( (str/int) $id, (str) $user, (str) $pass)

##### Returns extended information of a given user, specified by ID or screen name as per the required id parameter below. This information includes design settings, so third party developers can theme their widgets according to a given user's preferences.

#### Parameters

- (str/int) $id: The ID or screen name of a user.
- (str) $user: Your username.
- (str) $pass: Your password.

#### Info

- return - on user.
- author - Aral Balkan

#### Method update (line 124)

#### (array) update( (str) $update, (str) $user, (str) $pass, [(optional, $source = NULL])

##### Posts a twitter update.

#### Parameters

- (str) $update: Twitter update message
- (str) $user: Your user name
- (str) $pass: Your password
- (optional, $source: str) Source string. If enabled by Twitter, this will appear in the "from" section of the update.

#### Info

- return - Success/failure message.
- author - Aral Balkan

#### Method userTimeline (line 84)

#### void userTimeline( $user, $pass, [ $id = NULL], [ $count = NULL], [ $since = NULL])

##### Returns the 20 most recent statuses posted in the last 24 hours from the authenticating user. It's also possible to request another user's timeline via the id parameter below.

#### Parameters

- $user:
- $pass:
- $id:
- $count:
- $since:

#### Info

- author - Aral Balkan

## Inherited Variables

### Inherited Class Variable Summary

## Inherited Methods

### Inherited Method Summary

Documentation generated on Fri, 06 Jul 2007 19:54:54 +0100 by phpDocumentor 1.3.1