@pipedream/twitter 0.3.6 → 0.3.8
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 → README.md} +0 -0
- package/actions/add-user-to-list/add-user-to-list.mjs +1 -1
- package/actions/advanced-search/advanced-search.mjs +1 -1
- package/actions/create-tweet/create-tweet.mjs +1 -1
- package/actions/delete-tweet/delete-tweet.mjs +1 -1
- package/actions/follow-user/follow-user.mjs +1 -1
- package/actions/get-tweet/get-tweet.mjs +1 -1
- package/actions/get-user/get-user.mjs +1 -1
- package/actions/like-tweet/like-tweet.mjs +1 -1
- package/actions/list-favorites/list-favorites.mjs +1 -1
- package/actions/list-followers/list-followers.mjs +1 -1
- package/actions/list-lists/list-lists.mjs +1 -1
- package/actions/list-mentions/list-mentions.mjs +1 -1
- package/actions/list-pending-followers/list-pending-followers.mjs +1 -1
- package/actions/list-retweets/list-retweets.mjs +1 -1
- package/actions/list-user-tweets/list-user-tweets.mjs +1 -1
- package/actions/retweet/retweet.mjs +1 -1
- package/actions/simple-search/simple-search.mjs +1 -1
- package/actions/simple-search-in-list/simple-search-in-list.mjs +1 -1
- package/actions/unfollow-user/unfollow-user.mjs +1 -1
- package/actions/unlike-tweet/unlike-tweet.mjs +1 -1
- package/actions/upload-media/upload-media.mjs +77 -0
- package/package.json +6 -1
- package/sources/common/followed.mjs +2 -1
- package/sources/common/followers.mjs +2 -1
- package/sources/common/tweets.mjs +2 -1
- package/sources/my-liked-tweets/my-liked-tweets.mjs +3 -2
- package/sources/my-tweets/my-tweets.mjs +1 -1
- package/sources/new-follower-of-me/new-follower-of-me.mjs +1 -1
- package/sources/new-follower-of-user/new-follower-of-user.mjs +1 -1
- package/sources/new-list-followed/new-list-followed.mjs +1 -1
- package/sources/new-trends-by-geo/new-trends-by-geo.mjs +3 -2
- package/sources/new-tweet-in-list/new-tweet-in-list.mjs +1 -1
- package/sources/new-unfollower-of-me/new-unfollower-of-me.mjs +1 -1
- package/sources/new-unfollower-of-user/new-unfollower-of-user.mjs +1 -1
- package/sources/new-user-followed/new-user-followed.mjs +1 -1
- package/sources/search-mentions/search-mentions.mjs +4 -3
- package/sources/tweets-liked-by-user/tweets-liked-by-user.mjs +4 -3
- package/sources/user-tweets/user-tweets.mjs +1 -1
- package/sources/watch-retweets-of-me/watch-retweets-of-me.mjs +1 -1
- package/sources/watch-retweets-of-my-tweet/watch-retweets-of-my-tweet.mjs +1 -1
- package/sources/watch-retweets-of-user-tweet/watch-retweets-of-user-tweet.mjs +1 -1
- package/twitter.app.mjs +12 -0
package/{readme.md → README.md}
RENAMED
|
File without changes
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "twitter-add-user-to-list",
|
|
5
5
|
name: "Add User To List",
|
|
6
6
|
description: "Add a member to a list. The authenticated user must own the list to be able to add members to it. [See the docs here](https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/post-lists-members-create)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.2",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
twitter,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "twitter-advanced-search",
|
|
5
5
|
name: "Advanced Search",
|
|
6
6
|
description: "Return Tweets that matches your search criteria. [See the docs here](https://developer.twitter.com/en/docs/twitter-api/v1/tweets/search/api-reference/get-search-tweets)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.4",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
db: "$.service.db",
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "twitter-create-tweet",
|
|
5
5
|
name: "Create Tweet",
|
|
6
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.
|
|
7
|
+
version: "0.0.4",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
twitter,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "twitter-delete-tweet",
|
|
5
5
|
name: "Delete Tweet",
|
|
6
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.
|
|
7
|
+
version: "0.0.2",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
twitter,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "twitter-follow-user",
|
|
6
6
|
name: "Follow User",
|
|
7
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.
|
|
8
|
+
version: "0.0.2",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
twitter,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "twitter-get-tweet",
|
|
5
5
|
name: "Get Tweet",
|
|
6
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.
|
|
7
|
+
version: "0.0.2",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
twitter,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "twitter-get-user",
|
|
5
5
|
name: "Get User",
|
|
6
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.
|
|
7
|
+
version: "0.0.2",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
twitter,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "twitter-like-tweet",
|
|
5
5
|
name: "Like Tweet",
|
|
6
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.
|
|
7
|
+
version: "0.0.2",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
twitter,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "twitter-list-favorites",
|
|
6
6
|
name: "List Favorites",
|
|
7
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.
|
|
8
|
+
version: "0.0.2",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
...common.props,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "twitter-list-followers",
|
|
6
6
|
name: "List Followers",
|
|
7
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.
|
|
8
|
+
version: "0.0.2",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
...common.props,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "twitter-list-lists",
|
|
6
6
|
name: "List Lists",
|
|
7
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.
|
|
8
|
+
version: "0.0.2",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
...common.props,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "twitter-list-mentions",
|
|
6
6
|
name: "List Mentions",
|
|
7
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.
|
|
8
|
+
version: "0.0.2",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
...common.props,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "twitter-list-pending-followers",
|
|
6
6
|
name: "List Pending Followers",
|
|
7
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.
|
|
8
|
+
version: "0.0.2",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
...common.props,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "twitter-list-retweets",
|
|
6
6
|
name: "List Retweets",
|
|
7
7
|
description: "Return a collection of recent retweets of a tweet by ID parameter. [See the docs here](https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/get-statuses-retweets-id)",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.2",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
...common.props,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "twitter-list-user-tweets",
|
|
6
6
|
name: "List User Tweets",
|
|
7
7
|
description: "Return a collection of the most recent tweets posted by a user. [See the docs here](https://developer.twitter.com/en/docs/twitter-api/v1/tweets/timelines/api-reference/get-statuses-user_timeline)",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.2",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
...common.props,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "twitter-retweet",
|
|
5
5
|
name: "Retweet a tweet",
|
|
6
6
|
description: "Retweets a specific tweet by ID. [See the docs here](https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/post-statuses-retweet-id)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.3",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
twitter,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "twitter-simple-search",
|
|
5
5
|
name: "Simple Search",
|
|
6
6
|
description: "Return Tweets that matches your search criteria. [See the docs here](https://developer.twitter.com/en/docs/twitter-api/v1/tweets/search/api-reference/get-search-tweets)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.8",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
twitter,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "twitter-simple-search-in-list",
|
|
5
5
|
name: "Simple Search in List",
|
|
6
6
|
description: "Return Tweets that match your search criteria in a specific list. [See the docs here](https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-statuses)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.2",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
twitter,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "twitter-unfollow-user",
|
|
6
6
|
name: "Unfollow User",
|
|
7
7
|
description: "Unfollow 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/post-friendships-destroy)",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.2",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
twitter,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "twitter-unlike-tweet",
|
|
5
5
|
name: "Unike Tweet",
|
|
6
6
|
description: "Unike 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-destroy)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.2",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
twitter,
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import twitter from "../../twitter.app.mjs";
|
|
2
|
+
import fs from "fs";
|
|
3
|
+
import mime from "mime";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
key: "twitter-upload-media",
|
|
7
|
+
name: "Upload Media",
|
|
8
|
+
description: "Upload images or other media types to Twitter. Returns a `media_id_string` to be used with the Create Tweet action. [See the docs here](https://developer.twitter.com/en/docs/tutorials/uploading-media)",
|
|
9
|
+
version: "0.0.1",
|
|
10
|
+
type: "action",
|
|
11
|
+
props: {
|
|
12
|
+
twitter,
|
|
13
|
+
file: {
|
|
14
|
+
type: "string",
|
|
15
|
+
label: "File",
|
|
16
|
+
description: "The file to upload to Twitter, please provide a file from `/tmp`. To upload a file to `/tmp` folder, please follow the doc [here](https://pipedream.com/docs/code/nodejs/working-with-files/#writing-a-file-to-tmp)",
|
|
17
|
+
},
|
|
18
|
+
mediaType: {
|
|
19
|
+
type: "string",
|
|
20
|
+
label: "Media Type",
|
|
21
|
+
description: "The MIME type of the media being uploaded",
|
|
22
|
+
options() {
|
|
23
|
+
return Object.values(mime._types);
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
async run({ $ }) {
|
|
28
|
+
// INIT
|
|
29
|
+
const fileContent = fs.readFileSync(this.file, {
|
|
30
|
+
encoding: "base64",
|
|
31
|
+
});
|
|
32
|
+
const fileSize = (fs.statSync(this.file)).size;
|
|
33
|
+
const { media_id_string: mediaId } = await this.twitter.uploadMedia({
|
|
34
|
+
params: {
|
|
35
|
+
command: "INIT",
|
|
36
|
+
total_bytes: fileSize,
|
|
37
|
+
media_type: this.mediaType,
|
|
38
|
+
additional_owners: this.twitter.$auth.oauth_uid,
|
|
39
|
+
},
|
|
40
|
+
$,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// APPEND
|
|
44
|
+
const size = 5012;
|
|
45
|
+
const numSegments = fileContent.length / size;
|
|
46
|
+
let segment = 0;
|
|
47
|
+
let startIndex = 0;
|
|
48
|
+
let endIndex = startIndex + size;
|
|
49
|
+
while (segment <= numSegments) {
|
|
50
|
+
const chunk = fileContent.substring(startIndex, endIndex);
|
|
51
|
+
const params = {
|
|
52
|
+
command: "APPEND",
|
|
53
|
+
media_id: mediaId,
|
|
54
|
+
media_data: chunk,
|
|
55
|
+
segment_index: segment,
|
|
56
|
+
};
|
|
57
|
+
await this.twitter.uploadMedia({
|
|
58
|
+
params,
|
|
59
|
+
$,
|
|
60
|
+
});
|
|
61
|
+
segment++;
|
|
62
|
+
startIndex += size;
|
|
63
|
+
endIndex += size;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// FINALIZE
|
|
67
|
+
const response = await this.twitter.uploadMedia({
|
|
68
|
+
params: {
|
|
69
|
+
command: "FINALIZE",
|
|
70
|
+
media_id: mediaId,
|
|
71
|
+
},
|
|
72
|
+
$,
|
|
73
|
+
});
|
|
74
|
+
response && $.export("$summary", `Successfully uploaded media with Media ID ${mediaId}`);
|
|
75
|
+
return response;
|
|
76
|
+
},
|
|
77
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipedream/twitter",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"description": "Pipedream Twitter Components",
|
|
5
5
|
"main": "twitter.app.mjs",
|
|
6
6
|
"keywords": [
|
|
@@ -11,7 +11,12 @@
|
|
|
11
11
|
"author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"dependencies": {
|
|
14
|
+
"@pipedream/platform": "^1.2.0",
|
|
15
|
+
"async-retry": "^1.3.3",
|
|
14
16
|
"axios": "^0.21.1",
|
|
17
|
+
"lodash": "^4.17.21",
|
|
18
|
+
"luxon": "^3.2.0",
|
|
19
|
+
"mime": "^3.0.0",
|
|
15
20
|
"moment": "^2.29.1",
|
|
16
21
|
"querystring": "^0.2.0"
|
|
17
22
|
},
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import twitter from "../../twitter.app.mjs";
|
|
2
|
+
import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform";
|
|
2
3
|
|
|
3
4
|
export default {
|
|
4
5
|
props: {
|
|
@@ -9,7 +10,7 @@ export default {
|
|
|
9
10
|
description: "Pipedream will poll the Twitter API on this schedule",
|
|
10
11
|
type: "$.interface.timer",
|
|
11
12
|
default: {
|
|
12
|
-
intervalSeconds:
|
|
13
|
+
intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL,
|
|
13
14
|
},
|
|
14
15
|
},
|
|
15
16
|
},
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import twitter from "../../twitter.app.mjs";
|
|
2
|
+
import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform";
|
|
2
3
|
|
|
3
4
|
export default {
|
|
4
5
|
props: {
|
|
@@ -9,7 +10,7 @@ export default {
|
|
|
9
10
|
description: "Pipedream will poll the Twitter API on this schedule",
|
|
10
11
|
type: "$.interface.timer",
|
|
11
12
|
default: {
|
|
12
|
-
intervalSeconds:
|
|
13
|
+
intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL,
|
|
13
14
|
},
|
|
14
15
|
},
|
|
15
16
|
},
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import twitter from "../../twitter.app.mjs";
|
|
2
|
+
import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform";
|
|
2
3
|
|
|
3
4
|
export default {
|
|
4
5
|
props: {
|
|
@@ -21,7 +22,7 @@ export default {
|
|
|
21
22
|
description: "Pipedream will poll the Twitter API on this schedule",
|
|
22
23
|
type: "$.interface.timer",
|
|
23
24
|
default: {
|
|
24
|
-
intervalSeconds:
|
|
25
|
+
intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL,
|
|
25
26
|
},
|
|
26
27
|
},
|
|
27
28
|
},
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import twitter from "../../twitter.app.mjs";
|
|
2
|
+
import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform";
|
|
2
3
|
|
|
3
4
|
export default {
|
|
4
5
|
key: "twitter-my-liked-tweets",
|
|
5
6
|
name: "My Liked Tweets",
|
|
6
7
|
description: "Emit new Tweets you like on Twitter",
|
|
7
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.10",
|
|
8
9
|
type: "source",
|
|
9
10
|
props: {
|
|
10
11
|
twitter,
|
|
@@ -13,7 +14,7 @@ export default {
|
|
|
13
14
|
description: "Pipedream will poll the Twitter API on this schedule",
|
|
14
15
|
type: "$.interface.timer",
|
|
15
16
|
default: {
|
|
16
|
-
intervalSeconds:
|
|
17
|
+
intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL,
|
|
17
18
|
},
|
|
18
19
|
},
|
|
19
20
|
},
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import twitter from "../../twitter.app.mjs";
|
|
2
|
+
import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform";
|
|
2
3
|
|
|
3
4
|
export default {
|
|
4
5
|
key: "twitter-new-trends-by-geo",
|
|
5
6
|
name: "New Trends by Geo",
|
|
6
7
|
description: "Emit new event when a new topic is trending on Twitter in a specific geographic location",
|
|
7
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.10",
|
|
8
9
|
type: "source",
|
|
9
10
|
props: {
|
|
10
11
|
twitter,
|
|
@@ -19,7 +20,7 @@ export default {
|
|
|
19
20
|
description: "Pipedream will poll the Twitter API on this schedule",
|
|
20
21
|
type: "$.interface.timer",
|
|
21
22
|
default: {
|
|
22
|
-
intervalSeconds:
|
|
23
|
+
intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL,
|
|
23
24
|
},
|
|
24
25
|
},
|
|
25
26
|
},
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import twitter from "../../twitter.app.mjs";
|
|
2
2
|
import moment from "moment";
|
|
3
|
+
import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform";
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
key: "twitter-search-mentions",
|
|
6
7
|
name: "Search Mentions",
|
|
7
8
|
description: "Emit new Tweets that match your search criteria",
|
|
8
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.10",
|
|
9
10
|
type: "source",
|
|
10
11
|
props: {
|
|
11
12
|
db: "$.service.db",
|
|
@@ -75,7 +76,7 @@ export default {
|
|
|
75
76
|
description: "Pipedream will poll the Twitter API on this schedule",
|
|
76
77
|
type: "$.interface.timer",
|
|
77
78
|
default: {
|
|
78
|
-
intervalSeconds:
|
|
79
|
+
intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL,
|
|
79
80
|
},
|
|
80
81
|
},
|
|
81
82
|
},
|
|
@@ -122,7 +123,7 @@ export default {
|
|
|
122
123
|
|
|
123
124
|
// emit array of tweet objects
|
|
124
125
|
if (tweets.length > 0) {
|
|
125
|
-
tweets.sort(function(a, b) {return a.id - b.id;});
|
|
126
|
+
tweets.sort(function (a, b) { return a.id - b.id; });
|
|
126
127
|
|
|
127
128
|
tweets.forEach((tweet) => {
|
|
128
129
|
this.$emit(tweet, {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import twitter from "../../twitter.app.mjs";
|
|
2
|
+
import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform";
|
|
2
3
|
|
|
3
4
|
export default {
|
|
4
|
-
key: "twitter-
|
|
5
|
+
key: "twitter-tweets-liked-by-user",
|
|
5
6
|
name: "Tweet Liked by User",
|
|
6
7
|
description: "Emit new Tweets liked by a specific user on Twitter",
|
|
7
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.10",
|
|
8
9
|
type: "source",
|
|
9
10
|
props: {
|
|
10
11
|
twitter,
|
|
@@ -19,7 +20,7 @@ export default {
|
|
|
19
20
|
description: "Pipedream will poll the Twitter API on this schedule",
|
|
20
21
|
type: "$.interface.timer",
|
|
21
22
|
default: {
|
|
22
|
-
intervalSeconds:
|
|
23
|
+
intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL,
|
|
23
24
|
},
|
|
24
25
|
},
|
|
25
26
|
},
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
...base,
|
|
5
5
|
key: "twitter-watch-retweets-of-me",
|
|
6
6
|
name: "Watch Retweets of Me",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.8",
|
|
8
8
|
description: "Emit new event when recent Tweets authored by the authenticating user that have been retweeted by others",
|
|
9
9
|
type: "source",
|
|
10
10
|
props: {
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "twitter-watch-retweets-of-my-tweet",
|
|
6
6
|
name: "Watch Retweets of My Tweet",
|
|
7
7
|
description: "Emit new event when a specific Tweet from the authenticated user is retweeted",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.7",
|
|
9
9
|
type: "source",
|
|
10
10
|
props: {
|
|
11
11
|
...base.props,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "twitter-watch-retweets-of-user-tweet",
|
|
7
7
|
name: "Watch Retweets of User Tweet",
|
|
8
8
|
description: "Emit new event when a specific Tweet from a user is retweeted",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.7",
|
|
10
10
|
type: "source",
|
|
11
11
|
props: {
|
|
12
12
|
...base.props,
|
package/twitter.app.mjs
CHANGED
|
@@ -1144,6 +1144,18 @@ export default {
|
|
|
1144
1144
|
config,
|
|
1145
1145
|
});
|
|
1146
1146
|
},
|
|
1147
|
+
async uploadMedia({
|
|
1148
|
+
$, ...args
|
|
1149
|
+
}) {
|
|
1150
|
+
return this._makeRequest({
|
|
1151
|
+
$,
|
|
1152
|
+
config: {
|
|
1153
|
+
url: "https://upload.twitter.com/1.1/media/upload.json",
|
|
1154
|
+
method: "POST",
|
|
1155
|
+
...args,
|
|
1156
|
+
},
|
|
1157
|
+
});
|
|
1158
|
+
},
|
|
1147
1159
|
webhooks: {},
|
|
1148
1160
|
},
|
|
1149
1161
|
};
|