Skip to content

Commit

Permalink
Merge pull request #195 from Rishikant181/dev
Browse files Browse the repository at this point in the history
v4.4.0-alpha.4
  • Loading branch information
Rishikant181 authored Oct 25, 2024
2 parents e292694 + 9303116 commit 528a82a
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ module.exports = {
selector: ['variableLike', 'memberLike'],
format: ['camelCase'],
},
{
selector: ['variableLike', 'property'],
modifiers: ['private'],
format: ['camelCase'],
leadingUnderscore: 'require',
},
{
selector: ['variableLike', 'memberLike'],
modifiers: ['static', 'readonly'],
Expand Down Expand Up @@ -77,10 +83,41 @@ module.exports = {
'public-readonly-field',
'public-field',


// CONSTRUCTORS
'private-constructor',
'protected-constructor',
'public-constructor',


// GETTERS

// PRIVATE
'private-static-get',
'private-get',

// PROTECTED
'protected-static-get',
'protected-get',

// PUBLIC
'public-static-get',
'public-get',

// SETTERS

// PRIVATE
'private-static-set',
'private-set',

// PROTECTED
'protected-static-set',
'protected-set',

// PUBLIC
'public-static-set',
'public-set',


// METHODS

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rettiwt-core",
"version": "4.4.0-alpha.3",
"version": "4.4.0-alpha.4",
"description": "A library for generating requests for Twitter API",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
46 changes: 46 additions & 0 deletions src/requests/List.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,52 @@ export function details(id: string): AxiosRequestConfig {
};
}

/**
* @param id - The id of the list whose members are to be fetched.
* @param count - The number of members to fetch. Must be \<= 100.
* @param cursor - The cursor to the batch of members to fetch.
*/
export function members(id: string, count?: number, cursor?: string): AxiosRequestConfig {
return {
method: 'get',
url: 'https://x.com/i/api/graphql/dsJhIe3M0vCopjSfU6SlQw/ListMembers',
params: {
/* eslint-disable @typescript-eslint/naming-convention */
variables: JSON.stringify({
listId: id,
count: count,
cursor: cursor,
}),
features: JSON.stringify({
rweb_tipjar_consumption_enabled: true,
responsive_web_graphql_exclude_directive_enabled: true,
verified_phone_label_enabled: true,
creator_subscriptions_tweet_preview_api_enabled: true,
responsive_web_graphql_timeline_navigation_enabled: true,
responsive_web_graphql_skip_user_profile_image_extensions_enabled: false,
communities_web_enable_tweet_community_results_fetch: true,
c9s_tweet_anatomy_moderator_badge_enabled: true,
articles_preview_enabled: true,
responsive_web_edit_tweet_api_enabled: true,
graphql_is_translatable_rweb_tweet_is_translatable_enabled: true,
view_counts_everywhere_api_enabled: true,
longform_notetweets_consumption_enabled: true,
responsive_web_twitter_article_tweet_consumption_enabled: true,
tweet_awards_web_tipping_enabled: false,
creator_subscriptions_quote_tweet_preview_enabled: false,
freedom_of_speech_not_reach_fetch_enabled: true,
standardized_nudges_misinfo: true,
tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled: true,
rweb_video_timestamps_enabled: true,
longform_notetweets_rich_text_read_enabled: true,
longform_notetweets_inline_media_enabled: true,
responsive_web_enhance_cards_enabled: false,
}),
/* eslint-enable @typescript-eslint/naming-convention */
},
};
}

/**
* @param id - The id of the list whose tweets are to be fetched.
* @param count - The number of tweets to fetch. Must be \<= 100.
Expand Down

0 comments on commit 528a82a

Please sign in to comment.