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:294Methods
getFollowers
▸ getFollowers(id, options): Promise<Response>
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 & { requestOptions: { raw: true } } | - |
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
| Name | Type |
|---|---|
id | string |
options? | GetFollowersOptions |
Returns
Promise<Get2ListsIdFollowersResponse>
Defined in
lists/client.ts:352create
▸ create(options): Promise<Response>
Create List
Creates a new List for the authenticated user.
Parameters
| Name | Type |
|---|---|
options | CreateOptions & { requestOptions: { raw: true } } |
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
| Name | Type |
|---|---|
options? | CreateOptions |
Returns
Promise<ListCreateResponse>
Defined in
lists/client.ts:569getMembers
▸ getMembers(id, options): Promise<Response>
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 & { requestOptions: { raw: true } } | - |
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
| Name | Type |
|---|---|
id | string |
options? | GetMembersOptions |
Returns
Promise<Get2ListsIdMembersResponse>
Defined in
lists/client.ts:678addMember
▸ addMember(id, options): Promise<Response>
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 & { requestOptions: { raw: true } } | - |
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
| Name | Type |
|---|---|
id | string |
options? | AddMemberOptions |
Returns
Promise<ListMutateResponse>
Defined in
lists/client.ts:903getPosts
▸ getPosts(id, options): Promise<Response>
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 & { requestOptions: { raw: true } } | - |
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
| Name | Type |
|---|---|
id | string |
options? | GetPostsOptions |
Returns
Promise<Get2ListsIdTweetsResponse>
Defined in
lists/client.ts:1024removeMemberByUserId
▸ 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
| 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. |
options | Object | - |
options.requestOptions | Object | - |
options.requestOptions.raw | true | - |
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
| Name | Type |
|---|---|
id | string |
userId | string |
Returns
Promise<ListMutateResponse>
Defined in
lists/client.ts:1320getById
▸ getById(id, options): Promise<Response>
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 & { requestOptions: { raw: true } } | - |
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
| Name | Type |
|---|---|
id | string |
options? | GetByIdOptions |
Returns
Promise<Get2ListsIdResponse>
Defined in
lists/client.ts:1436update
▸ update(id, options): Promise<Response>
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 & { requestOptions: { raw: true } } | - |
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
| Name | Type |
|---|---|
id | string |
options? | UpdateOptions |
Returns
Promise<ListUpdateResponse>
Defined in
lists/client.ts:1623delete
▸ delete(id, options): Promise<Response>
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. |
options | Object | - |
options.requestOptions | Object | - |
options.requestOptions.raw | true | - |
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
| Name | Type |
|---|---|
id | string |
Returns
Promise<ListDeleteResponse>