Lists

Method: lists()

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

Method: get()

Gets a Twitter list.

$lists->get($list_id, $params);
ArgumentTypeDescription
$list_idStringThe id of the listoptional
$paramsArrayavailable query parametersoptional

Create List

Method: create()

Create a new list on behalf of the authenticated user

$lists->create($list_name = 'Cool List', $list_description = 'testing', $private = false);
ArgumentTypeDescription
$list_namestringThe name of the listrequired
$list_descriptionstringDescription of the listoptional
$privateboolIf the list is private or not. Defaults to false.optional

Update List

Method: update()

Update an existing list on behalf of the authenticated user

$lists->update($list_id, $list_name, $list_description, $private);
ArgumentTypeDescription
$list_idstringThe id of the listrequired
$list_namestringThe name of the listoptional
$list_descriptionstringDescription of the listoptional
$privateboolIf the list is private or not. Defaults to false.optional

Delete List

Method: delete()

Delete a list owned by the authenticated user

$lists()->delete($list_id);
ArgumentTypeDescription
$list_idstringThe id of the listrequired

List Members

Method: members()

$members = $lists->members();

Get List Members

Method: lookup()

Gets the members of a given list

$members()->lookup($list_id, $params);
ArgumentTypeDescription
$list_idstringThe id of the listrequired
$paramsArraysee Twitter docs for avilable query parametersoptional

Add List Member

Method: add()

Add a member to a list

$members->add($list_id, $user_name);
ArgumentTypeDescription
$list_idstringThe id of the listrequired
$user_namestringthe twitter user name of the list memberrequired

Remove List Member

Method: remove()

Remove a member from a list

$members->remove($list_id, $user_name);
ArgumentTypeDescription
$list_idstringThe id of the listrequired
$user_namestringthe twitter user name of the list memberrequired

List Follows

Method: follows()

$follows = $lists->follows();

Get List Follows

Method: lookup()

Gets the followers of a given list

$follows->lookup($list_id, $params);
ArgumentTypeDescription
$list_idstringThe id of the listrequired
$paramsArraysee Twitter docs for avilable query parametersoptional

List Tweets

Method: tweets()

$tweets = $lists->tweets();

Lookup List Tweets

Method: lookup()

Retrieves Tweets from a specified List

$tweets->lookup($list_id, $params);
ArgumentTypeDescription
$list_idstringThe id of the listrequired
$paramsArraysee Twitter docs for avilable query parametersoptional

Reference

Edit this page on GitHub Updated at Tue, Jan 3, 2023