From 768c590f2b307b46d81803002c6d1030b1653940 Mon Sep 17 00:00:00 2001 From: Rishikant181 Date: Mon, 9 Sep 2024 12:49:16 +0530 Subject: [PATCH 1/8] Updated README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6528098d..af49f2d3 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ Rettiwt-API can be used with or without logging in to Twitter. As such, the two - User Highlights - User Likes - User Media + - User Notification - User Recommended Feed - User Replies Timeline - User Subscriptions @@ -381,6 +382,7 @@ So far, the following operations are supported: - [Getting the list of highlighted tweets of the given user](https://rishikant181.github.io/Rettiwt-API/classes/UserService.html#highlights) - [Getting the list of tweets liked by the logged-in user](https://rishikant181.github.io/Rettiwt-API/classes/UserService.html#likes) - [Getting the media timeline of the given user](https://rishikant181.github.io/Rettiwt-API/classes/UserService.html#media) +- [Streaming notifications of the logged-in user in pseudo-realtime](https://rishikant181.github.io/Rettiwt-API/classes/UserService.html#notifications) - [Getting the recommended feed of the logged-in user](https://rishikant181.github.io/Rettiwt-API/classes/UserService.html#recommended) - [Getting the replies timeline of the given user](https://rishikant181.github.io/Rettiwt-API/classes/UserService.html#replies) - [Getting the list of subscriptions of the given user](https://rishikant181.github.io/Rettiwt-API/classes/UserService.html#subscriptions) From a90aab615c2e2422c5829067d08cbd4ff726e2f1 Mon Sep 17 00:00:00 2001 From: Rishikant181 Date: Mon, 9 Sep 2024 12:49:51 +0530 Subject: [PATCH 2/8] Bumped version to stable --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 27e82bad..702689ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rettiwt-api", - "version": "4.1.0-alpha.2", + "version": "4.1.0", "main": "dist/index.js", "types": "dist/index.d.ts", "description": "An API for fetching data from TwitterAPI, without any rate limits!", From a72cb9650e01910a07522b8e8c7e38bd75c6fdc2 Mon Sep 17 00:00:00 2001 From: Rishikant181 Date: Mon, 16 Sep 2024 11:06:22 +0530 Subject: [PATCH 3/8] Fixed an incorrect validation rule for media upload --- src/models/args/PostArgs.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/models/args/PostArgs.ts b/src/models/args/PostArgs.ts index e29db448..fc7c0511 100644 --- a/src/models/args/PostArgs.ts +++ b/src/models/args/PostArgs.ts @@ -109,9 +109,16 @@ export class PostArgs { */ @IsEmpty({ groups: [ - EResourceType.MEDIA_UPLOAD_APPEND, - EResourceType.MEDIA_UPLOAD_FINALIZE, - EResourceType.MEDIA_UPLOAD_INITIALIZE, + EResourceType.TWEET_LIKE, + EResourceType.TWEET_POST, + EResourceType.TWEET_RETWEET, + EResourceType.TWEET_SCHEDULE, + EResourceType.TWEET_UNLIKE, + EResourceType.TWEET_UNPOST, + EResourceType.TWEET_UNRETWEET, + EResourceType.TWEET_UNSCHEDULE, + EResourceType.USER_FOLLOW, + EResourceType.USER_UNFOLLOW, ], }) @IsNotEmpty({ From c0bfec221e811763931ae13312b5b66d4dfee99e Mon Sep 17 00:00:00 2001 From: Rishikant181 Date: Mon, 16 Sep 2024 11:08:21 +0530 Subject: [PATCH 4/8] Bumped version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 702689ae..6ccfe045 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rettiwt-api", - "version": "4.1.0", + "version": "4.1.1", "main": "dist/index.js", "types": "dist/index.d.ts", "description": "An API for fetching data from TwitterAPI, without any rate limits!", From b2004a2df4e19489b215a39a5d86e72664cd8e46 Mon Sep 17 00:00:00 2001 From: Rishikant181 Date: Mon, 16 Sep 2024 11:08:58 +0530 Subject: [PATCH 5/8] Fixed rettiwt-core version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6ccfe045..9db8dc6e 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "commander": "11.1.0", "https-proxy-agent": "7.0.2", "rettiwt-auth": "2.1.0", - "rettiwt-core": "4.3.0-alpha.0" + "rettiwt-core": "4.3.0" }, "devDependencies": { "@types/node": "20.4.1", From 474cdffda7291b7107ea5e6aa4be00dc678afa34 Mon Sep 17 00:00:00 2001 From: Rishikant181 Date: Mon, 16 Sep 2024 11:23:08 +0530 Subject: [PATCH 6/8] Fixed lockfile --- yarn.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9bdae7d5..69dfa240 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2743,7 +2743,7 @@ __metadata: nodemon: "npm:2.0.20" prettier: "npm:3.0.0" rettiwt-auth: "npm:2.1.0" - rettiwt-core: "npm:4.3.0-alpha.0" + rettiwt-core: "npm:4.3.0" typedoc: "npm:0.24.8" typescript: "npm:5.1.6" bin: @@ -2765,13 +2765,13 @@ __metadata: languageName: node linkType: hard -"rettiwt-core@npm:4.3.0-alpha.0": - version: 4.3.0-alpha.0 - resolution: "rettiwt-core@npm:4.3.0-alpha.0" +"rettiwt-core@npm:4.3.0": + version: 4.3.0 + resolution: "rettiwt-core@npm:4.3.0" dependencies: axios: "npm:1.6.3" form-data: "npm:4.0.0" - checksum: 10c0/fd4d30b5c1e2582d05acb09a406004c76e3cb0ff9f600fed169b6d462755572d1196e662c170b9f4546a15d9be1f2e5e503a63bdd56830f9b431d832e9c64bc8 + checksum: 10c0/d81adf975057c45142d01cfd244589787b1a275d18d6d31a1d0dfe5499524aac54528ba3910b81a6e1cdf17ce73bde4ae275659b1dbf50e839b5888a09e9d4c1 languageName: node linkType: hard From ef4eafb52a619e16e8249a82480bce60a3024126 Mon Sep 17 00:00:00 2001 From: Rishikant181 Date: Fri, 4 Oct 2024 18:51:47 +0530 Subject: [PATCH 7/8] Added query parameter for searching tweets from a list with given id --- package.json | 2 +- src/commands/Tweet.ts | 4 ++++ src/models/args/FetchArgs.ts | 5 +++++ yarn.lock | 10 +++++----- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 9db8dc6e..058c532a 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "commander": "11.1.0", "https-proxy-agent": "7.0.2", "rettiwt-auth": "2.1.0", - "rettiwt-core": "4.3.0" + "rettiwt-core": "4.4.0-alpha.1" }, "devDependencies": { "@types/node": "20.4.1", diff --git a/src/commands/Tweet.ts b/src/commands/Tweet.ts index 59f90550..18951406 100644 --- a/src/commands/Tweet.ts +++ b/src/commands/Tweet.ts @@ -159,6 +159,7 @@ function createTweetCommand(rettiwt: Rettiwt): Command { 'Matches the tweets that do not contain any of the give comma-separated list of words', ) .option('-h, --hashtags ', 'Matches the tweets containing the given comma-separated list of hashtags') + .option('--list ', 'Matches the tweets from the list with the given id') .option( '-m, --mentions ', 'Matches the tweets that mention the given comma-separated list of usernames', @@ -284,6 +285,7 @@ class TweetSearchOptions { public from?: string; public hashtags?: string; public interval?: number; + public list?: string; public mentions?: string; public minLikes?: number; public minReplies?: number; @@ -309,6 +311,7 @@ class TweetSearchOptions { this.optionalWords = options?.optionalWords; this.excludeWords = options?.excludeWords; this.hashtags = options?.hashtags; + this.list = options?.list; this.mentions = options?.mentions; this.minReplies = options?.minReplies; this.minLikes = options?.minLikes; @@ -336,6 +339,7 @@ class TweetSearchOptions { optionalWords: this.optionalWords ? this.optionalWords.split(',') : undefined, excludeWords: this.excludeWords ? this.excludeWords.split(',') : undefined, hashtags: this.hashtags ? this.hashtags.split(',') : undefined, + list: this.list, mentions: this.mentions ? this.mentions.split(',') : undefined, minReplies: this.minReplies, minLikes: this.minLikes, diff --git a/src/models/args/FetchArgs.ts b/src/models/args/FetchArgs.ts index e9579c22..28e96012 100644 --- a/src/models/args/FetchArgs.ts +++ b/src/models/args/FetchArgs.ts @@ -339,6 +339,11 @@ export class TweetFilter extends TweetFilterCore { @IsBoolean() public links?: boolean; + /** The list from which tweets are to be searched. */ + @IsOptional() + @IsNumberString() + public list?: string; + /** The id of the tweet, before which the tweets are to be searched. */ @IsOptional() @IsNumberString() diff --git a/yarn.lock b/yarn.lock index 69dfa240..e9887ce6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2743,7 +2743,7 @@ __metadata: nodemon: "npm:2.0.20" prettier: "npm:3.0.0" rettiwt-auth: "npm:2.1.0" - rettiwt-core: "npm:4.3.0" + rettiwt-core: "npm:4.4.0-alpha.1" typedoc: "npm:0.24.8" typescript: "npm:5.1.6" bin: @@ -2765,13 +2765,13 @@ __metadata: languageName: node linkType: hard -"rettiwt-core@npm:4.3.0": - version: 4.3.0 - resolution: "rettiwt-core@npm:4.3.0" +"rettiwt-core@npm:4.4.0-alpha.1": + version: 4.4.0-alpha.1 + resolution: "rettiwt-core@npm:4.4.0-alpha.1" dependencies: axios: "npm:1.6.3" form-data: "npm:4.0.0" - checksum: 10c0/d81adf975057c45142d01cfd244589787b1a275d18d6d31a1d0dfe5499524aac54528ba3910b81a6e1cdf17ce73bde4ae275659b1dbf50e839b5888a09e9d4c1 + checksum: 10c0/108c4e254c43aeae8258dc4c02df37e2b9fb9305d8cf7c3aa1e849a441485c1a09e1b6d3d80a158a9f3c6aec0ec44e3283c358974c3cf778041542e69e55548c languageName: node linkType: hard From 1d251e6e3f28302fbcca8b6c048303ba4ec40116 Mon Sep 17 00:00:00 2001 From: Rishikant181 Date: Fri, 4 Oct 2024 18:56:41 +0530 Subject: [PATCH 8/8] Bumped version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 058c532a..ad8965b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rettiwt-api", - "version": "4.1.1", + "version": "4.2.0-alpha.0", "main": "dist/index.js", "types": "dist/index.d.ts", "description": "An API for fetching data from TwitterAPI, without any rate limits!",