Skip to main content
Client for lists operations This client provides methods for interacting with the lists endpoints of the X API. It handles authentication, request formatting, and response parsing for all lists related operations.

Constructors

constructor

new ListsClient(client): ListsClient Creates a new lists client instance

Parameters

Returns

ListsClient

Defined in

lists/client.ts:294

Methods

getFollowers

getFollowers(id, options): Promise<Response> Get List followers Retrieves a list of Users who follow a specific List by its ID.

Parameters

Returns

Promise<Response> Promise resolving to the API response, or raw Response if requestOptions.raw is true

Defined in

lists/client.ts:339 getFollowers(id, options?): Promise<Get2ListsIdFollowersResponse>

Parameters

Returns

Promise<Get2ListsIdFollowersResponse>

Defined in

lists/client.ts:352

create

create(options): Promise<Response> Create List Creates a new List for the authenticated user.

Parameters

Returns

Promise<Response> Promise resolving to the API response, or raw Response if requestOptions.raw is true

Defined in

lists/client.ts:560 create(options?): Promise<ListCreateResponse>

Parameters

Returns

Promise<ListCreateResponse>

Defined in

lists/client.ts:569

getMembers

getMembers(id, options): Promise<Response> Get List members Retrieves a list of Users who are members of a specific List by its ID.

Parameters

Returns

Promise<Response> Promise resolving to the API response, or raw Response if requestOptions.raw is true

Defined in

lists/client.ts:665 getMembers(id, options?): Promise<Get2ListsIdMembersResponse>

Parameters

Returns

Promise<Get2ListsIdMembersResponse>

Defined in

lists/client.ts:678

addMember

addMember(id, options): Promise<Response> Add List member Adds a User to a specific List by its ID.

Parameters

Returns

Promise<Response> Promise resolving to the API response, or raw Response if requestOptions.raw is true

Defined in

lists/client.ts:890 addMember(id, options?): Promise<ListMutateResponse>

Parameters

Returns

Promise<ListMutateResponse>

Defined in

lists/client.ts:903

getPosts

getPosts(id, options): Promise<Response> Get List Posts Retrieves a list of Posts associated with a specific List by its ID.

Parameters

Returns

Promise<Response> Promise resolving to the API response, or raw Response if requestOptions.raw is true

Defined in

lists/client.ts:1011 getPosts(id, options?): Promise<Get2ListsIdTweetsResponse>

Parameters

Returns

Promise<Get2ListsIdTweetsResponse>

Defined in

lists/client.ts:1024

removeMemberByUserId

removeMemberByUserId(id, userId, options): Promise<Response> Remove List member Removes a User from a specific List by its ID and the User’s ID.

Parameters

Returns

Promise<Response> Promise resolving to the API response, or raw Response if requestOptions.raw is true

Defined in

lists/client.ts:1303 removeMemberByUserId(id, userId): Promise<ListMutateResponse>

Parameters

Returns

Promise<ListMutateResponse>

Defined in

lists/client.ts:1320

getById

getById(id, options): Promise<Response> Get List by ID Retrieves details of a specific List by its ID.

Parameters

Returns

Promise<Response> Promise resolving to the API response, or raw Response if requestOptions.raw is true

Defined in

lists/client.ts:1423 getById(id, options?): Promise<Get2ListsIdResponse>

Parameters

Returns

Promise<Get2ListsIdResponse>

Defined in

lists/client.ts:1436

update

update(id, options): Promise<Response> Update List Updates the details of a specific List owned by the authenticated user by its ID.

Parameters

Returns

Promise<Response> Promise resolving to the API response, or raw Response if requestOptions.raw is true

Defined in

lists/client.ts:1610 update(id, options?): Promise<ListUpdateResponse>

Parameters

Returns

Promise<ListUpdateResponse>

Defined in

lists/client.ts:1623

delete

delete(id, options): Promise<Response> Delete List Deletes a specific List owned by the authenticated user by its ID.

Parameters

Returns

Promise<Response> Promise resolving to the API response, or raw Response if requestOptions.raw is true

Defined in

lists/client.ts:1731 delete(id): Promise<ListDeleteResponse>

Parameters

Returns

Promise<ListDeleteResponse>

Defined in

lists/client.ts:1744