Service/Twitter/Proxy.php

Show: inherited
Table of Contents

\Conjoon_Service_Twitter_Proxy

Package: Default

This class proxies requests to the Twitter service and takes care of returning appropriate and easy to use objects depending on the requested actions.

Author
Thorsten Suckow-Homberg  

Properties

Propertyprivate\Conjoon_Service_Twitter  $_twitter= ''

Methods

methodpublic__construct( array | \Zend_Config $options ) : void

Creates a new instance of Conjoon_Service_Twitter_Proxy

Parameters
Name Type Description
$options array | \Zend_Config

a configuration object for this class, with at least the following key/values: - oauth_token - as provided by Twitter's oauth - oauth_token_secret - as provided by Twitter's oauth - user_id - id of the user as provided by the twitter service - screen_name - screen name of the user as provided by the twitter service

Throws
Exception Description
\InvalidArgumentException if $options was not of type array or Zend_Config or if any expected key was missing in $options
methodpublicaccountEndSession( ) : true

End current session

Returns
Type Description
true
methodpublicaccountVerifyCredentials( ) : true

Verifies account credentials.

Returns
Type Description
true or Conjoon_Modules_Service_Twitter_Account_Dto
methodpublicdeleteTweet( int $id ) : \Conjoon_Error

Destroy a status message.

Parameters
Name Type Description
$id int

ID of status to destroy

Returns
Type Description
\Conjoon_Error if any error occured, otherwise Conjoon_Modules_Service_Twitter_Tweet with the data of the deleted tweet
methodpublicfavoriteTweet( int $id, boolean $favorite = false ) : \Conjoon_Error

Favorites or unfavorites a tweet based on the $favorite parameter.

Parameters
Name Type Description
$id int

Id of the tweet to (un)favorite

$favorite boolean

true to favorite the tweet, false tounfavorite it

Returns
Type Description
\Conjoon_Error if any error occured, otherwise Conjoon_Modules_Service_Twitter_Tweet with the data of the (un)favorited tweet
Details
Todo
"favorited" in xml response returns always false as of 12-July 2009 check back later for proper return value  
methodpublicfriendshipCreate( int | string $id ) : true

Create friendship

Parameters
Name Type Description
$id int | string

User ID or name of new friend

Returns
Type Description
true or Conjoon_Error
methodpublicfriendshipDestroy( int | string $id ) : true

Destroy friendship

Parameters
Name Type Description
$id int | string

User ID or name of friend to remove

Returns
Type Description
true or Conjoon_Error
methodpublicfriendshipExists( mixed $userId ) : boolean

Returns true if userA follows userB, otherwise false.

Parameters
Name Type Description
$userId mixed

either the screenName or the id of the user to check the friendship against

Returns
Type Description
boolean (true/false) or Conjoon_Error
methodpublicstatusFriendsTimeline( ) : mixed

Retrieves the recent tweets of the users followed by the authenticated user.

Returns
Type Description
mixed Either an array with the recent tweets, or a Conjoon_Error object
methodpublicstatusShow( int $id ) : \Conjoon_Error

Show a single status

Parameters
Name Type Description
$id int

Id of status to show

Returns
Type Description
\Conjoon_Error if any error occures, otherwise an instance of Conjoon_Modules_Service_Twitter_Tweet
methodpublicstatusUpdate( string $status, int $in_reply_to_status_id = null ) : mixed

Update user's current status

Parameters
Name Type Description
$status string
$in_reply_to_status_id int
Returns
Type Description
mixed Conjoon_Error on failure, or an Conjoon_Modules_Service_Twitter_Tweet object on success
methodpublicstatusUserTimeline( array $params = array() ) : \Conjoon_Error

Returns the recent tweets of the user with the speified id.

Parameters
Name Type Description
$params array

A list of parameters to send to the Twitter service

Returns
Type Description
\Conjoon_Error if any error occures, otherwise an array with the Conjoon_Modules_Service_Twitter_Tweet objects
Documentation was generated by DocBlox 0.18.1.