twitter-openapi-typescript
Advanced tools
Comparing version 0.0.24 to 0.0.25
@@ -7,2 +7,3 @@ import * as i from 'twitter-openapi-typescript-generated'; | ||
mediaIds?: string[]; | ||
inReplyToTweetId?: string; | ||
extraParam?: { | ||
@@ -9,0 +10,0 @@ [key: string]: any; |
@@ -75,2 +75,8 @@ "use strict"; | ||
}); })) !== null && _b !== void 0 ? _b : []; | ||
if (param.inReplyToTweetId) { | ||
variables.reply = { | ||
excludeReplyUserIds: [], | ||
inReplyToTweetId: param.inReplyToTweetId, | ||
}; | ||
} | ||
return [4 /*yield*/, this.api.postCreateTweetRaw({ | ||
@@ -77,0 +83,0 @@ pathQueryId: this.flag[queryId]['queryId'], |
{ | ||
"name": "twitter-openapi-typescript", | ||
"version": "0.0.24", | ||
"version": "0.0.25", | ||
"description": "Implementation of Twitter internal API in TypeScript", | ||
@@ -24,3 +24,3 @@ "scripts": { | ||
"dependencies": { | ||
"twitter-openapi-typescript-generated": "^0.0.15" | ||
"twitter-openapi-typescript-generated": "^0.0.16" | ||
}, | ||
@@ -30,3 +30,2 @@ "devDependencies": { | ||
"@types/node": "*", | ||
"@types/node-fetch": "*", | ||
"@typescript-eslint/eslint-plugin": "*", | ||
@@ -41,6 +40,6 @@ "@typescript-eslint/parser": "*", | ||
"jest": "^29.7.0", | ||
"log4js": "^6.9.0", | ||
"ts-jest": "*", | ||
"log4js": "^6.9.0", | ||
"typescript": "^5.2.0" | ||
} | ||
} |
@@ -10,2 +10,3 @@ import * as i from 'twitter-openapi-typescript-generated'; | ||
mediaIds?: string[]; | ||
inReplyToTweetId?: string; | ||
extraParam?: { [key: string]: any }; | ||
@@ -63,2 +64,9 @@ }; | ||
if (param.inReplyToTweetId) { | ||
variables.reply = { | ||
excludeReplyUserIds: [], | ||
inReplyToTweetId: param.inReplyToTweetId, | ||
}; | ||
} | ||
const response = await this.api.postCreateTweetRaw({ | ||
@@ -65,0 +73,0 @@ pathQueryId: this.flag[queryId]['queryId'], |
@@ -11,2 +11,13 @@ import { getClient, logger } from '@test/init'; | ||
test('postCreateReplyTweet', async () => { | ||
logger.log('postCreateTweet'); | ||
const client = await getClient(); | ||
const time = new Date().toISOString(); | ||
const response = await client.getPostApi().postCreateTweet({ | ||
tweetText: `Test[${time}]`, | ||
inReplyToTweetId: '1726807635754914204', | ||
}); | ||
expect(response.raw.response.ok).toBe(true); | ||
}); | ||
test('postDeleteTweet', async () => { | ||
@@ -13,0 +24,0 @@ logger.log('postDeleteTweet'); |
import { TwitterOpenApi } from '@/api'; | ||
import fetch from 'node-fetch'; | ||
import * as dotenv from 'dotenv'; | ||
@@ -4,0 +3,0 @@ import * as log4js from 'log4js'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
261306
14
3872
+ Addedtwitter-openapi-typescript-generated@0.0.16(transitive)
- Removedtwitter-openapi-typescript-generated@0.0.15(transitive)