TijsVerkoyen\Twitter\Twitter::usersSuggestions PHP Method

usersSuggestions() public method

Access to Twitter's suggested user list. This returns the list of suggested user categories. The category can be used in usersSuggestionsSlug to get the users in that category.
public usersSuggestions ( string[optional] $lang = null ) : array
$lang string[optional]
return array
    public function usersSuggestions($lang = null)
    {
        $parameters = null;
        if ($lang != null) {
            $parameters['lang'] = (string) $lang;
        }
        return $this->doCall('users/suggestions.json', $parameters, true);
    }

Usage Example

 /**
  * Tests Twitter->usersSuggestions
  */
 public function testUsersSuggestions()
 {
     $response = $this->twitter->usersSuggestions();
     foreach ($response as $row) {
         $this->assertArrayHasKey('size', $row);
         $this->assertArrayHasKey('name', $row);
         $this->assertArrayHasKey('slug', $row);
     }
 }
Twitter