@pipedream/twitter 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -3
- package/dist/actions/add-user-to-list/add-user-to-list.d.ts +3 -189
- package/dist/actions/add-user-to-list/add-user-to-list.mjs +4 -2
- package/dist/actions/create-tweet/create-tweet.d.ts +1 -63
- package/dist/actions/create-tweet/create-tweet.mjs +2 -2
- package/dist/actions/delete-tweet/delete-tweet.d.ts +2 -126
- package/dist/actions/delete-tweet/delete-tweet.mjs +4 -3
- package/dist/actions/follow-user/follow-user.d.ts +2 -126
- package/dist/actions/follow-user/follow-user.mjs +2 -2
- package/dist/actions/get-tweet/get-tweet.d.ts +2 -876
- package/dist/actions/get-tweet/get-tweet.mjs +4 -5
- package/dist/actions/get-user/get-user.d.ts +2 -503
- package/dist/actions/get-user/get-user.mjs +10 -7
- package/dist/actions/like-tweet/like-tweet.d.ts +2 -126
- package/dist/actions/like-tweet/like-tweet.mjs +4 -3
- package/dist/actions/list-favorites/list-favorites.d.ts +46 -982
- package/dist/actions/list-favorites/list-favorites.mjs +1 -3
- package/dist/actions/list-followers/list-followers.d.ts +46 -609
- package/dist/actions/list-followers/list-followers.mjs +1 -3
- package/dist/actions/list-lists/list-lists.d.ts +46 -608
- package/dist/actions/list-lists/list-lists.mjs +1 -3
- package/dist/actions/list-mentions/list-mentions.d.ts +46 -982
- package/dist/actions/list-mentions/list-mentions.mjs +1 -3
- package/dist/actions/list-user-tweets/list-user-tweets.d.ts +46 -982
- package/dist/actions/list-user-tweets/list-user-tweets.mjs +1 -3
- package/dist/actions/retweet/retweet.d.ts +2 -126
- package/dist/actions/retweet/retweet.mjs +6 -3
- package/dist/actions/simple-search/simple-search.d.ts +46 -982
- package/dist/actions/simple-search/simple-search.mjs +2 -3
- package/dist/actions/simple-search-in-list/simple-search-in-list.d.ts +51 -987
- package/dist/actions/simple-search-in-list/simple-search-in-list.mjs +1 -3
- package/dist/actions/unfollow-user/unfollow-user.d.ts +2 -126
- package/dist/actions/unfollow-user/unfollow-user.mjs +1 -1
- package/dist/actions/unlike-tweet/unlike-tweet.d.ts +2 -126
- package/dist/actions/unlike-tweet/unlike-tweet.mjs +4 -3
- package/dist/app/twitter.app.d.ts +2 -64
- package/dist/app/twitter.app.mjs +19 -69
- package/dist/common/additionalProps.d.ts +0 -0
- package/dist/common/additionalProps.mjs +138 -0
- package/dist/common/methods.mjs +36 -15
- package/dist/common/types/requestParams.d.ts +3 -1
- package/dist/sources/common/base.d.ts +2 -64
- package/dist/sources/common/base.mjs +5 -7
- package/dist/sources/new-follower-of-user/new-follower-of-user.d.ts +4 -505
- package/dist/sources/new-follower-of-user/new-follower-of-user.mjs +4 -8
- package/dist/sources/new-list-followed/new-list-followed.d.ts +4 -504
- package/dist/sources/new-list-followed/new-list-followed.mjs +4 -8
- package/dist/sources/new-tweet-in-list/new-tweet-in-list.d.ts +4 -878
- package/dist/sources/new-tweet-in-list/new-tweet-in-list.mjs +4 -8
- package/dist/sources/new-tweet-liked-by-user/new-tweet-liked-by-user.d.ts +4 -878
- package/dist/sources/new-tweet-liked-by-user/new-tweet-liked-by-user.mjs +4 -8
- package/dist/sources/new-tweet-posted-by-user/new-tweet-posted-by-user.d.ts +4 -878
- package/dist/sources/new-tweet-posted-by-user/new-tweet-posted-by-user.mjs +4 -8
- package/dist/sources/new-tweet-posted-matching-query/new-tweet-posted-matching-query.d.ts +4 -878
- package/dist/sources/new-tweet-posted-matching-query/new-tweet-posted-matching-query.mjs +4 -11
- package/dist/sources/new-unfollower-of-user/new-unfollower-of-user.d.ts +2 -126
- package/dist/sources/new-unfollower-of-user/new-unfollower-of-user.mjs +1 -1
- package/dist/sources/new-user-followed/new-user-followed.d.ts +4 -505
- package/dist/sources/new-user-followed/new-user-followed.mjs +4 -8
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/common/propGroups.d.ts +0 -1509
- package/dist/common/propGroups.mjs +0 -82
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import app from "../../app/twitter.app.mjs";
|
|
2
2
|
import { defineAction } from "@pipedream/types";
|
|
3
3
|
import { getMultiItemSummary, getTweetFields, } from "../../common/methods.mjs";
|
|
4
|
-
import { tweetFieldProps } from "../../common/propGroups.mjs";
|
|
5
4
|
export const DOCS_LINK = "https://developer.twitter.com/en/docs/twitter-api/lists/list-tweets/api-reference/get-lists-id-tweets";
|
|
6
5
|
const MIN_RESULTS = 1;
|
|
7
6
|
const DEFAULT_RESULTS = 100;
|
|
@@ -10,7 +9,7 @@ export default defineAction({
|
|
|
10
9
|
key: "twitter-simple-search-in-list",
|
|
11
10
|
name: "Search Tweets in List",
|
|
12
11
|
description: `Search Tweets by text in a list. [See docs here](${DOCS_LINK})`,
|
|
13
|
-
version: "1.
|
|
12
|
+
version: "1.1.1",
|
|
14
13
|
type: "action",
|
|
15
14
|
props: {
|
|
16
15
|
app,
|
|
@@ -25,7 +24,6 @@ export default defineAction({
|
|
|
25
24
|
type: "string[]",
|
|
26
25
|
description: "Text to filter tweets by. If you include more than one item in this array, only tweets that match all items will be returned. You can use the pipe character `|` to define multiple strings within an item, and it will be considered a match if the tweet contains any of them.",
|
|
27
26
|
},
|
|
28
|
-
...tweetFieldProps,
|
|
29
27
|
maxResults: {
|
|
30
28
|
propDefinition: [
|
|
31
29
|
app,
|
|
@@ -14,6 +14,7 @@ declare const _default: import("@pipedream/types").Action<{
|
|
|
14
14
|
followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
|
|
15
15
|
getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
16
16
|
getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
17
|
+
getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
17
18
|
getAuthenticatedUserId(): Promise<string>;
|
|
18
19
|
getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
19
20
|
getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
@@ -62,69 +63,6 @@ declare const _default: import("@pipedream/types").Action<{
|
|
|
62
63
|
label: string;
|
|
63
64
|
description: string;
|
|
64
65
|
};
|
|
65
|
-
listExpansions: {
|
|
66
|
-
type: string;
|
|
67
|
-
label: string;
|
|
68
|
-
optional: boolean;
|
|
69
|
-
description: string;
|
|
70
|
-
options: string[];
|
|
71
|
-
};
|
|
72
|
-
tweetExpansions: {
|
|
73
|
-
type: string;
|
|
74
|
-
label: string;
|
|
75
|
-
optional: boolean;
|
|
76
|
-
description: string;
|
|
77
|
-
options: string[];
|
|
78
|
-
};
|
|
79
|
-
userExpansions: {
|
|
80
|
-
type: string;
|
|
81
|
-
label: string;
|
|
82
|
-
optional: boolean;
|
|
83
|
-
description: string;
|
|
84
|
-
options: string[];
|
|
85
|
-
};
|
|
86
|
-
listFields: {
|
|
87
|
-
type: string;
|
|
88
|
-
label: string;
|
|
89
|
-
description: string;
|
|
90
|
-
optional: boolean;
|
|
91
|
-
options: string[];
|
|
92
|
-
};
|
|
93
|
-
mediaFields: {
|
|
94
|
-
type: string;
|
|
95
|
-
label: string;
|
|
96
|
-
description: string;
|
|
97
|
-
optional: boolean;
|
|
98
|
-
options: string[];
|
|
99
|
-
};
|
|
100
|
-
placeFields: {
|
|
101
|
-
type: string;
|
|
102
|
-
label: string;
|
|
103
|
-
description: string;
|
|
104
|
-
optional: boolean;
|
|
105
|
-
options: string[];
|
|
106
|
-
};
|
|
107
|
-
pollFields: {
|
|
108
|
-
type: string;
|
|
109
|
-
label: string;
|
|
110
|
-
description: string;
|
|
111
|
-
optional: boolean;
|
|
112
|
-
options: string[];
|
|
113
|
-
};
|
|
114
|
-
tweetFields: {
|
|
115
|
-
type: string;
|
|
116
|
-
label: string;
|
|
117
|
-
description: string;
|
|
118
|
-
optional: boolean;
|
|
119
|
-
options: string[];
|
|
120
|
-
};
|
|
121
|
-
userFields: {
|
|
122
|
-
type: string;
|
|
123
|
-
label: string;
|
|
124
|
-
description: string;
|
|
125
|
-
optional: boolean;
|
|
126
|
-
options: string[];
|
|
127
|
-
};
|
|
128
66
|
}>;
|
|
129
67
|
userNameOrId: {
|
|
130
68
|
propDefinition: (string | import("@pipedream/types").App<{
|
|
@@ -138,6 +76,7 @@ declare const _default: import("@pipedream/types").Action<{
|
|
|
138
76
|
followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
|
|
139
77
|
getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
140
78
|
getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
79
|
+
getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
141
80
|
getAuthenticatedUserId(): Promise<string>;
|
|
142
81
|
getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
143
82
|
getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
@@ -186,69 +125,6 @@ declare const _default: import("@pipedream/types").Action<{
|
|
|
186
125
|
label: string;
|
|
187
126
|
description: string;
|
|
188
127
|
};
|
|
189
|
-
listExpansions: {
|
|
190
|
-
type: string;
|
|
191
|
-
label: string;
|
|
192
|
-
optional: boolean;
|
|
193
|
-
description: string;
|
|
194
|
-
options: string[];
|
|
195
|
-
};
|
|
196
|
-
tweetExpansions: {
|
|
197
|
-
type: string;
|
|
198
|
-
label: string;
|
|
199
|
-
optional: boolean;
|
|
200
|
-
description: string;
|
|
201
|
-
options: string[];
|
|
202
|
-
};
|
|
203
|
-
userExpansions: {
|
|
204
|
-
type: string;
|
|
205
|
-
label: string;
|
|
206
|
-
optional: boolean;
|
|
207
|
-
description: string;
|
|
208
|
-
options: string[];
|
|
209
|
-
};
|
|
210
|
-
listFields: {
|
|
211
|
-
type: string;
|
|
212
|
-
label: string;
|
|
213
|
-
description: string;
|
|
214
|
-
optional: boolean;
|
|
215
|
-
options: string[];
|
|
216
|
-
};
|
|
217
|
-
mediaFields: {
|
|
218
|
-
type: string;
|
|
219
|
-
label: string;
|
|
220
|
-
description: string;
|
|
221
|
-
optional: boolean;
|
|
222
|
-
options: string[];
|
|
223
|
-
};
|
|
224
|
-
placeFields: {
|
|
225
|
-
type: string;
|
|
226
|
-
label: string;
|
|
227
|
-
description: string;
|
|
228
|
-
optional: boolean;
|
|
229
|
-
options: string[];
|
|
230
|
-
};
|
|
231
|
-
pollFields: {
|
|
232
|
-
type: string;
|
|
233
|
-
label: string;
|
|
234
|
-
description: string;
|
|
235
|
-
optional: boolean;
|
|
236
|
-
options: string[];
|
|
237
|
-
};
|
|
238
|
-
tweetFields: {
|
|
239
|
-
type: string;
|
|
240
|
-
label: string;
|
|
241
|
-
description: string;
|
|
242
|
-
optional: boolean;
|
|
243
|
-
options: string[];
|
|
244
|
-
};
|
|
245
|
-
userFields: {
|
|
246
|
-
type: string;
|
|
247
|
-
label: string;
|
|
248
|
-
description: string;
|
|
249
|
-
optional: boolean;
|
|
250
|
-
options: string[];
|
|
251
|
-
};
|
|
252
128
|
}>)[];
|
|
253
129
|
};
|
|
254
130
|
}>;
|
|
@@ -11,6 +11,7 @@ declare const _default: import("@pipedream/types").Action<unknown, {
|
|
|
11
11
|
followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
|
|
12
12
|
getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
13
13
|
getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
14
|
+
getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
14
15
|
getAuthenticatedUserId(): Promise<string>;
|
|
15
16
|
getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
16
17
|
getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
@@ -59,69 +60,6 @@ declare const _default: import("@pipedream/types").Action<unknown, {
|
|
|
59
60
|
label: string;
|
|
60
61
|
description: string;
|
|
61
62
|
};
|
|
62
|
-
listExpansions: {
|
|
63
|
-
type: string;
|
|
64
|
-
label: string;
|
|
65
|
-
optional: boolean;
|
|
66
|
-
description: string;
|
|
67
|
-
options: string[];
|
|
68
|
-
};
|
|
69
|
-
tweetExpansions: {
|
|
70
|
-
type: string;
|
|
71
|
-
label: string;
|
|
72
|
-
optional: boolean;
|
|
73
|
-
description: string;
|
|
74
|
-
options: string[];
|
|
75
|
-
};
|
|
76
|
-
userExpansions: {
|
|
77
|
-
type: string;
|
|
78
|
-
label: string;
|
|
79
|
-
optional: boolean;
|
|
80
|
-
description: string;
|
|
81
|
-
options: string[];
|
|
82
|
-
};
|
|
83
|
-
listFields: {
|
|
84
|
-
type: string;
|
|
85
|
-
label: string;
|
|
86
|
-
description: string;
|
|
87
|
-
optional: boolean;
|
|
88
|
-
options: string[];
|
|
89
|
-
};
|
|
90
|
-
mediaFields: {
|
|
91
|
-
type: string;
|
|
92
|
-
label: string;
|
|
93
|
-
description: string;
|
|
94
|
-
optional: boolean;
|
|
95
|
-
options: string[];
|
|
96
|
-
};
|
|
97
|
-
placeFields: {
|
|
98
|
-
type: string;
|
|
99
|
-
label: string;
|
|
100
|
-
description: string;
|
|
101
|
-
optional: boolean;
|
|
102
|
-
options: string[];
|
|
103
|
-
};
|
|
104
|
-
pollFields: {
|
|
105
|
-
type: string;
|
|
106
|
-
label: string;
|
|
107
|
-
description: string;
|
|
108
|
-
optional: boolean;
|
|
109
|
-
options: string[];
|
|
110
|
-
};
|
|
111
|
-
tweetFields: {
|
|
112
|
-
type: string;
|
|
113
|
-
label: string;
|
|
114
|
-
description: string;
|
|
115
|
-
optional: boolean;
|
|
116
|
-
options: string[];
|
|
117
|
-
};
|
|
118
|
-
userFields: {
|
|
119
|
-
type: string;
|
|
120
|
-
label: string;
|
|
121
|
-
description: string;
|
|
122
|
-
optional: boolean;
|
|
123
|
-
options: string[];
|
|
124
|
-
};
|
|
125
63
|
}>;
|
|
126
64
|
tweetId: {
|
|
127
65
|
propDefinition: (string | import("@pipedream/types").App<{
|
|
@@ -135,6 +73,7 @@ declare const _default: import("@pipedream/types").Action<unknown, {
|
|
|
135
73
|
followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
|
|
136
74
|
getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
137
75
|
getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
76
|
+
getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
138
77
|
getAuthenticatedUserId(): Promise<string>;
|
|
139
78
|
getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
140
79
|
getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
@@ -183,69 +122,6 @@ declare const _default: import("@pipedream/types").Action<unknown, {
|
|
|
183
122
|
label: string;
|
|
184
123
|
description: string;
|
|
185
124
|
};
|
|
186
|
-
listExpansions: {
|
|
187
|
-
type: string;
|
|
188
|
-
label: string;
|
|
189
|
-
optional: boolean;
|
|
190
|
-
description: string;
|
|
191
|
-
options: string[];
|
|
192
|
-
};
|
|
193
|
-
tweetExpansions: {
|
|
194
|
-
type: string;
|
|
195
|
-
label: string;
|
|
196
|
-
optional: boolean;
|
|
197
|
-
description: string;
|
|
198
|
-
options: string[];
|
|
199
|
-
};
|
|
200
|
-
userExpansions: {
|
|
201
|
-
type: string;
|
|
202
|
-
label: string;
|
|
203
|
-
optional: boolean;
|
|
204
|
-
description: string;
|
|
205
|
-
options: string[];
|
|
206
|
-
};
|
|
207
|
-
listFields: {
|
|
208
|
-
type: string;
|
|
209
|
-
label: string;
|
|
210
|
-
description: string;
|
|
211
|
-
optional: boolean;
|
|
212
|
-
options: string[];
|
|
213
|
-
};
|
|
214
|
-
mediaFields: {
|
|
215
|
-
type: string;
|
|
216
|
-
label: string;
|
|
217
|
-
description: string;
|
|
218
|
-
optional: boolean;
|
|
219
|
-
options: string[];
|
|
220
|
-
};
|
|
221
|
-
placeFields: {
|
|
222
|
-
type: string;
|
|
223
|
-
label: string;
|
|
224
|
-
description: string;
|
|
225
|
-
optional: boolean;
|
|
226
|
-
options: string[];
|
|
227
|
-
};
|
|
228
|
-
pollFields: {
|
|
229
|
-
type: string;
|
|
230
|
-
label: string;
|
|
231
|
-
description: string;
|
|
232
|
-
optional: boolean;
|
|
233
|
-
options: string[];
|
|
234
|
-
};
|
|
235
|
-
tweetFields: {
|
|
236
|
-
type: string;
|
|
237
|
-
label: string;
|
|
238
|
-
description: string;
|
|
239
|
-
optional: boolean;
|
|
240
|
-
options: string[];
|
|
241
|
-
};
|
|
242
|
-
userFields: {
|
|
243
|
-
type: string;
|
|
244
|
-
label: string;
|
|
245
|
-
description: string;
|
|
246
|
-
optional: boolean;
|
|
247
|
-
options: string[];
|
|
248
|
-
};
|
|
249
125
|
}>)[];
|
|
250
126
|
};
|
|
251
127
|
}>;
|
|
@@ -5,7 +5,7 @@ export default defineAction({
|
|
|
5
5
|
key: "twitter-unlike-tweet",
|
|
6
6
|
name: "Unlike Tweet",
|
|
7
7
|
description: `Unlike a tweet specified by its ID. [See docs here](${DOCS_LINK})`,
|
|
8
|
-
version: "1.0.
|
|
8
|
+
version: "1.0.1",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
app,
|
|
@@ -17,12 +17,13 @@ export default defineAction({
|
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
19
|
async run({ $ }) {
|
|
20
|
+
const { tweetId } = this;
|
|
20
21
|
const params = {
|
|
21
22
|
$,
|
|
22
|
-
tweetId
|
|
23
|
+
tweetId,
|
|
23
24
|
};
|
|
24
25
|
const response = await this.app.unlikeTweet(params);
|
|
25
|
-
$.export("$summary",
|
|
26
|
+
$.export("$summary", `Successfully unliked tweet ${tweetId}`);
|
|
26
27
|
return response;
|
|
27
28
|
},
|
|
28
29
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import OAuth from "oauth-1.0a";
|
|
2
|
-
import { AddUserToListParams, CreateTweetParams, DeleteTweetParams, FollowUserParams, GetUserLikedTweetParams, GetUserOwnedListsParams, GetTweetParams, GetUserFollowedListsParams, GetUserMentionsParams, GetUserParams, GetUserTweetsParams, HttpRequestParams, LikeTweetParams, GetUserFollowersParams, GetUserFollowingParams, PaginatedRequestParams, RetweetParams, SearchTweetsParams, UnfollowUserParams, UnlikeTweetParams, GetListTweetsParams } from "../common/types/requestParams.js";
|
|
2
|
+
import { AddUserToListParams, CreateTweetParams, DeleteTweetParams, FollowUserParams, GetUserLikedTweetParams, GetUserOwnedListsParams, GetTweetParams, GetUserFollowedListsParams, GetUserMentionsParams, GetUserParams, GetUserTweetsParams, HttpRequestParams, LikeTweetParams, GetUserFollowersParams, GetUserFollowingParams, PaginatedRequestParams, RetweetParams, SearchTweetsParams, UnfollowUserParams, UnlikeTweetParams, GetListTweetsParams, GetAuthenticatedUserParams } from "../common/types/requestParams.js";
|
|
3
3
|
import { List, PaginatedResponseObject, ResponseObject, Tweet, TwitterEntity, User } from "../common/types/responseSchemas.js";
|
|
4
4
|
declare const _default: import("@pipedream/types").App<{
|
|
5
5
|
_getAuthHeader(config: HttpRequestParams): Promise<OAuth.Header>;
|
|
@@ -12,6 +12,7 @@ declare const _default: import("@pipedream/types").App<{
|
|
|
12
12
|
followUser(args: FollowUserParams): Promise<object>;
|
|
13
13
|
getListTweets({ listId, ...args }: GetListTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
14
14
|
getTweet({ tweetId, ...args }: GetTweetParams): Promise<ResponseObject<Tweet>>;
|
|
15
|
+
getAuthenticatedUser(args: GetAuthenticatedUserParams): Promise<ResponseObject<User>>;
|
|
15
16
|
getAuthenticatedUserId(): Promise<User["id"]>;
|
|
16
17
|
getUserLikedTweets({ userId, ...args }: GetUserLikedTweetParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
17
18
|
getUserOwnedLists({ userId, ...args }: GetUserOwnedListsParams): Promise<PaginatedResponseObject<List>>;
|
|
@@ -60,68 +61,5 @@ declare const _default: import("@pipedream/types").App<{
|
|
|
60
61
|
label: string;
|
|
61
62
|
description: string;
|
|
62
63
|
};
|
|
63
|
-
listExpansions: {
|
|
64
|
-
type: string;
|
|
65
|
-
label: string;
|
|
66
|
-
optional: boolean;
|
|
67
|
-
description: string;
|
|
68
|
-
options: string[];
|
|
69
|
-
};
|
|
70
|
-
tweetExpansions: {
|
|
71
|
-
type: string;
|
|
72
|
-
label: string;
|
|
73
|
-
optional: boolean;
|
|
74
|
-
description: string;
|
|
75
|
-
options: string[];
|
|
76
|
-
};
|
|
77
|
-
userExpansions: {
|
|
78
|
-
type: string;
|
|
79
|
-
label: string;
|
|
80
|
-
optional: boolean;
|
|
81
|
-
description: string;
|
|
82
|
-
options: string[];
|
|
83
|
-
};
|
|
84
|
-
listFields: {
|
|
85
|
-
type: string;
|
|
86
|
-
label: string;
|
|
87
|
-
description: string;
|
|
88
|
-
optional: boolean;
|
|
89
|
-
options: string[];
|
|
90
|
-
};
|
|
91
|
-
mediaFields: {
|
|
92
|
-
type: string;
|
|
93
|
-
label: string;
|
|
94
|
-
description: string;
|
|
95
|
-
optional: boolean;
|
|
96
|
-
options: string[];
|
|
97
|
-
};
|
|
98
|
-
placeFields: {
|
|
99
|
-
type: string;
|
|
100
|
-
label: string;
|
|
101
|
-
description: string;
|
|
102
|
-
optional: boolean;
|
|
103
|
-
options: string[];
|
|
104
|
-
};
|
|
105
|
-
pollFields: {
|
|
106
|
-
type: string;
|
|
107
|
-
label: string;
|
|
108
|
-
description: string;
|
|
109
|
-
optional: boolean;
|
|
110
|
-
options: string[];
|
|
111
|
-
};
|
|
112
|
-
tweetFields: {
|
|
113
|
-
type: string;
|
|
114
|
-
label: string;
|
|
115
|
-
description: string;
|
|
116
|
-
optional: boolean;
|
|
117
|
-
options: string[];
|
|
118
|
-
};
|
|
119
|
-
userFields: {
|
|
120
|
-
type: string;
|
|
121
|
-
label: string;
|
|
122
|
-
description: string;
|
|
123
|
-
optional: boolean;
|
|
124
|
-
options: string[];
|
|
125
|
-
};
|
|
126
64
|
}>;
|
|
127
65
|
export default _default;
|
package/dist/app/twitter.app.mjs
CHANGED
|
@@ -2,8 +2,6 @@ import OAuth from "oauth-1.0a";
|
|
|
2
2
|
import crypto from "crypto";
|
|
3
3
|
import { defineApp } from "@pipedream/types";
|
|
4
4
|
import { axios } from "@pipedream/platform";
|
|
5
|
-
import { LIST_FIELD_OPTIONS, MEDIA_FIELD_OPTIONS, PLACE_FIELD_OPTIONS, POLL_FIELD_OPTIONS, TWEET_FIELD_OPTIONS, USER_FIELD_OPTIONS, } from "../common/dataFields.mjs";
|
|
6
|
-
import { LIST_EXPANSION_OPTIONS, TWEET_EXPANSION_OPTIONS, USER_EXPANSION_OPTIONS, } from "../common/expansions.mjs";
|
|
7
5
|
export default defineApp({
|
|
8
6
|
type: "app",
|
|
9
7
|
app: "twitter",
|
|
@@ -36,6 +34,17 @@ export default defineApp({
|
|
|
36
34
|
optional: true,
|
|
37
35
|
default: "me",
|
|
38
36
|
},
|
|
37
|
+
// See comment on "../common/additionalProps.ts"
|
|
38
|
+
/*
|
|
39
|
+
includeAllFields: {
|
|
40
|
+
type: "boolean",
|
|
41
|
+
label: "Include All Metadata",
|
|
42
|
+
description: "If set to `false`, you can choose which fields will be returned for each data type.",
|
|
43
|
+
optional: true,
|
|
44
|
+
default: true,
|
|
45
|
+
reloadProps: true,
|
|
46
|
+
},
|
|
47
|
+
*/
|
|
39
48
|
tweetId: {
|
|
40
49
|
type: "string",
|
|
41
50
|
label: "Tweet ID",
|
|
@@ -46,69 +55,6 @@ export default defineApp({
|
|
|
46
55
|
label: "Query",
|
|
47
56
|
description: "One query for matching Tweets. See the [Twitter API guide on building queries](https://developer.twitter.com/en/docs/twitter-api/tweets/search/integrate/build-a-query).",
|
|
48
57
|
},
|
|
49
|
-
listExpansions: {
|
|
50
|
-
type: "string[]",
|
|
51
|
-
label: "Expansions",
|
|
52
|
-
optional: true,
|
|
53
|
-
description: "Additional data objects related to the List(s) to be included in the response.",
|
|
54
|
-
options: LIST_EXPANSION_OPTIONS,
|
|
55
|
-
},
|
|
56
|
-
tweetExpansions: {
|
|
57
|
-
type: "string[]",
|
|
58
|
-
label: "Expansions",
|
|
59
|
-
optional: true,
|
|
60
|
-
description: "Additional data objects related to the Tweet(s) to be included in the response.",
|
|
61
|
-
options: TWEET_EXPANSION_OPTIONS,
|
|
62
|
-
},
|
|
63
|
-
userExpansions: {
|
|
64
|
-
type: "string[]",
|
|
65
|
-
label: "Expansions",
|
|
66
|
-
optional: true,
|
|
67
|
-
description: "Additional data objects related to the User(s) to be included in the response.",
|
|
68
|
-
options: USER_EXPANSION_OPTIONS,
|
|
69
|
-
},
|
|
70
|
-
listFields: {
|
|
71
|
-
type: "string[]",
|
|
72
|
-
label: "List Fields",
|
|
73
|
-
description: "Specific [list fields](https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/lists) to be included in the returned list object.",
|
|
74
|
-
optional: true,
|
|
75
|
-
options: LIST_FIELD_OPTIONS,
|
|
76
|
-
},
|
|
77
|
-
mediaFields: {
|
|
78
|
-
type: "string[]",
|
|
79
|
-
label: "Media Fields",
|
|
80
|
-
description: "Specific [media fields](https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/media) to be included in the returned Tweet(s). Only applicable if the Tweet contains media and you've requested the `attachments.media_keys` expansion.",
|
|
81
|
-
optional: true,
|
|
82
|
-
options: MEDIA_FIELD_OPTIONS,
|
|
83
|
-
},
|
|
84
|
-
placeFields: {
|
|
85
|
-
type: "string[]",
|
|
86
|
-
label: "Place Fields",
|
|
87
|
-
description: "Specific [place fields](https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/place) to be included in the returned Tweet(s). Only applicable if the Tweet contains a place and you've requested the `geo.place_id` expansion.",
|
|
88
|
-
optional: true,
|
|
89
|
-
options: PLACE_FIELD_OPTIONS,
|
|
90
|
-
},
|
|
91
|
-
pollFields: {
|
|
92
|
-
type: "string[]",
|
|
93
|
-
label: "Poll Fields",
|
|
94
|
-
description: "Specific [poll fields](https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/poll) to be included in the returned Tweet(s). Only applicable if the Tweet contains a poll and you've requested the `attachments.poll_ids` expansion.",
|
|
95
|
-
optional: true,
|
|
96
|
-
options: POLL_FIELD_OPTIONS,
|
|
97
|
-
},
|
|
98
|
-
tweetFields: {
|
|
99
|
-
type: "string[]",
|
|
100
|
-
label: "Tweet Fields",
|
|
101
|
-
description: "Specific [tweet fields](https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/tweet) to be included in the returned Tweet(s). If you've requested the `referenced_tweets.id` expansion, these fields will also be returned for any included referenced Tweets.",
|
|
102
|
-
optional: true,
|
|
103
|
-
options: TWEET_FIELD_OPTIONS,
|
|
104
|
-
},
|
|
105
|
-
userFields: {
|
|
106
|
-
type: "string[]",
|
|
107
|
-
label: "User Fields",
|
|
108
|
-
description: "Specific [user fields](https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/user) to be included in the returned Tweet(s). Only applicable if you've requested one of the user expansions: `author_id`, `entities.mentions.username`, `in_reply_to_user_id`, `referenced_tweets.id.author_id`.",
|
|
109
|
-
optional: true,
|
|
110
|
-
options: USER_FIELD_OPTIONS,
|
|
111
|
-
},
|
|
112
58
|
},
|
|
113
59
|
methods: {
|
|
114
60
|
async _getAuthHeader(config) {
|
|
@@ -139,10 +85,10 @@ export default defineApp({
|
|
|
139
85
|
baseURL: this._getBaseUrl(),
|
|
140
86
|
...args,
|
|
141
87
|
};
|
|
142
|
-
//const headers = this._getAuthHeader(config);
|
|
88
|
+
// const headers = this._getAuthHeader(config);
|
|
143
89
|
const request = () => axios($, {
|
|
144
90
|
...config,
|
|
145
|
-
//headers,
|
|
91
|
+
// headers,
|
|
146
92
|
}, {
|
|
147
93
|
oauthSignerUri: this.$auth.oauth_signer_uri,
|
|
148
94
|
token: {
|
|
@@ -240,10 +186,14 @@ export default defineApp({
|
|
|
240
186
|
...args,
|
|
241
187
|
});
|
|
242
188
|
},
|
|
243
|
-
async
|
|
244
|
-
|
|
189
|
+
async getAuthenticatedUser(args) {
|
|
190
|
+
return this._httpRequest({
|
|
245
191
|
url: "/users/me",
|
|
192
|
+
...args,
|
|
246
193
|
});
|
|
194
|
+
},
|
|
195
|
+
async getAuthenticatedUserId() {
|
|
196
|
+
const response = await this.getAuthenticatedUser();
|
|
247
197
|
return response.data.id;
|
|
248
198
|
},
|
|
249
199
|
async getUserLikedTweets({ userId, ...args }) {
|
|
File without changes
|