PHP Class Horde_Service_Twitter_Statuses, horde

Copyright 2009-2016 Horde LLC (http://www.horde.org/)
Author: Michael J. Rubinsky ([email protected])
ファイルを表示 Open project: horde/horde

Public Methods

Method Description
__construct ( Horde_Service_Twitter $twitter ) Constructor
destroy ( string $id ) : string Destroy the specified status update, obviously only if the current user is the author of the update.
followers ( array $params = [] ) : unknown_type Returns a user's followers, each with current status inline. They are ordered by the order in which they were added as friends, 100 at a time.
friends ( array $params = [] ) : unknown_type Returns a user's friends, each with current status inline. They are ordered by the order in which they were added as friends, 100 at a time.
friendsTimeline ( array $params = [] ) : string Obtain the friendsTimeline.
homeTimeline ( array $params = [] ) : string Returns the 20 most recent statuses, including retweets, posted by the authenticating user and that user's friends. This is the equivalent of timeline/home on the Web.
mentions ( array $params = [] ) : string Obtain most recent 'mentions' for the current user. (i.e. all messages that contain @username in the text).
publicTimeline ( ) : string Obtain the last 20 tweets from the public timeline. This is cached every 60 seconds on Twitter's servers so we should eventually ensure this is only actually requested every 60 seconds or greater.
retweet ( $id ) : string Retweets a tweet. Requires the id parameter of the tweet you are retweeting. Request must be a POST or PUT.
retweetedByMe ( array $params = [] ) : string Returns the 20 most recent retweets posted by the authenticating user.
retweetedToMe ( array $params = [] ) : string Returns the 20 most recent retweets posted by the authenticating user's friends.
retweetsOfMe ( array $params = [] ) : string Returns the 20 most recent tweets of the authenticated user that have been retweeted by others.
show ( $id ) : string Obtain the requested status
update ( string $status, array $params = [] ) : string Update the current user's status.
userTimeline ( array $params = [] ) : string Obtain the friendsTimeline.

Method Details

__construct() public method

Constructor
public __construct ( Horde_Service_Twitter $twitter )
$twitter Horde_Service_Twitter

destroy() public method

http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses%C2%A0destroy
public destroy ( string $id ) : string
$id string The status id
return string

followers() public method

http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses%C2%A0friends
public followers ( array $params = [] ) : unknown_type
$params array Parameters for the friends_timeline call
  id         - For this user id or screen name.
               Current user if left out.
  user_id    - Specfies the ID of the user for whom to return the
               user_timeline. Helpful for disambiguating when a valid
               user ID is also a valid screen name.
  screen_id  - Specfies the screen name of the user for whom to return
               the user_timeline. Helpful for disambiguating when a
               valid screen name is also a user ID.
  page       - The page number to return (note there are pagination limits)
return unknown_type

friends() public method

http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses%C2%A0friends
public friends ( array $params = [] ) : unknown_type
$params array Parameters for the friends_timeline call
  id         - For this user id or screen name.
               Current user if left out.
  user_id    - Specfies the ID of the user for whom to return the
               user_timeline. Helpful for disambiguating when a valid
               user ID is also a valid screen name.
  screen_id  - Specfies the screen name of the user for whom to return
               the user_timeline. Helpful for disambiguating when a
               valid screen name is also a user ID.
  page       - The page number to return (note there are pagination limits)
return unknown_type

friendsTimeline() public method

http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses-friends_timeline NOTE: According to the API docs, this method is deprecated and will be going away in a future version of the API. This is to be replaced by home_timeline. http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses-home_timeline
public friendsTimeline ( array $params = [] ) : string
$params array Parameters for the friends_timeline call
  since_id         - Only tweets more recent the indicated tweet id
  max_id           - Only tweets older then the indeicated tweet id
  count            - Only return this many tweets (twitter limit = 200)
  page             - The page number to return (note there are
                     pagination limits)
  include_rts      - Include retweets
  include_entities - Include twitter entities (will be mandatory in
                     future twitter api release).
return string

homeTimeline() public method

http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses-home_timeline
public homeTimeline ( array $params = [] ) : string
$params array Parameters for the friends_timeline call
  since_id   - Only tweets more recent the indicated tweet id
  max_id     - Only tweets older then the indeicated tweet id
  count      - Only return this many tweets (twitter limit = 200)
  page       - The page number to return (note there are pagination limits)
return string

mentions() public method

http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses-mentions
public mentions ( array $params = [] ) : string
$params array Parameters for the friends_timeline call
  since_id   - Only tweets more recent the indicated tweet id
  max_id     - Only tweets older then the indeicated tweet id
  count      - Only return this many tweets (twitter limit = 200)
  page       - The page number to return (note there are pagination limits)
return string

publicTimeline() public method

Obtain the last 20 tweets from the public timeline. This is cached every 60 seconds on Twitter's servers so we should eventually ensure this is only actually requested every 60 seconds or greater.
public publicTimeline ( ) : string
return string

retweet() public method

Returns the original tweet with retweet details embedded.
public retweet ( $id ) : string
return string

retweetedByMe() public method

Returns the 20 most recent retweets posted by the authenticating user.
public retweetedByMe ( array $params = [] ) : string
$params array Parameters for the friends_timeline call
  since_id   - Only tweets more recent the indicated tweet id
  max_id     - Only tweets older then the indeicated tweet id
  count      - Only return this many tweets (twitter limit = 200)
  page       - The page number to return (note there are pagination limits)
return string

retweetedToMe() public method

Returns the 20 most recent retweets posted by the authenticating user's friends.
public retweetedToMe ( array $params = [] ) : string
$params array Parameters for the friends_timeline call
  since_id   - Only tweets more recent the indicated tweet id
  max_id     - Only tweets older then the indeicated tweet id
  count      - Only return this many tweets (twitter limit = 200)
  page       - The page number to return (note there are pagination limits)
return string

retweetsOfMe() public method

Returns the 20 most recent tweets of the authenticated user that have been retweeted by others.
public retweetsOfMe ( array $params = [] ) : string
$params array Parameters for the friends_timeline call
  since_id   - Only tweets more recent the indicated tweet id
  max_id     - Only tweets older then the indeicated tweet id
  count      - Only return this many tweets (twitter limit = 200)
  page       - The page number to return (note there are pagination limits)
return string

show() public method

Obtain the requested status
public show ( $id ) : string
return string The method call results.

update() public method

Update the current user's status.
public update ( string $status, array $params = [] ) : string
$status string The new status text.
$params array Any additional parameters.
  in_reply_to_status_id  - the status id this tweet is in response to.
return string

userTimeline() public method

http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses-user_timeline
public userTimeline ( array $params = [] ) : string
$params array Parameters for the friends_timeline call
  id         - For this user id or screen name.
               Current user if left out.
  user_id    - Specfies the ID of the user for whom to return the
               user_timeline. Helpful for disambiguating when a valid
               user ID is also a valid screen name.
  screen_id  - Specfies the screen name of the user for whom to return
               the user_timeline. Helpful for disambiguating when a
               valid screen name is also a user ID.
  since_id   - Only tweets more recent the indicated tweet id
  max_id     - Only tweets older then the indeicated tweet id
  count      - Only return this many tweets (twitter limit = 200)
  page       - The page number to return (note there are pagination limits)
return string