@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
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import twitter from "../../twitter.app.mjs";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
key: "twitter-create-tweet",
|
|
5
|
-
name: "Create Tweet",
|
|
6
|
-
description: "Create a new tweet. [See the docs here](https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/post-statuses-update)",
|
|
7
|
-
version: "0.0.4",
|
|
8
|
-
type: "action",
|
|
9
|
-
props: {
|
|
10
|
-
twitter,
|
|
11
|
-
status: {
|
|
12
|
-
propDefinition: [
|
|
13
|
-
twitter,
|
|
14
|
-
"status",
|
|
15
|
-
],
|
|
16
|
-
},
|
|
17
|
-
inReplyToStatusId: {
|
|
18
|
-
propDefinition: [
|
|
19
|
-
twitter,
|
|
20
|
-
"inReplyToStatusId",
|
|
21
|
-
],
|
|
22
|
-
},
|
|
23
|
-
autoPopulateReplyMetadata: {
|
|
24
|
-
propDefinition: [
|
|
25
|
-
twitter,
|
|
26
|
-
"autoPopulateReplyMetadata",
|
|
27
|
-
],
|
|
28
|
-
},
|
|
29
|
-
excludeReplyUserIds: {
|
|
30
|
-
propDefinition: [
|
|
31
|
-
twitter,
|
|
32
|
-
"excludeReplyUserIds",
|
|
33
|
-
],
|
|
34
|
-
},
|
|
35
|
-
attachmentUrl: {
|
|
36
|
-
propDefinition: [
|
|
37
|
-
twitter,
|
|
38
|
-
"attachmentUrl",
|
|
39
|
-
],
|
|
40
|
-
},
|
|
41
|
-
mediaIds: {
|
|
42
|
-
propDefinition: [
|
|
43
|
-
twitter,
|
|
44
|
-
"mediaIds",
|
|
45
|
-
],
|
|
46
|
-
},
|
|
47
|
-
possiblySensitive: {
|
|
48
|
-
propDefinition: [
|
|
49
|
-
twitter,
|
|
50
|
-
"possiblySensitive",
|
|
51
|
-
],
|
|
52
|
-
},
|
|
53
|
-
lat: {
|
|
54
|
-
propDefinition: [
|
|
55
|
-
twitter,
|
|
56
|
-
"lat",
|
|
57
|
-
],
|
|
58
|
-
},
|
|
59
|
-
long: {
|
|
60
|
-
propDefinition: [
|
|
61
|
-
twitter,
|
|
62
|
-
"long",
|
|
63
|
-
],
|
|
64
|
-
},
|
|
65
|
-
placeId: {
|
|
66
|
-
propDefinition: [
|
|
67
|
-
twitter,
|
|
68
|
-
"placeId",
|
|
69
|
-
],
|
|
70
|
-
},
|
|
71
|
-
displayCoordinates: {
|
|
72
|
-
propDefinition: [
|
|
73
|
-
twitter,
|
|
74
|
-
"displayCoordinates",
|
|
75
|
-
],
|
|
76
|
-
},
|
|
77
|
-
trimUser: {
|
|
78
|
-
propDefinition: [
|
|
79
|
-
twitter,
|
|
80
|
-
"trimUser",
|
|
81
|
-
],
|
|
82
|
-
},
|
|
83
|
-
enableDmcommands: {
|
|
84
|
-
propDefinition: [
|
|
85
|
-
twitter,
|
|
86
|
-
"enableDmcommands",
|
|
87
|
-
],
|
|
88
|
-
},
|
|
89
|
-
failDmcommands: {
|
|
90
|
-
propDefinition: [
|
|
91
|
-
twitter,
|
|
92
|
-
"failDmcommands",
|
|
93
|
-
],
|
|
94
|
-
},
|
|
95
|
-
cardUri: {
|
|
96
|
-
propDefinition: [
|
|
97
|
-
twitter,
|
|
98
|
-
"cardUri",
|
|
99
|
-
],
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
async run({ $ }) {
|
|
103
|
-
const {
|
|
104
|
-
status,
|
|
105
|
-
inReplyToStatusId,
|
|
106
|
-
autoPopulateReplyMetadata,
|
|
107
|
-
excludeReplyUserIds,
|
|
108
|
-
attachmentUrl,
|
|
109
|
-
mediaIds,
|
|
110
|
-
possiblySensitive,
|
|
111
|
-
lat,
|
|
112
|
-
long,
|
|
113
|
-
placeId,
|
|
114
|
-
displayCoordinates,
|
|
115
|
-
trimUser,
|
|
116
|
-
enableDmcommands,
|
|
117
|
-
failDmcommands,
|
|
118
|
-
cardUri,
|
|
119
|
-
} = this;
|
|
120
|
-
|
|
121
|
-
const params = {
|
|
122
|
-
status,
|
|
123
|
-
inReplyToStatusId,
|
|
124
|
-
autoPopulateReplyMetadata,
|
|
125
|
-
excludeReplyUserIds,
|
|
126
|
-
attachmentUrl,
|
|
127
|
-
media_ids: mediaIds,
|
|
128
|
-
possiblySensitive,
|
|
129
|
-
lat,
|
|
130
|
-
long,
|
|
131
|
-
placeId,
|
|
132
|
-
displayCoordinates,
|
|
133
|
-
trimUser,
|
|
134
|
-
enableDmcommands,
|
|
135
|
-
failDmcommands,
|
|
136
|
-
cardUri,
|
|
137
|
-
};
|
|
138
|
-
Object.keys(params).forEach((k) => params[k] == "" && delete params[k]);
|
|
139
|
-
const res = await this.twitter.createTweet({
|
|
140
|
-
$,
|
|
141
|
-
params,
|
|
142
|
-
});
|
|
143
|
-
$.export("$summary", "Successfully posted tweet");
|
|
144
|
-
return res;
|
|
145
|
-
},
|
|
146
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import twitter from "../../twitter.app.mjs";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
key: "twitter-delete-tweet",
|
|
5
|
-
name: "Delete Tweet",
|
|
6
|
-
description: "Remove a posted tweet. [See the docs here](https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/post-statuses-destroy-id)",
|
|
7
|
-
version: "0.0.2",
|
|
8
|
-
type: "action",
|
|
9
|
-
props: {
|
|
10
|
-
twitter,
|
|
11
|
-
tweetID: {
|
|
12
|
-
propDefinition: [
|
|
13
|
-
twitter,
|
|
14
|
-
"tweetID",
|
|
15
|
-
],
|
|
16
|
-
},
|
|
17
|
-
trimUser: {
|
|
18
|
-
propDefinition: [
|
|
19
|
-
twitter,
|
|
20
|
-
"trimUser",
|
|
21
|
-
],
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
async run({ $ }) {
|
|
25
|
-
const {
|
|
26
|
-
tweetID,
|
|
27
|
-
trimUser,
|
|
28
|
-
} = this;
|
|
29
|
-
|
|
30
|
-
const params = {
|
|
31
|
-
tweetID,
|
|
32
|
-
trimUser,
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const res = await this.twitter.deleteTweet({
|
|
36
|
-
$,
|
|
37
|
-
...params,
|
|
38
|
-
});
|
|
39
|
-
$.export("$summary", "Successfully deleted tweet");
|
|
40
|
-
return res;
|
|
41
|
-
},
|
|
42
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import twitter from "../../twitter.app.mjs";
|
|
2
|
-
import { ConfigurationError } from "@pipedream/platform";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
key: "twitter-follow-user",
|
|
6
|
-
name: "Follow User",
|
|
7
|
-
description: "Follow a user specified by ID or screen name parameter. [See the docs here](https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/post-friendships-create)",
|
|
8
|
-
version: "0.0.2",
|
|
9
|
-
type: "action",
|
|
10
|
-
props: {
|
|
11
|
-
twitter,
|
|
12
|
-
userId: {
|
|
13
|
-
propDefinition: [
|
|
14
|
-
twitter,
|
|
15
|
-
"userId",
|
|
16
|
-
],
|
|
17
|
-
optional: true,
|
|
18
|
-
},
|
|
19
|
-
screenName: {
|
|
20
|
-
propDefinition: [
|
|
21
|
-
twitter,
|
|
22
|
-
"screenName",
|
|
23
|
-
],
|
|
24
|
-
optional: true,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
async run({ $ }) {
|
|
28
|
-
const {
|
|
29
|
-
userId,
|
|
30
|
-
screenName,
|
|
31
|
-
} = this;
|
|
32
|
-
|
|
33
|
-
if (!userId && !screenName) {
|
|
34
|
-
throw new ConfigurationError("This action requires either User ID or Screen Name. Please enter one or the other above.");
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const params = {
|
|
38
|
-
user_id: userId,
|
|
39
|
-
screen_name: screenName,
|
|
40
|
-
};
|
|
41
|
-
const response = await this.twitter.followUser({
|
|
42
|
-
params,
|
|
43
|
-
$,
|
|
44
|
-
});
|
|
45
|
-
$.export("$summary", `Successfully followed user @${response.screen_name}`);
|
|
46
|
-
return response;
|
|
47
|
-
},
|
|
48
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import twitter from "../../twitter.app.mjs";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
key: "twitter-get-tweet",
|
|
5
|
-
name: "Get Tweet",
|
|
6
|
-
description: "Return a single tweet specified by ID. [See the docs here](https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/get-statuses-show-id)",
|
|
7
|
-
version: "0.0.2",
|
|
8
|
-
type: "action",
|
|
9
|
-
props: {
|
|
10
|
-
twitter,
|
|
11
|
-
id: {
|
|
12
|
-
propDefinition: [
|
|
13
|
-
twitter,
|
|
14
|
-
"tweetID",
|
|
15
|
-
],
|
|
16
|
-
},
|
|
17
|
-
includeEntities: {
|
|
18
|
-
propDefinition: [
|
|
19
|
-
twitter,
|
|
20
|
-
"includeEntities",
|
|
21
|
-
],
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
async run({ $ }) {
|
|
25
|
-
const {
|
|
26
|
-
id,
|
|
27
|
-
includeEntities,
|
|
28
|
-
} = this;
|
|
29
|
-
|
|
30
|
-
const params = {
|
|
31
|
-
id,
|
|
32
|
-
includeEntities,
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const res = await this.twitter.getTweet({
|
|
36
|
-
$,
|
|
37
|
-
...params,
|
|
38
|
-
});
|
|
39
|
-
$.export("$summary", "Successfully retrieved tweet");
|
|
40
|
-
return res;
|
|
41
|
-
},
|
|
42
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import twitter from "../../twitter.app.mjs";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
key: "twitter-get-user",
|
|
5
|
-
name: "Get User",
|
|
6
|
-
description: "Return information about the user specified by ID or screen name parameter. [See the docs here](https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-users-lookup)",
|
|
7
|
-
version: "0.0.2",
|
|
8
|
-
type: "action",
|
|
9
|
-
props: {
|
|
10
|
-
twitter,
|
|
11
|
-
userId: {
|
|
12
|
-
propDefinition: [
|
|
13
|
-
twitter,
|
|
14
|
-
"userId",
|
|
15
|
-
],
|
|
16
|
-
optional: true,
|
|
17
|
-
},
|
|
18
|
-
screenName: {
|
|
19
|
-
propDefinition: [
|
|
20
|
-
twitter,
|
|
21
|
-
"screenName",
|
|
22
|
-
],
|
|
23
|
-
optional: true,
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
async run({ $ }) {
|
|
27
|
-
const {
|
|
28
|
-
userId,
|
|
29
|
-
screenName,
|
|
30
|
-
} = this;
|
|
31
|
-
|
|
32
|
-
if (!userId && !screenName) {
|
|
33
|
-
throw new Error("This action requires either User ID or Screen Name. Please enter one or the other above.");
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const userIdArray = [
|
|
37
|
-
userId,
|
|
38
|
-
];
|
|
39
|
-
const screenNameArray = [
|
|
40
|
-
screenName,
|
|
41
|
-
];
|
|
42
|
-
const res = await this.twitter.lookupUsers({
|
|
43
|
-
$,
|
|
44
|
-
userIdArray,
|
|
45
|
-
screenNameArray,
|
|
46
|
-
});
|
|
47
|
-
$.export("$summary", "Successfully retrieved user");
|
|
48
|
-
return res;
|
|
49
|
-
},
|
|
50
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import twitter from "../../twitter.app.mjs";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
key: "twitter-like-tweet",
|
|
5
|
-
name: "Like Tweet",
|
|
6
|
-
description: "Like the tweet specified specified in the ID parameter. [See the docs here](https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/post-favorites-create)",
|
|
7
|
-
version: "0.0.2",
|
|
8
|
-
type: "action",
|
|
9
|
-
props: {
|
|
10
|
-
twitter,
|
|
11
|
-
id: {
|
|
12
|
-
propDefinition: [
|
|
13
|
-
twitter,
|
|
14
|
-
"tweetID",
|
|
15
|
-
],
|
|
16
|
-
},
|
|
17
|
-
includeEntities: {
|
|
18
|
-
propDefinition: [
|
|
19
|
-
twitter,
|
|
20
|
-
"includeEntities",
|
|
21
|
-
],
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
async run({ $ }) {
|
|
25
|
-
const {
|
|
26
|
-
id,
|
|
27
|
-
includeEntities,
|
|
28
|
-
} = this;
|
|
29
|
-
|
|
30
|
-
const params = {
|
|
31
|
-
id,
|
|
32
|
-
includeEntities,
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const res = await this.twitter.likeTweet({
|
|
36
|
-
$,
|
|
37
|
-
...params,
|
|
38
|
-
});
|
|
39
|
-
$.export("$summary", "Successfully liked tweet");
|
|
40
|
-
return res;
|
|
41
|
-
},
|
|
42
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import common from "../common.mjs";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
...common,
|
|
5
|
-
key: "twitter-list-favorites",
|
|
6
|
-
name: "List Favorites",
|
|
7
|
-
description: "Return the most recent tweets liked by you or the specified user. [See the docs here](https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/get-favorites-list)",
|
|
8
|
-
version: "0.0.2",
|
|
9
|
-
type: "action",
|
|
10
|
-
props: {
|
|
11
|
-
...common.props,
|
|
12
|
-
screenName: {
|
|
13
|
-
propDefinition: [
|
|
14
|
-
common.props.twitter,
|
|
15
|
-
"screenName",
|
|
16
|
-
],
|
|
17
|
-
},
|
|
18
|
-
count: {
|
|
19
|
-
propDefinition: [
|
|
20
|
-
common.props.twitter,
|
|
21
|
-
"count",
|
|
22
|
-
],
|
|
23
|
-
description: "Specifies the number of records to retrieve. Must be less than or equal to `200`; defaults to `20`.",
|
|
24
|
-
optional: true,
|
|
25
|
-
default: 20,
|
|
26
|
-
},
|
|
27
|
-
maxRequests: {
|
|
28
|
-
propDefinition: [
|
|
29
|
-
common.props.twitter,
|
|
30
|
-
"maxRequests",
|
|
31
|
-
],
|
|
32
|
-
},
|
|
33
|
-
includeEntities: {
|
|
34
|
-
propDefinition: [
|
|
35
|
-
common.props.twitter,
|
|
36
|
-
"includeEntities",
|
|
37
|
-
],
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
async run({ $ }) {
|
|
41
|
-
const {
|
|
42
|
-
screenName,
|
|
43
|
-
count,
|
|
44
|
-
maxRequests,
|
|
45
|
-
includeEntities,
|
|
46
|
-
} = this;
|
|
47
|
-
|
|
48
|
-
const params = {
|
|
49
|
-
$,
|
|
50
|
-
screenName,
|
|
51
|
-
count,
|
|
52
|
-
maxRequests,
|
|
53
|
-
include_entities: includeEntities,
|
|
54
|
-
};
|
|
55
|
-
const tweets = await this.paginate(this.twitter.getLikedTweets.bind(this), params);
|
|
56
|
-
const results = [];
|
|
57
|
-
for await (const tweet of tweets) {
|
|
58
|
-
results.push(tweet);
|
|
59
|
-
}
|
|
60
|
-
$.export("$summary", "Successfully retrieved favorites");
|
|
61
|
-
return results;
|
|
62
|
-
},
|
|
63
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import common from "../common.mjs";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
...common,
|
|
5
|
-
key: "twitter-list-followers",
|
|
6
|
-
name: "List Followers",
|
|
7
|
-
description: "Return a collection of user objects for users following the specified user. [See the docs here](https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-followers-list)",
|
|
8
|
-
version: "0.0.2",
|
|
9
|
-
type: "action",
|
|
10
|
-
props: {
|
|
11
|
-
...common.props,
|
|
12
|
-
userId: {
|
|
13
|
-
propDefinition: [
|
|
14
|
-
common.props.twitter,
|
|
15
|
-
"userId",
|
|
16
|
-
],
|
|
17
|
-
optional: true,
|
|
18
|
-
},
|
|
19
|
-
screenName: {
|
|
20
|
-
propDefinition: [
|
|
21
|
-
common.props.twitter,
|
|
22
|
-
"screenName",
|
|
23
|
-
],
|
|
24
|
-
optional: true,
|
|
25
|
-
},
|
|
26
|
-
maxRequests: {
|
|
27
|
-
propDefinition: [
|
|
28
|
-
common.props.twitter,
|
|
29
|
-
"maxRequests",
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
includeUserEntities: {
|
|
33
|
-
propDefinition: [
|
|
34
|
-
common.props.twitter,
|
|
35
|
-
"includeUserEntities",
|
|
36
|
-
],
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
async run({ $ }) {
|
|
40
|
-
const {
|
|
41
|
-
userId,
|
|
42
|
-
screenName,
|
|
43
|
-
maxRequests,
|
|
44
|
-
includeUserEntities,
|
|
45
|
-
} = this;
|
|
46
|
-
|
|
47
|
-
if (!userId && !screenName) {
|
|
48
|
-
throw new Error("This action requires either User ID or Screen Name. Please enter one or the other above.");
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
const params = {
|
|
52
|
-
$,
|
|
53
|
-
userId,
|
|
54
|
-
screenName,
|
|
55
|
-
maxRequests,
|
|
56
|
-
includeUserEntities,
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
const followers = await this.paginate(this.twitter.getFollowers.bind(this), params, "users");
|
|
60
|
-
const results = [];
|
|
61
|
-
for await (const follower of followers) {
|
|
62
|
-
results.push(follower);
|
|
63
|
-
}
|
|
64
|
-
$.export("$summary", "Successfully retrieved followers");
|
|
65
|
-
return results;
|
|
66
|
-
},
|
|
67
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import common from "../common.mjs";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
...common,
|
|
5
|
-
key: "twitter-list-lists",
|
|
6
|
-
name: "List Lists",
|
|
7
|
-
description: "Return all lists the authenticated or specified user subscribes to including their own. [See the docs here](https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-list)",
|
|
8
|
-
version: "0.0.2",
|
|
9
|
-
type: "action",
|
|
10
|
-
props: {
|
|
11
|
-
...common.props,
|
|
12
|
-
userId: {
|
|
13
|
-
propDefinition: [
|
|
14
|
-
common.props.twitter,
|
|
15
|
-
"userId",
|
|
16
|
-
],
|
|
17
|
-
optional: true,
|
|
18
|
-
},
|
|
19
|
-
screenName: {
|
|
20
|
-
propDefinition: [
|
|
21
|
-
common.props.twitter,
|
|
22
|
-
"screenName",
|
|
23
|
-
],
|
|
24
|
-
optional: true,
|
|
25
|
-
},
|
|
26
|
-
reverse: {
|
|
27
|
-
type: "boolean",
|
|
28
|
-
label: "Reverse",
|
|
29
|
-
description: "Set this to `true` if you would like owned lists to be returned first.",
|
|
30
|
-
optional: true,
|
|
31
|
-
default: false,
|
|
32
|
-
},
|
|
33
|
-
maxRequests: {
|
|
34
|
-
propDefinition: [
|
|
35
|
-
common.props.twitter,
|
|
36
|
-
"maxRequests",
|
|
37
|
-
],
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
async run({ $ }) {
|
|
41
|
-
const {
|
|
42
|
-
userId,
|
|
43
|
-
screenName,
|
|
44
|
-
reverse,
|
|
45
|
-
maxRequests,
|
|
46
|
-
} = this;
|
|
47
|
-
|
|
48
|
-
if (!userId && !screenName) {
|
|
49
|
-
throw new Error("This action requires either User ID or Screen Name. Please enter one or the other above.");
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const params = {
|
|
53
|
-
$,
|
|
54
|
-
maxRequests,
|
|
55
|
-
params: {
|
|
56
|
-
user_id: userId,
|
|
57
|
-
screen_name: screenName,
|
|
58
|
-
reverse,
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
const lists = await this.paginate(this.twitter.getLists.bind(this), params);
|
|
62
|
-
const results = [];
|
|
63
|
-
for await (const list of lists) {
|
|
64
|
-
results.push(list);
|
|
65
|
-
}
|
|
66
|
-
$.export("$summary", "Successfully retrieved lists");
|
|
67
|
-
return results;
|
|
68
|
-
},
|
|
69
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import common from "../common.mjs";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
...common,
|
|
5
|
-
key: "twitter-list-mentions",
|
|
6
|
-
name: "List Mentions",
|
|
7
|
-
description: "Return the 20 most recent mentions for the authenticated user. [See the docs here](https://developer.twitter.com/en/docs/twitter-api/v1/tweets/timelines/api-reference/get-statuses-mentions_timeline)",
|
|
8
|
-
version: "0.0.2",
|
|
9
|
-
type: "action",
|
|
10
|
-
props: {
|
|
11
|
-
...common.props,
|
|
12
|
-
count: {
|
|
13
|
-
propDefinition: [
|
|
14
|
-
common.props.twitter,
|
|
15
|
-
"count",
|
|
16
|
-
],
|
|
17
|
-
description: "Specifies the number of records to retrieve. Must be less than or equal to `200`; defaults to `20`.",
|
|
18
|
-
optional: true,
|
|
19
|
-
default: 20,
|
|
20
|
-
},
|
|
21
|
-
maxRequests: {
|
|
22
|
-
propDefinition: [
|
|
23
|
-
common.props.twitter,
|
|
24
|
-
"maxRequests",
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
|
-
includeEntities: {
|
|
28
|
-
propDefinition: [
|
|
29
|
-
common.props.twitter,
|
|
30
|
-
"includeEntities",
|
|
31
|
-
],
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
async run({ $ }) {
|
|
35
|
-
const {
|
|
36
|
-
count,
|
|
37
|
-
maxRequests,
|
|
38
|
-
includeEntities,
|
|
39
|
-
} = this;
|
|
40
|
-
|
|
41
|
-
const params = {
|
|
42
|
-
$,
|
|
43
|
-
count,
|
|
44
|
-
maxRequests,
|
|
45
|
-
includeEntities,
|
|
46
|
-
};
|
|
47
|
-
const tweets = await this.paginate(this.twitter.getMentionsTimeline.bind(this), params);
|
|
48
|
-
const results = [];
|
|
49
|
-
for await (const tweet of tweets) {
|
|
50
|
-
results.push(tweet);
|
|
51
|
-
}
|
|
52
|
-
$.export("$summary", "Sucessfully retrieved mentions");
|
|
53
|
-
return results;
|
|
54
|
-
},
|
|
55
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import common from "../common.mjs";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
...common,
|
|
5
|
-
key: "twitter-list-pending-followers",
|
|
6
|
-
name: "List Pending Followers",
|
|
7
|
-
description: "Return a collection of numeric IDs for every user who has a pending request to follow the authenticated user. [See the docs here](https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-friendships-incoming)",
|
|
8
|
-
version: "0.0.2",
|
|
9
|
-
type: "action",
|
|
10
|
-
props: {
|
|
11
|
-
...common.props,
|
|
12
|
-
maxRequests: {
|
|
13
|
-
propDefinition: [
|
|
14
|
-
common.props.twitter,
|
|
15
|
-
"maxRequests",
|
|
16
|
-
],
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
async run({ $ }) {
|
|
20
|
-
const { maxRequests } = this;
|
|
21
|
-
const followers = await this.paginate(this.twitter.getPendingFollowers.bind(this), {
|
|
22
|
-
$,
|
|
23
|
-
maxRequests,
|
|
24
|
-
}, "ids");
|
|
25
|
-
const results = [];
|
|
26
|
-
for await (const follower of followers) {
|
|
27
|
-
results.push(follower);
|
|
28
|
-
}
|
|
29
|
-
$.export("$summary", "Successfully retrieved pending followers");
|
|
30
|
-
return results;
|
|
31
|
-
},
|
|
32
|
-
};
|