From 22b8285586011ae11f82cc22e0ed2c0cafa76369 Mon Sep 17 00:00:00 2001 From: Rishikant181 Date: Fri, 25 Oct 2024 12:33:25 +0530 Subject: [PATCH 1/3] Updated linting rules --- .eslintrc.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index b286cc8..cdbef1a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -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'], @@ -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 From a60478d8bec4ad92e84a0014ece1954ab402945b Mon Sep 17 00:00:00 2001 From: Rishikant181 Date: Fri, 25 Oct 2024 12:57:11 +0530 Subject: [PATCH 2/3] Updated docs --- src/requests/List.ts | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/src/requests/List.ts b/src/requests/List.ts index cd601e2..9b7b46e 100644 --- a/src/requests/List.ts +++ b/src/requests/List.ts @@ -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. From 93031166124b725896c601ea69c55505863bdf58 Mon Sep 17 00:00:00 2001 From: Rishikant181 Date: Fri, 25 Oct 2024 13:00:07 +0530 Subject: [PATCH 3/3] Bumped version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 55422bc..b5a3723 100644 --- a/package.json +++ b/package.json @@ -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",