Lists
lists()
Method: Twitter Lists allows users to customize, organize and prioritize the Tweets they see in their timeline.
$twitter = new BirdElephant($credentials);
$lists = $twitter->lists()
Manage Lists
Get List
get()
Method: Gets a Twitter list.
$lists->get($list_id, $params);
Argument | Type | Description | |
---|---|---|---|
$list_id | String | The id of the list | optional |
$params | Array | available query parameters | optional |
Create List
create()
Method: Create a new list on behalf of the authenticated user
$lists->create($list_name = 'Cool List', $list_description = 'testing', $private = false);
Argument | Type | Description | |
---|---|---|---|
$list_name | string | The name of the list | required |
$list_description | string | Description of the list | optional |
$private | bool | If the list is private or not. Defaults to false. | optional |
Update List
update()
Method: Update an existing list on behalf of the authenticated user
$lists->update($list_id, $list_name, $list_description, $private);
Argument | Type | Description | |
---|---|---|---|
$list_id | string | The id of the list | required |
$list_name | string | The name of the list | optional |
$list_description | string | Description of the list | optional |
$private | bool | If the list is private or not. Defaults to false. | optional |
Delete List
delete()
Method: Delete a list owned by the authenticated user
$lists()->delete($list_id);
Argument | Type | Description | |
---|---|---|---|
$list_id | string | The id of the list | required |
List Members
members()
Method: $members = $lists->members();
Get List Members
lookup()
Method: Gets the members of a given list
$members()->lookup($list_id, $params);
Argument | Type | Description | |
---|---|---|---|
$list_id | string | The id of the list | required |
$params | Array | see Twitter docs for avilable query parameters | optional |
Add List Member
add()
Method: Add a member to a list
$members->add($list_id, $user_name);
Argument | Type | Description | |
---|---|---|---|
$list_id | string | The id of the list | required |
$user_name | string | the twitter user name of the list member | required |
Remove List Member
remove()
Method: Remove a member from a list
$members->remove($list_id, $user_name);
Argument | Type | Description | |
---|---|---|---|
$list_id | string | The id of the list | required |
$user_name | string | the twitter user name of the list member | required |
List Follows
follows()
Method: $follows = $lists->follows();
Get List Follows
lookup()
Method: Gets the followers of a given list
$follows->lookup($list_id, $params);
Argument | Type | Description | |
---|---|---|---|
$list_id | string | The id of the list | required |
$params | Array | see Twitter docs for avilable query parameters | optional |
List Tweets
tweets()
Method: $tweets = $lists->tweets();
Lookup List Tweets
lookup()
Method: Retrieves Tweets from a specified List
$tweets->lookup($list_id, $params);
Argument | Type | Description | |
---|---|---|---|
$list_id | string | The id of the list | required |
$params | Array | see Twitter docs for avilable query parameters | optional |