protected function Twitter::get_users in Twitter 7.6
Same name and namespace in other branches
- 6.5 twitter.lib.php \Twitter::get_users()
- 7.5 twitter.lib.php \Twitter::get_users()
Get an array of TwitterAccount objects from an API endpoint
4 calls to Twitter::get_users()
- Twitter::users_contributees in ./
twitter.lib.php - Returns a collection of users that the specified user can "contribute" to.
- Twitter::users_contributors in ./
twitter.lib.php - Returns a collection of users who can contribute to the specified account.
- Twitter::users_lookup in ./
twitter.lib.php - Returns fully-hydrated user objects for up to 100 users per request, as specified by comma-separated values passed to the user_id and/or screen_name parameters.
- Twitter::users_search in ./
twitter.lib.php - Provides a simple, relevance-based search interface to public user accounts on Twitter.
File
- ./
twitter.lib.php, line 295 - Integration layer to communicate with the Twitter REST API 1.1. https://dev.twitter.com/docs/api/1.1
Class
- Primary Twitter API implementation class
Code
protected function get_users($path, $params = array()) {
$values = $this
->call($path, $params, 'GET');
// Check on successfull call
if ($values) {
$users = array();
foreach ($values as $user) {
$users[] = new TwitterAccount($user);
}
return $users;
}
else {
// As call allready throws an exception, we can return an empty array to
// break no code.
return array();
}
}