Skip to content

Commit 90e7670

Browse files
authored
Reddit remove user agent (#17314)
* remove user-agent * pnpm-lock.yaml
1 parent d001247 commit 90e7670

File tree

14 files changed

+21
-22
lines changed

14 files changed

+21
-22
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { axios } from "@pipedream/platform";
44
export default {
55
type: "action",
66
key: "reddit-list-comments-in-a-post",
7-
version: "0.1.0",
7+
version: "0.1.1",
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { axios } from "@pipedream/platform";
44
export default {
55
type: "action",
66
key: "reddit-list-subreddits-by-query",
7-
version: "0.1.0",
7+
version: "0.1.1",
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.0",
6+
version: "0.1.1",
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.0",
7+
version: "0.1.1",
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import tzs from "../../pytz-timezones.mjs";
55
export default {
66
type: "action",
77
key: "reddit-submit-a-post",
8-
version: "0.1.0",
8+
version: "0.1.1",
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/reddit",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"description": "Pipedream Reddit Components",
55
"main": "reddit.app.mjs",
66
"keywords": [

components/reddit/reddit.app.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ export default {
106106
query,
107107
prevContext,
108108
}) {
109+
if (!query) {
110+
return [];
111+
}
109112
const res = await this.searchSubreddits({
110113
after: prevContext?.after,
111114
q: query,
@@ -202,7 +205,6 @@ export default {
202205
_getHeaders() {
203206
return {
204207
"authorization": `Bearer ${this._accessToken()}`,
205-
"user-agent": "@PipedreamHQ/pipedream v0.1",
206208
};
207209
},
208210
_accessToken() {
@@ -225,7 +227,6 @@ export default {
225227
}) {
226228
if (!opts.headers) opts.headers = {};
227229
opts.headers.authorization = `Bearer ${this._accessToken()}`;
228-
opts.headers["user-agent"] = "@PipedreamHQ/pipedream v0.1";
229230
const { path } = opts;
230231
delete opts.path;
231232
opts.url = `${this._apiUrl()}${path[0] === "/" ?

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.0",
10+
version: "0.1.1",
1111
dedupe: "unique",
1212
props: {
1313
...common.props,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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.0",
12+
version: "0.1.1",
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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.1",
14+
version: "0.2.2",
1515
dedupe: "unique",
1616
props: {
1717
...common.props,

0 commit comments

Comments
 (0)