@pipedream/twitter 0.3.11 → 1.1.0
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 +18 -71
- package/dist/actions/add-user-to-list/add-user-to-list.d.ts +194 -0
- package/dist/actions/add-user-to-list/add-user-to-list.mjs +44 -0
- package/dist/actions/create-tweet/create-tweet.d.ts +101 -0
- package/dist/actions/create-tweet/create-tweet.mjs +78 -0
- package/dist/actions/delete-tweet/delete-tweet.d.ts +128 -0
- package/dist/actions/delete-tweet/delete-tweet.mjs +29 -0
- package/dist/actions/follow-user/follow-user.d.ts +131 -0
- package/dist/actions/follow-user/follow-user.mjs +37 -0
- package/dist/actions/get-tweet/get-tweet.d.ts +132 -0
- package/dist/actions/get-tweet/get-tweet.mjs +34 -0
- package/dist/actions/get-user/get-user.d.ts +133 -0
- package/dist/actions/get-user/get-user.mjs +40 -0
- package/dist/actions/like-tweet/like-tweet.d.ts +128 -0
- package/dist/actions/like-tweet/like-tweet.mjs +31 -0
- package/dist/actions/list-favorites/list-favorites.d.ts +202 -0
- package/dist/actions/list-favorites/list-favorites.mjs +50 -0
- package/dist/actions/list-followers/list-followers.d.ts +202 -0
- package/dist/actions/list-followers/list-followers.mjs +50 -0
- package/dist/actions/list-lists/list-lists.d.ts +200 -0
- package/dist/actions/list-lists/list-lists.mjs +50 -0
- package/dist/actions/list-mentions/list-mentions.d.ts +200 -0
- package/dist/actions/list-mentions/list-mentions.mjs +50 -0
- package/dist/actions/list-user-tweets/list-user-tweets.d.ts +202 -0
- package/dist/actions/list-user-tweets/list-user-tweets.mjs +50 -0
- package/dist/actions/retweet/retweet.d.ts +128 -0
- package/dist/actions/retweet/retweet.mjs +34 -0
- package/dist/actions/simple-search/simple-search.d.ts +201 -0
- package/dist/actions/simple-search/simple-search.mjs +50 -0
- package/dist/actions/simple-search-in-list/simple-search-in-list.d.ts +206 -0
- package/dist/actions/simple-search-in-list/simple-search-in-list.mjs +58 -0
- package/dist/actions/unfollow-user/unfollow-user.d.ts +131 -0
- package/dist/actions/unfollow-user/unfollow-user.mjs +33 -0
- package/dist/actions/unlike-tweet/unlike-tweet.d.ts +128 -0
- package/dist/actions/unlike-tweet/unlike-tweet.mjs +29 -0
- package/dist/app/twitter.app.d.ts +65 -0
- package/dist/app/twitter.app.mjs +291 -0
- package/dist/common/additionalProps.d.ts +0 -0
- package/dist/common/additionalProps.mjs +138 -0
- package/dist/common/dataFields.d.ts +6 -0
- package/dist/common/dataFields.mjs +80 -0
- package/dist/common/expansions.d.ts +3 -0
- package/dist/common/expansions.mjs +17 -0
- package/dist/common/methods.d.ts +20 -0
- package/dist/common/methods.mjs +69 -0
- package/dist/common/types/fields.d.ts +18 -0
- package/dist/common/types/fields.mjs +1 -0
- package/dist/common/types/requestParams.d.ts +105 -0
- package/dist/common/types/requestParams.mjs +1 -0
- package/dist/common/types/responseSchemas.d.ts +42 -0
- package/dist/common/types/responseSchemas.mjs +1 -0
- package/dist/sources/common/base.d.ts +87 -0
- package/dist/sources/common/base.mjs +60 -0
- package/dist/sources/common/cacheUserId.d.ts +7 -0
- package/dist/sources/common/cacheUserId.mjs +18 -0
- package/dist/sources/common/getItemSummary.d.ts +4 -0
- package/dist/sources/common/getItemSummary.mjs +12 -0
- package/dist/sources/new-follower-of-user/new-follower-of-user.d.ts +149 -0
- package/dist/sources/new-follower-of-user/new-follower-of-user.mjs +45 -0
- package/dist/sources/new-list-followed/new-list-followed.d.ts +149 -0
- package/dist/sources/new-list-followed/new-list-followed.mjs +46 -0
- package/dist/sources/new-tweet-in-list/new-tweet-in-list.d.ts +147 -0
- package/dist/sources/new-tweet-in-list/new-tweet-in-list.mjs +42 -0
- package/dist/sources/new-tweet-liked-by-user/new-tweet-liked-by-user.d.ts +149 -0
- package/dist/sources/new-tweet-liked-by-user/new-tweet-liked-by-user.mjs +45 -0
- package/dist/sources/new-tweet-posted-by-user/new-tweet-posted-by-user.d.ts +149 -0
- package/dist/sources/new-tweet-posted-by-user/new-tweet-posted-by-user.mjs +45 -0
- package/dist/sources/new-tweet-posted-matching-query/new-tweet-posted-matching-query.d.ts +147 -0
- package/dist/sources/new-tweet-posted-matching-query/new-tweet-posted-matching-query.mjs +44 -0
- package/dist/sources/new-unfollower-of-user/new-unfollower-of-user.d.ts +149 -0
- package/dist/sources/new-unfollower-of-user/new-unfollower-of-user.mjs +75 -0
- package/dist/sources/new-user-followed/new-user-followed.d.ts +148 -0
- package/dist/sources/new-user-followed/new-user-followed.mjs +46 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +10 -14
- package/actions/add-user-to-list/add-user-to-list.mjs +0 -62
- package/actions/advanced-search/advanced-search.mjs +0 -113
- package/actions/common.mjs +0 -29
- package/actions/create-tweet/create-tweet.mjs +0 -146
- package/actions/delete-tweet/delete-tweet.mjs +0 -42
- package/actions/follow-user/follow-user.mjs +0 -48
- package/actions/get-tweet/get-tweet.mjs +0 -42
- package/actions/get-user/get-user.mjs +0 -50
- package/actions/like-tweet/like-tweet.mjs +0 -42
- package/actions/list-favorites/list-favorites.mjs +0 -63
- package/actions/list-followers/list-followers.mjs +0 -67
- package/actions/list-lists/list-lists.mjs +0 -69
- package/actions/list-mentions/list-mentions.mjs +0 -55
- package/actions/list-pending-followers/list-pending-followers.mjs +0 -32
- package/actions/list-retweets/list-retweets.mjs +0 -54
- package/actions/list-user-tweets/list-user-tweets.mjs +0 -80
- package/actions/retweet/retweet.mjs +0 -27
- package/actions/simple-search/simple-search.mjs +0 -62
- package/actions/simple-search-in-list/simple-search-in-list.mjs +0 -48
- package/actions/unfollow-user/unfollow-user.mjs +0 -48
- package/actions/unlike-tweet/unlike-tweet.mjs +0 -40
- package/actions/upload-media/upload-media.mjs +0 -122
- package/old.md +0 -169
- package/sources/common/followed.mjs +0 -38
- package/sources/common/followers.mjs +0 -159
- package/sources/common/tweets.mjs +0 -155
- package/sources/language-codes.mjs +0 -742
- package/sources/my-liked-tweets/my-liked-tweets.mjs +0 -30
- package/sources/my-tweets/my-tweets.mjs +0 -48
- package/sources/new-follower-of-me/new-follower-of-me.mjs +0 -69
- package/sources/new-follower-of-user/new-follower-of-user.mjs +0 -25
- package/sources/new-list-followed/new-list-followed.mjs +0 -24
- package/sources/new-trends-by-geo/new-trends-by-geo.mjs +0 -40
- package/sources/new-tweet-in-list/new-tweet-in-list.mjs +0 -49
- package/sources/new-unfollower-of-me/new-unfollower-of-me.mjs +0 -16
- package/sources/new-unfollower-of-user/new-unfollower-of-user.mjs +0 -25
- package/sources/new-user-followed/new-user-followed.mjs +0 -25
- package/sources/search-mentions/search-mentions.mjs +0 -144
- package/sources/tweets-liked-by-user/tweets-liked-by-user.mjs +0 -38
- package/sources/user-tweets/user-tweets.mjs +0 -49
- package/sources/watch-retweets-of-me/watch-retweets-of-me.mjs +0 -36
- package/sources/watch-retweets-of-my-tweet/watch-retweets-of-my-tweet.mjs +0 -44
- package/sources/watch-retweets-of-user-tweet/watch-retweets-of-user-tweet.mjs +0 -34
- package/twitter.app.mjs +0 -1161
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { getMultiItemSummary, getUserId, getTweetFields } from "../../common/methods.js";
|
|
2
|
+
import { GetUserMentionsParams } from "../../common/types/requestParams.js";
|
|
3
|
+
import { PaginatedResponseObject, Tweet } from "../../common/types/responseSchemas.js";
|
|
4
|
+
declare const _default: import("@pipedream/types").Action<{
|
|
5
|
+
getMultiItemSummary: typeof getMultiItemSummary;
|
|
6
|
+
getUserId: typeof getUserId;
|
|
7
|
+
getTweetFields: typeof getTweetFields;
|
|
8
|
+
}, {
|
|
9
|
+
app: import("@pipedream/types").App<{
|
|
10
|
+
_getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
|
|
11
|
+
_getBaseUrl(): "https://api.twitter.com/2";
|
|
12
|
+
_httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
|
|
13
|
+
_paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
|
|
14
|
+
addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
|
|
15
|
+
createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
|
|
16
|
+
deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
|
|
17
|
+
followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
|
|
18
|
+
getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
19
|
+
getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<Tweet>>;
|
|
20
|
+
getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
21
|
+
getAuthenticatedUserId(): Promise<string>;
|
|
22
|
+
getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
23
|
+
getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
24
|
+
getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
25
|
+
getUserMentions({ userId, ...args }: GetUserMentionsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
26
|
+
getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
27
|
+
getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
28
|
+
getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
29
|
+
likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
|
|
30
|
+
getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
31
|
+
getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
32
|
+
retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
|
|
33
|
+
searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
34
|
+
unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
|
|
35
|
+
unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
|
|
36
|
+
}, {
|
|
37
|
+
maxResults: {
|
|
38
|
+
type: string;
|
|
39
|
+
label: string;
|
|
40
|
+
description: string;
|
|
41
|
+
optional: boolean;
|
|
42
|
+
};
|
|
43
|
+
listId: {
|
|
44
|
+
type: string;
|
|
45
|
+
label: string;
|
|
46
|
+
description: string;
|
|
47
|
+
options(): Promise<{
|
|
48
|
+
label: string;
|
|
49
|
+
value: string;
|
|
50
|
+
}[]>;
|
|
51
|
+
};
|
|
52
|
+
userNameOrId: {
|
|
53
|
+
type: string;
|
|
54
|
+
label: string;
|
|
55
|
+
description: string;
|
|
56
|
+
optional: boolean;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
tweetId: {
|
|
60
|
+
type: string;
|
|
61
|
+
label: string;
|
|
62
|
+
description: string;
|
|
63
|
+
};
|
|
64
|
+
query: {
|
|
65
|
+
type: string;
|
|
66
|
+
label: string;
|
|
67
|
+
description: string;
|
|
68
|
+
};
|
|
69
|
+
}>;
|
|
70
|
+
userNameOrId: {
|
|
71
|
+
propDefinition: (string | import("@pipedream/types").App<{
|
|
72
|
+
_getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
|
|
73
|
+
_getBaseUrl(): "https://api.twitter.com/2";
|
|
74
|
+
_httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
|
|
75
|
+
_paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
|
|
76
|
+
addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
|
|
77
|
+
createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
|
|
78
|
+
deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
|
|
79
|
+
followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
|
|
80
|
+
getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
81
|
+
getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<Tweet>>;
|
|
82
|
+
getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
83
|
+
getAuthenticatedUserId(): Promise<string>;
|
|
84
|
+
getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
85
|
+
getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
86
|
+
getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
87
|
+
getUserMentions({ userId, ...args }: GetUserMentionsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
88
|
+
getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
89
|
+
getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
90
|
+
getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
91
|
+
likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
|
|
92
|
+
getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
93
|
+
getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
94
|
+
retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
|
|
95
|
+
searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
96
|
+
unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
|
|
97
|
+
unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
|
|
98
|
+
}, {
|
|
99
|
+
maxResults: {
|
|
100
|
+
type: string;
|
|
101
|
+
label: string;
|
|
102
|
+
description: string;
|
|
103
|
+
optional: boolean;
|
|
104
|
+
};
|
|
105
|
+
listId: {
|
|
106
|
+
type: string;
|
|
107
|
+
label: string;
|
|
108
|
+
description: string;
|
|
109
|
+
options(): Promise<{
|
|
110
|
+
label: string;
|
|
111
|
+
value: string;
|
|
112
|
+
}[]>;
|
|
113
|
+
};
|
|
114
|
+
userNameOrId: {
|
|
115
|
+
type: string;
|
|
116
|
+
label: string;
|
|
117
|
+
description: string;
|
|
118
|
+
optional: boolean;
|
|
119
|
+
default: string;
|
|
120
|
+
};
|
|
121
|
+
tweetId: {
|
|
122
|
+
type: string;
|
|
123
|
+
label: string;
|
|
124
|
+
description: string;
|
|
125
|
+
};
|
|
126
|
+
query: {
|
|
127
|
+
type: string;
|
|
128
|
+
label: string;
|
|
129
|
+
description: string;
|
|
130
|
+
};
|
|
131
|
+
}>)[];
|
|
132
|
+
};
|
|
133
|
+
maxResults: {
|
|
134
|
+
propDefinition: (string | import("@pipedream/types").App<{
|
|
135
|
+
_getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
|
|
136
|
+
_getBaseUrl(): "https://api.twitter.com/2";
|
|
137
|
+
_httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
|
|
138
|
+
_paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
|
|
139
|
+
addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
|
|
140
|
+
createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
|
|
141
|
+
deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
|
|
142
|
+
followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
|
|
143
|
+
getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
144
|
+
getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<Tweet>>;
|
|
145
|
+
getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
146
|
+
getAuthenticatedUserId(): Promise<string>;
|
|
147
|
+
getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
148
|
+
getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
149
|
+
getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
150
|
+
getUserMentions({ userId, ...args }: GetUserMentionsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
151
|
+
getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
152
|
+
getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
153
|
+
getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
154
|
+
likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
|
|
155
|
+
getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
156
|
+
getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
157
|
+
retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
|
|
158
|
+
searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
159
|
+
unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
|
|
160
|
+
unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
|
|
161
|
+
}, {
|
|
162
|
+
maxResults: {
|
|
163
|
+
type: string;
|
|
164
|
+
label: string;
|
|
165
|
+
description: string;
|
|
166
|
+
optional: boolean;
|
|
167
|
+
};
|
|
168
|
+
listId: {
|
|
169
|
+
type: string;
|
|
170
|
+
label: string;
|
|
171
|
+
description: string;
|
|
172
|
+
options(): Promise<{
|
|
173
|
+
label: string;
|
|
174
|
+
value: string;
|
|
175
|
+
}[]>;
|
|
176
|
+
};
|
|
177
|
+
userNameOrId: {
|
|
178
|
+
type: string;
|
|
179
|
+
label: string;
|
|
180
|
+
description: string;
|
|
181
|
+
optional: boolean;
|
|
182
|
+
default: string;
|
|
183
|
+
};
|
|
184
|
+
tweetId: {
|
|
185
|
+
type: string;
|
|
186
|
+
label: string;
|
|
187
|
+
description: string;
|
|
188
|
+
};
|
|
189
|
+
query: {
|
|
190
|
+
type: string;
|
|
191
|
+
label: string;
|
|
192
|
+
description: string;
|
|
193
|
+
};
|
|
194
|
+
}>)[];
|
|
195
|
+
min: number;
|
|
196
|
+
max: number;
|
|
197
|
+
default: number;
|
|
198
|
+
};
|
|
199
|
+
}>;
|
|
200
|
+
export default _default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import app from "../../app/twitter.app.mjs";
|
|
2
|
+
import { defineAction } from "@pipedream/types";
|
|
3
|
+
import { getMultiItemSummary, getUserId, getTweetFields, } from "../../common/methods.mjs";
|
|
4
|
+
const DOCS_LINK = "https://developer.twitter.com/en/docs/twitter-api/tweets/timelines/api-reference/get-users-id-mentions";
|
|
5
|
+
const MIN_RESULTS = 5;
|
|
6
|
+
const DEFAULT_RESULTS = 10;
|
|
7
|
+
const MAX_RESULTS_PER_PAGE = 100;
|
|
8
|
+
export default defineAction({
|
|
9
|
+
key: "twitter-list-mentions",
|
|
10
|
+
name: "List Mentions",
|
|
11
|
+
description: `Return the most recent mentions for the specified user. [See docs here](${DOCS_LINK})`,
|
|
12
|
+
version: "1.1.0",
|
|
13
|
+
type: "action",
|
|
14
|
+
props: {
|
|
15
|
+
app,
|
|
16
|
+
userNameOrId: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
app,
|
|
19
|
+
"userNameOrId",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
maxResults: {
|
|
23
|
+
propDefinition: [
|
|
24
|
+
app,
|
|
25
|
+
"maxResults",
|
|
26
|
+
],
|
|
27
|
+
min: MIN_RESULTS,
|
|
28
|
+
max: MAX_RESULTS_PER_PAGE * 5,
|
|
29
|
+
default: DEFAULT_RESULTS,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
methods: {
|
|
33
|
+
getMultiItemSummary,
|
|
34
|
+
getUserId,
|
|
35
|
+
getTweetFields,
|
|
36
|
+
},
|
|
37
|
+
async run({ $ }) {
|
|
38
|
+
const userId = await this.getUserId();
|
|
39
|
+
const params = {
|
|
40
|
+
$,
|
|
41
|
+
maxPerPage: MAX_RESULTS_PER_PAGE,
|
|
42
|
+
maxResults: this.maxResults,
|
|
43
|
+
params: this.getTweetFields(),
|
|
44
|
+
userId,
|
|
45
|
+
};
|
|
46
|
+
const response = await this.app.getUserMentions(params);
|
|
47
|
+
$.export("$summary", this.getMultiItemSummary("mention", response.data?.length));
|
|
48
|
+
return response;
|
|
49
|
+
},
|
|
50
|
+
});
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { getMultiItemSummary, getUserId, getTweetFields } from "../../common/methods.js";
|
|
2
|
+
import { GetUserTweetsParams } from "../../common/types/requestParams.js";
|
|
3
|
+
import { PaginatedResponseObject, Tweet } from "../../common/types/responseSchemas.js";
|
|
4
|
+
export declare const DOCS_LINK = "https://developer.twitter.com/en/docs/twitter-api/tweets/timelines/api-reference/get-users-id-tweets";
|
|
5
|
+
export declare const MAX_RESULTS_PER_PAGE = 100;
|
|
6
|
+
declare const _default: import("@pipedream/types").Action<{
|
|
7
|
+
getMultiItemSummary: typeof getMultiItemSummary;
|
|
8
|
+
getUserId: typeof getUserId;
|
|
9
|
+
getTweetFields: typeof getTweetFields;
|
|
10
|
+
}, {
|
|
11
|
+
app: import("@pipedream/types").App<{
|
|
12
|
+
_getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
|
|
13
|
+
_getBaseUrl(): "https://api.twitter.com/2";
|
|
14
|
+
_httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
|
|
15
|
+
_paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
|
|
16
|
+
addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
|
|
17
|
+
createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
|
|
18
|
+
deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
|
|
19
|
+
followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
|
|
20
|
+
getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
21
|
+
getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<Tweet>>;
|
|
22
|
+
getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
23
|
+
getAuthenticatedUserId(): Promise<string>;
|
|
24
|
+
getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
25
|
+
getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
26
|
+
getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
27
|
+
getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
28
|
+
getUserTweets({ userId, ...args }: GetUserTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
29
|
+
getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
30
|
+
getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
31
|
+
likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
|
|
32
|
+
getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
33
|
+
getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
34
|
+
retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
|
|
35
|
+
searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
36
|
+
unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
|
|
37
|
+
unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
|
|
38
|
+
}, {
|
|
39
|
+
maxResults: {
|
|
40
|
+
type: string;
|
|
41
|
+
label: string;
|
|
42
|
+
description: string;
|
|
43
|
+
optional: boolean;
|
|
44
|
+
};
|
|
45
|
+
listId: {
|
|
46
|
+
type: string;
|
|
47
|
+
label: string;
|
|
48
|
+
description: string;
|
|
49
|
+
options(): Promise<{
|
|
50
|
+
label: string;
|
|
51
|
+
value: string;
|
|
52
|
+
}[]>;
|
|
53
|
+
};
|
|
54
|
+
userNameOrId: {
|
|
55
|
+
type: string;
|
|
56
|
+
label: string;
|
|
57
|
+
description: string;
|
|
58
|
+
optional: boolean;
|
|
59
|
+
default: string;
|
|
60
|
+
};
|
|
61
|
+
tweetId: {
|
|
62
|
+
type: string;
|
|
63
|
+
label: string;
|
|
64
|
+
description: string;
|
|
65
|
+
};
|
|
66
|
+
query: {
|
|
67
|
+
type: string;
|
|
68
|
+
label: string;
|
|
69
|
+
description: string;
|
|
70
|
+
};
|
|
71
|
+
}>;
|
|
72
|
+
userNameOrId: {
|
|
73
|
+
propDefinition: (string | import("@pipedream/types").App<{
|
|
74
|
+
_getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
|
|
75
|
+
_getBaseUrl(): "https://api.twitter.com/2";
|
|
76
|
+
_httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
|
|
77
|
+
_paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
|
|
78
|
+
addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
|
|
79
|
+
createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
|
|
80
|
+
deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
|
|
81
|
+
followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
|
|
82
|
+
getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
83
|
+
getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<Tweet>>;
|
|
84
|
+
getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
85
|
+
getAuthenticatedUserId(): Promise<string>;
|
|
86
|
+
getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
87
|
+
getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
88
|
+
getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
89
|
+
getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
90
|
+
getUserTweets({ userId, ...args }: GetUserTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
91
|
+
getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
92
|
+
getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
93
|
+
likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
|
|
94
|
+
getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
95
|
+
getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
96
|
+
retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
|
|
97
|
+
searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
98
|
+
unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
|
|
99
|
+
unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
|
|
100
|
+
}, {
|
|
101
|
+
maxResults: {
|
|
102
|
+
type: string;
|
|
103
|
+
label: string;
|
|
104
|
+
description: string;
|
|
105
|
+
optional: boolean;
|
|
106
|
+
};
|
|
107
|
+
listId: {
|
|
108
|
+
type: string;
|
|
109
|
+
label: string;
|
|
110
|
+
description: string;
|
|
111
|
+
options(): Promise<{
|
|
112
|
+
label: string;
|
|
113
|
+
value: string;
|
|
114
|
+
}[]>;
|
|
115
|
+
};
|
|
116
|
+
userNameOrId: {
|
|
117
|
+
type: string;
|
|
118
|
+
label: string;
|
|
119
|
+
description: string;
|
|
120
|
+
optional: boolean;
|
|
121
|
+
default: string;
|
|
122
|
+
};
|
|
123
|
+
tweetId: {
|
|
124
|
+
type: string;
|
|
125
|
+
label: string;
|
|
126
|
+
description: string;
|
|
127
|
+
};
|
|
128
|
+
query: {
|
|
129
|
+
type: string;
|
|
130
|
+
label: string;
|
|
131
|
+
description: string;
|
|
132
|
+
};
|
|
133
|
+
}>)[];
|
|
134
|
+
};
|
|
135
|
+
maxResults: {
|
|
136
|
+
propDefinition: (string | import("@pipedream/types").App<{
|
|
137
|
+
_getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
|
|
138
|
+
_getBaseUrl(): "https://api.twitter.com/2";
|
|
139
|
+
_httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
|
|
140
|
+
_paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
|
|
141
|
+
addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
|
|
142
|
+
createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
|
|
143
|
+
deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
|
|
144
|
+
followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
|
|
145
|
+
getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
146
|
+
getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<Tweet>>;
|
|
147
|
+
getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
148
|
+
getAuthenticatedUserId(): Promise<string>;
|
|
149
|
+
getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
150
|
+
getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
151
|
+
getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
152
|
+
getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
153
|
+
getUserTweets({ userId, ...args }: GetUserTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
154
|
+
getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
155
|
+
getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
156
|
+
likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
|
|
157
|
+
getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
158
|
+
getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
159
|
+
retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
|
|
160
|
+
searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
|
|
161
|
+
unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
|
|
162
|
+
unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
|
|
163
|
+
}, {
|
|
164
|
+
maxResults: {
|
|
165
|
+
type: string;
|
|
166
|
+
label: string;
|
|
167
|
+
description: string;
|
|
168
|
+
optional: boolean;
|
|
169
|
+
};
|
|
170
|
+
listId: {
|
|
171
|
+
type: string;
|
|
172
|
+
label: string;
|
|
173
|
+
description: string;
|
|
174
|
+
options(): Promise<{
|
|
175
|
+
label: string;
|
|
176
|
+
value: string;
|
|
177
|
+
}[]>;
|
|
178
|
+
};
|
|
179
|
+
userNameOrId: {
|
|
180
|
+
type: string;
|
|
181
|
+
label: string;
|
|
182
|
+
description: string;
|
|
183
|
+
optional: boolean;
|
|
184
|
+
default: string;
|
|
185
|
+
};
|
|
186
|
+
tweetId: {
|
|
187
|
+
type: string;
|
|
188
|
+
label: string;
|
|
189
|
+
description: string;
|
|
190
|
+
};
|
|
191
|
+
query: {
|
|
192
|
+
type: string;
|
|
193
|
+
label: string;
|
|
194
|
+
description: string;
|
|
195
|
+
};
|
|
196
|
+
}>)[];
|
|
197
|
+
min: number;
|
|
198
|
+
max: number;
|
|
199
|
+
default: number;
|
|
200
|
+
};
|
|
201
|
+
}>;
|
|
202
|
+
export default _default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import app from "../../app/twitter.app.mjs";
|
|
2
|
+
import { defineAction } from "@pipedream/types";
|
|
3
|
+
import { getMultiItemSummary, getUserId, getTweetFields, } from "../../common/methods.mjs";
|
|
4
|
+
export const DOCS_LINK = "https://developer.twitter.com/en/docs/twitter-api/tweets/timelines/api-reference/get-users-id-tweets";
|
|
5
|
+
const MIN_RESULTS = 5;
|
|
6
|
+
const DEFAULT_RESULTS = 10;
|
|
7
|
+
export const MAX_RESULTS_PER_PAGE = 100;
|
|
8
|
+
export default defineAction({
|
|
9
|
+
key: "twitter-list-user-tweets",
|
|
10
|
+
name: "List User Tweets",
|
|
11
|
+
description: `Return a collection of the most recent tweets posted by a user. [See docs here](${DOCS_LINK})`,
|
|
12
|
+
version: "1.1.0",
|
|
13
|
+
type: "action",
|
|
14
|
+
props: {
|
|
15
|
+
app,
|
|
16
|
+
userNameOrId: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
app,
|
|
19
|
+
"userNameOrId",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
maxResults: {
|
|
23
|
+
propDefinition: [
|
|
24
|
+
app,
|
|
25
|
+
"maxResults",
|
|
26
|
+
],
|
|
27
|
+
min: MIN_RESULTS,
|
|
28
|
+
max: MAX_RESULTS_PER_PAGE * 5,
|
|
29
|
+
default: DEFAULT_RESULTS,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
methods: {
|
|
33
|
+
getMultiItemSummary,
|
|
34
|
+
getUserId,
|
|
35
|
+
getTweetFields,
|
|
36
|
+
},
|
|
37
|
+
async run({ $ }) {
|
|
38
|
+
const userId = await this.getUserId();
|
|
39
|
+
const params = {
|
|
40
|
+
$,
|
|
41
|
+
maxPerPage: MAX_RESULTS_PER_PAGE,
|
|
42
|
+
maxResults: this.maxResults,
|
|
43
|
+
params: this.getTweetFields(),
|
|
44
|
+
userId,
|
|
45
|
+
};
|
|
46
|
+
const response = await this.app.getUserTweets(params);
|
|
47
|
+
$.export("$summary", this.getMultiItemSummary("tweet", response.data?.length));
|
|
48
|
+
return response;
|
|
49
|
+
},
|
|
50
|
+
});
|