Skip to content

Commit 490c66a

Browse files
committed
Update Reddit component to version 1.2.0, add new private message source, and increment action versions to 0.1.2 and 0.1.3 for various actions. Refactor imports for consistency.
1 parent 2db2518 commit 490c66a

File tree

14 files changed

+94
-22
lines changed

14 files changed

+94
-22
lines changed

components/reddit/actions/list-comments-in-a-post/list-comments-in-a-post.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import reddit from "../../reddit.app.mjs";
21
import { axios } from "@pipedream/platform";
2+
import reddit from "../../reddit.app.mjs";
33

44
export default {
55
type: "action",
66
key: "reddit-list-comments-in-a-post",
7-
version: "0.1.1",
7+
version: "0.1.2",
88
name: "List Comments in a Post",
99
description: "List comments for a specific post. [See the docs here](https://www.reddit.com/dev/api/#GET_comments_{article})",
1010
props: {

components/reddit/actions/list-subreddits-by-query/list-subreddits-by-query.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import reddit from "../../reddit.app.mjs";
21
import { axios } from "@pipedream/platform";
2+
import reddit from "../../reddit.app.mjs";
33

44
export default {
55
type: "action",
66
key: "reddit-list-subreddits-by-query",
7-
version: "0.1.1",
7+
version: "0.1.2",
88
name: "List Subreddits by Query",
99
description: "List subreddits based on a search criteria. [See the docs here](https://www.reddit.com/dev/api/#GET_subreddits_search)",
1010
props: {

components/reddit/actions/search-post/search-post.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import reddit from "../../reddit.app.mjs";
33
export default {
44
type: "action",
55
key: "reddit-search-post",
6-
version: "0.1.1",
6+
version: "0.1.2",
77
name: "Search Post",
88
description: "Search posts by title. [See the docs here](https://www.reddit.com/dev/api/#GET_search)",
99
props: {

components/reddit/actions/submit-a-comment/submit-a-comment.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import reddit from "../../reddit.app.mjs";
44
export default {
55
type: "action",
66
key: "reddit-submit-a-comment",
7-
version: "0.1.1",
7+
version: "0.1.2",
88
name: "Submit a Comment",
99
description: "Submit a new comment or reply to a message. [See the docs here](https://www.reddit.com/dev/api/#POST_api_comment)",
1010
props: {

components/reddit/actions/submit-a-post/submit-a-post.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { axios } from "@pipedream/platform";
2-
import reddit from "../../reddit.app.mjs";
32
import tzs from "../../pytz-timezones.mjs";
3+
import reddit from "../../reddit.app.mjs";
44

55
export default {
66
type: "action",
77
key: "reddit-submit-a-post",
8-
version: "0.1.1",
8+
version: "0.1.2",
99
name: "Submit a Post",
1010
description: "Create a post to a subreddit. [See the docs here](https://www.reddit.com/dev/api/#POST_api_submit)",
1111
props: {

components/reddit/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/reddit",
3-
"version": "1.1.3",
3+
"version": "1.2.0",
44
"description": "Pipedream Reddit Components",
55
"main": "reddit.app.mjs",
66
"keywords": [
@@ -13,7 +13,7 @@
1313
"access": "public"
1414
},
1515
"dependencies": {
16-
"@pipedream/platform": "^1.4.0",
16+
"@pipedream/platform": "^3.1.0",
1717
"async-retry": "^1.3.3",
1818
"axios": "^0.27.2",
1919
"lodash": "^4.17.21",

components/reddit/reddit.app.mjs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { axios } from "@pipedream/platform";
2-
import qs from "qs";
3-
import isNil from "lodash/isNil.js";
42
import retry from "async-retry";
53
import get from "lodash/get.js";
4+
import isNil from "lodash/isNil.js";
5+
import qs from "qs";
66

77
export default {
88
type: "app",
@@ -490,5 +490,12 @@ export default {
490490
},
491491
}));
492492
},
493+
getPrivateMessages(opts = { }) {
494+
return this._withRetries(() =>
495+
this._makeRequest({
496+
path: `/message/inbox`,
497+
...opts
498+
}));
499+
},
493500
},
494501
};

components/reddit/sources/new-comments-by-user/new-comments-by-user.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
key: "reddit-new-comments-by-user",
88
name: "New Comments by User",
99
description: "Emit new event each time a user posts a new comment.",
10-
version: "0.1.1",
10+
version: "0.1.2",
1111
dedupe: "unique",
1212
props: {
1313
...common.props,

components/reddit/sources/new-comments-on-a-post/new-comments-on-a-post.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import common from "../common.mjs";
21
import get from "lodash/get.js";
2+
import common from "../common.mjs";
33
const { reddit } = common.props;
44

55
export default {
@@ -9,7 +9,7 @@ export default {
99
name: "New comments on a post",
1010
description:
1111
"Emit new event each time a new comment is added to a subreddit.",
12-
version: "0.1.1",
12+
version: "0.1.2",
1313
dedupe: "unique",
1414
props: {
1515
...common.props,

components/reddit/sources/new-hot-posts-on-a-subreddit/new-hot-posts-on-a-subreddit.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import get from "lodash/get.js";
12
import common from "../common.mjs";
2-
import sampleEmit from "./test-event.mjs";
33
import regionData from "./region-data.mjs";
4-
import get from "lodash/get.js";
4+
import sampleEmit from "./test-event.mjs";
55
const { reddit } = common.props;
66

77
export default {
@@ -11,7 +11,7 @@ export default {
1111
name: "New hot posts on a subreddit",
1212
description:
1313
"Emit new event each time a new hot post is added to the top 10 items in a subreddit.",
14-
version: "0.2.2",
14+
version: "0.2.3",
1515
dedupe: "unique",
1616
props: {
1717
...common.props,

0 commit comments

Comments
 (0)