You are here

protected function Twitter::get_statuses in Twitter 6.5

Same name and namespace in other branches
  1. 6.3 twitter.lib.php \Twitter::get_statuses()
  2. 7.6 twitter.lib.php \Twitter::get_statuses()
  3. 7.3 twitter.lib.php \Twitter::get_statuses()
  4. 7.5 twitter.lib.php \Twitter::get_statuses()

Get an array of TwitterStatus objects from an API endpoint.

15 calls to Twitter::get_statuses()
Twitter::direct_messages in ./twitter.lib.php
Returns the 20 most recent direct messages sent to the authenticating user.
Twitter::direct_messages_destroy in ./twitter.lib.php
Destroys the direct message specified in the required ID parameter.
Twitter::direct_messages_sent in ./twitter.lib.php
Returns the 20 most recent direct messages sent by the authenticating user.
Twitter::direct_messages_show in ./twitter.lib.php
Returns a single direct message, specified by an id parameter.
Twitter::favorites_list in ./twitter.lib.php
Returns the 20 most recent favorited tweets for a user.

... See full list

File

./twitter.lib.php, line 224
Integration layer to communicate with the Twitter REST API 1.1. https://dev.twitter.com/docs/api/1.1

Class

Twitter
Primary Twitter API implementation class

Code

protected function get_statuses($path, $params = array()) {
  $values = $this
    ->call($path, $params, 'GET');

  // Check on successfull call.
  if ($values) {
    $statuses = array();
    foreach ($values as $status) {
      $statuses[] = new TwitterStatus($status);
    }
    return $statuses;
  }
  else {

    // As call already throws an exception, we can return an empty array to
    // break no code.
    return array();
  }
}