Constructors
constructor
• new ListsClient(client): ListsClient
Creates a new lists client instance
Parameters
| Name | Type | Description | 
|---|---|---|
client | Client | The main X API client instance | 
Returns
ListsClient
Defined in
lists/client.ts:188Methods
getFollowers
▸ getFollowers(id, options?): Promise<Get2ListsIdFollowersResponse>
Get List followers
Retrieves a list of Users who follow a specific List by its ID.
Parameters
| Name | Type | Description | 
|---|---|---|
id | string | The ID of the List. | 
options | GetFollowersOptions | - | 
Returns
Promise<Get2ListsIdFollowersResponse>
Promise resolving to the API response
Defined in
lists/client.ts:205getMembers
▸ getMembers(id, options?): Promise<Get2ListsIdMembersResponse>
Get List members
Retrieves a list of Users who are members of a specific List by its ID.
Parameters
| Name | Type | Description | 
|---|---|---|
id | string | The ID of the List. | 
options | GetMembersOptions | - | 
Returns
Promise<Get2ListsIdMembersResponse>
Promise resolving to the API response
Defined in
lists/client.ts:279addMember
▸ addMember(id, options?): Promise<ListMutateResponse>
Add List member
Adds a User to a specific List by its ID.
Parameters
| Name | Type | Description | 
|---|---|---|
id | string | The ID of the List for which to add a member. | 
options | AddMemberOptions | - | 
Returns
Promise<ListMutateResponse>
Promise resolving to the API response
Defined in
lists/client.ts:353removeMemberByUserId
▸ removeMemberByUserId(id, userId): Promise<ListMutateResponse>
Remove List member
Removes a User from a specific List by its ID and the User’s ID.
Parameters
| Name | Type | Description | 
|---|---|---|
id | string | The ID of the List to remove a member. | 
userId | string | The ID of User that will be removed from the List. | 
Returns
Promise<ListMutateResponse>
Promise resolving to the API response
Defined in
lists/client.ts:405getPosts
▸ getPosts(id, options?): Promise<Get2ListsIdTweetsResponse>
Get List Posts
Retrieves a list of Posts associated with a specific List by its ID.
Parameters
| Name | Type | Description | 
|---|---|---|
id | string | The ID of the List. | 
options | GetPostsOptions | - | 
Returns
Promise<Get2ListsIdTweetsResponse>
Promise resolving to the API response
Defined in
lists/client.ts:448getById
▸ getById(id, options?): Promise<Get2ListsIdResponse>
Get List by ID
Retrieves details of a specific List by its ID.
Parameters
| Name | Type | Description | 
|---|---|---|
id | string | The ID of the List. | 
options | GetByIdOptions | - | 
Returns
Promise<Get2ListsIdResponse>
Promise resolving to the API response
Defined in
lists/client.ts:540update
▸ update(id, options?): Promise<ListUpdateResponse>
Update List
Updates the details of a specific List owned by the authenticated user by its ID.
Parameters
| Name | Type | Description | 
|---|---|---|
id | string | The ID of the List to modify. | 
options | UpdateOptions | - | 
Returns
Promise<ListUpdateResponse>
Promise resolving to the API response
Defined in
lists/client.ts:602delete
▸ delete(id): Promise<ListDeleteResponse>
Delete List
Deletes a specific List owned by the authenticated user by its ID.
Parameters
| Name | Type | Description | 
|---|---|---|
id | string | The ID of the List to delete. | 
Returns
Promise<ListDeleteResponse>
Promise resolving to the API response
Defined in
lists/client.ts:650create
▸ create(options?): Promise<ListCreateResponse>
Create List
Creates a new List for the authenticated user.
Parameters
| Name | Type | 
|---|---|
options | CreateOptions | 
Returns
Promise<ListCreateResponse>
Promise resolving to the API response