From 0b51e221ad3a15ad760aba5a9a38ccde88162504 Mon Sep 17 00:00:00 2001 From: Lucas Caresia Date: Tue, 25 Oct 2022 09:36:47 -0300 Subject: [PATCH] Fixed axios requests --- components/twitch/actions/block-user/block-user.mjs | 2 +- .../check-channel-subscription.mjs | 2 +- components/twitch/actions/delete-video/delete-video.mjs | 2 +- .../actions/get-channel-editors/get-channel-editors.mjs | 2 +- .../get-channel-information/get-channel-information.mjs | 2 +- .../twitch/actions/get-channel-teams/get-channel-teams.mjs | 2 +- components/twitch/actions/get-clips/get-clips.mjs | 2 +- .../actions/get-followed-channels/get-followed-channels.mjs | 2 +- components/twitch/actions/get-followers/get-followers.mjs | 2 +- .../twitch/actions/get-my-followers/get-my-followers.mjs | 2 +- .../actions/get-stream-by-user/get-stream-by-user.mjs | 2 +- components/twitch/actions/get-top-games/get-top-games.mjs | 2 +- components/twitch/actions/get-users/get-users.mjs | 2 +- components/twitch/actions/get-videos/get-videos.mjs | 2 +- .../twitch/actions/search-channels/search-channels.mjs | 2 +- components/twitch/actions/search-games/search-games.mjs | 2 +- components/twitch/actions/unblock-user/unblock-user.mjs | 2 +- components/twitch/actions/update-channel/update-channel.mjs | 2 +- components/twitch/package.json | 2 +- .../twitch/sources/followed-streams/followed-streams.mjs | 2 +- .../sources/new-clip-by-streamer/new-clip-by-streamer.mjs | 2 +- components/twitch/sources/new-clips/new-clips.mjs | 2 +- components/twitch/sources/new-follower/new-follower.mjs | 2 +- components/twitch/sources/new-videos/new-videos.mjs | 2 +- .../twitch/sources/streams-by-game/streams-by-game.mjs | 2 +- .../sources/streams-by-streamer/streams-by-streamer.mjs | 2 +- components/twitch/twitch.app.mjs | 6 ++++-- 27 files changed, 30 insertions(+), 28 deletions(-) diff --git a/components/twitch/actions/block-user/block-user.mjs b/components/twitch/actions/block-user/block-user.mjs index b41e49be7e11f..4954fb1be6017 100644 --- a/components/twitch/actions/block-user/block-user.mjs +++ b/components/twitch/actions/block-user/block-user.mjs @@ -5,7 +5,7 @@ export default { name: "Block User", key: "twitch-block-user", description: "Blocks a user; that is, adds a specified target user to your blocks list", - version: "0.0.2", + version: "0.0.3", type: "action", props: { ...common.props, diff --git a/components/twitch/actions/check-channel-subscription/check-channel-subscription.mjs b/components/twitch/actions/check-channel-subscription/check-channel-subscription.mjs index acee44a20529e..4ff494bf71615 100644 --- a/components/twitch/actions/check-channel-subscription/check-channel-subscription.mjs +++ b/components/twitch/actions/check-channel-subscription/check-channel-subscription.mjs @@ -5,7 +5,7 @@ export default { name: "Check Channel Subscription", key: "twitch-check-channel-subscription", description: "Checks if you are subscribed to the specified user's channel", - version: "0.0.2", + version: "0.0.3", type: "action", props: { ...common.props, diff --git a/components/twitch/actions/delete-video/delete-video.mjs b/components/twitch/actions/delete-video/delete-video.mjs index 6258d80b6cad3..2020e8fcaebe7 100644 --- a/components/twitch/actions/delete-video/delete-video.mjs +++ b/components/twitch/actions/delete-video/delete-video.mjs @@ -5,7 +5,7 @@ export default { name: "Delete Video", key: "twitch-delete-video", description: "Deletes a specified video", - version: "0.0.2", + version: "0.0.3", type: "action", props: { ...common.props, diff --git a/components/twitch/actions/get-channel-editors/get-channel-editors.mjs b/components/twitch/actions/get-channel-editors/get-channel-editors.mjs index 33aab3f478f6b..65302413caf94 100644 --- a/components/twitch/actions/get-channel-editors/get-channel-editors.mjs +++ b/components/twitch/actions/get-channel-editors/get-channel-editors.mjs @@ -5,7 +5,7 @@ export default { name: "Get Channel Editors", key: "twitch-get-channel-editors", description: "Gets a list of users who are editors for your channel", - version: "0.0.2", + version: "0.0.3", type: "action", async run() { // get the userID of the authenticated user diff --git a/components/twitch/actions/get-channel-information/get-channel-information.mjs b/components/twitch/actions/get-channel-information/get-channel-information.mjs index 91e9c96d7c1e3..d22390ac69698 100644 --- a/components/twitch/actions/get-channel-information/get-channel-information.mjs +++ b/components/twitch/actions/get-channel-information/get-channel-information.mjs @@ -5,7 +5,7 @@ export default { name: "Get Channel Information", key: "twitch-get-channel-information", description: "Retrieves information about a particular broadcaster's channel", - version: "0.0.2", + version: "0.0.3", type: "action", props: { ...common.props, diff --git a/components/twitch/actions/get-channel-teams/get-channel-teams.mjs b/components/twitch/actions/get-channel-teams/get-channel-teams.mjs index 80eca910d244f..bb4f6a44ad24e 100644 --- a/components/twitch/actions/get-channel-teams/get-channel-teams.mjs +++ b/components/twitch/actions/get-channel-teams/get-channel-teams.mjs @@ -5,7 +5,7 @@ export default { name: "Get Channel Teams", key: "twitch-get-channel-teams", description: "Gets a list of teams to which a specified channel belongs", - version: "0.0.2", + version: "0.0.3", type: "action", props: { ...common.props, diff --git a/components/twitch/actions/get-clips/get-clips.mjs b/components/twitch/actions/get-clips/get-clips.mjs index f90a0c5321cb3..883c2804eb351 100644 --- a/components/twitch/actions/get-clips/get-clips.mjs +++ b/components/twitch/actions/get-clips/get-clips.mjs @@ -5,7 +5,7 @@ export default { name: "Get Clips", key: "twitch-get-clips", description: "Gets clip information by clip ID, user ID, or game ID", - version: "0.0.2", + version: "0.0.3", type: "action", props: { ...common.props, diff --git a/components/twitch/actions/get-followed-channels/get-followed-channels.mjs b/components/twitch/actions/get-followed-channels/get-followed-channels.mjs index ce2b2b3c1b703..24d5d2fc9f895 100644 --- a/components/twitch/actions/get-followed-channels/get-followed-channels.mjs +++ b/components/twitch/actions/get-followed-channels/get-followed-channels.mjs @@ -5,7 +5,7 @@ export default { name: "Get Followed Channels", key: "twitch-get-followed-channels", description: "Retrieves a list of channels that the authenticated user follows", - version: "0.0.2", + version: "0.0.3", type: "action", async run() { // get the userID of the authenticated user diff --git a/components/twitch/actions/get-followers/get-followers.mjs b/components/twitch/actions/get-followers/get-followers.mjs index 64fd8ab81c5a0..a9e74f551b14a 100644 --- a/components/twitch/actions/get-followers/get-followers.mjs +++ b/components/twitch/actions/get-followers/get-followers.mjs @@ -5,7 +5,7 @@ export default { name: "Get Followers", key: "twitch-get-followers", description: "Retrieves a list of users who follow the specified user", - version: "0.0.2", + version: "0.0.3", type: "action", props: { ...common.props, diff --git a/components/twitch/actions/get-my-followers/get-my-followers.mjs b/components/twitch/actions/get-my-followers/get-my-followers.mjs index 8f5c85f5dab17..e80d775936cad 100644 --- a/components/twitch/actions/get-my-followers/get-my-followers.mjs +++ b/components/twitch/actions/get-my-followers/get-my-followers.mjs @@ -5,7 +5,7 @@ export default { name: "Get My Followers", key: "twitch-get-my-followers", description: "Retrieves a list of users who follow the authenticated user", - version: "0.0.2", + version: "0.0.3", type: "action", async run() { // get the userID of the authenticated user diff --git a/components/twitch/actions/get-stream-by-user/get-stream-by-user.mjs b/components/twitch/actions/get-stream-by-user/get-stream-by-user.mjs index 22f8d6474c626..f95de21350e03 100644 --- a/components/twitch/actions/get-stream-by-user/get-stream-by-user.mjs +++ b/components/twitch/actions/get-stream-by-user/get-stream-by-user.mjs @@ -5,7 +5,7 @@ export default { name: "Get Stream By User", key: "twitch-get-stream-by-user", description: "Gets stream information (the stream object) for a specified user", - version: "0.0.2", + version: "0.0.3", type: "action", props: { ...common.props, diff --git a/components/twitch/actions/get-top-games/get-top-games.mjs b/components/twitch/actions/get-top-games/get-top-games.mjs index d63d83a5c2e23..cc833b4a3033a 100644 --- a/components/twitch/actions/get-top-games/get-top-games.mjs +++ b/components/twitch/actions/get-top-games/get-top-games.mjs @@ -5,7 +5,7 @@ export default { name: "Get Top Games", key: "twitch-get-top-games", description: "Gets games sorted by number of current viewers on Twitch, most popular first", - version: "0.0.2", + version: "0.0.3", type: "action", props: { ...common.props, diff --git a/components/twitch/actions/get-users/get-users.mjs b/components/twitch/actions/get-users/get-users.mjs index c36b517fd84a2..110e42e526823 100644 --- a/components/twitch/actions/get-users/get-users.mjs +++ b/components/twitch/actions/get-users/get-users.mjs @@ -5,7 +5,7 @@ export default { name: "Get Users", key: "twitch-get-users", description: "Gets the user objects for the specified Twitch login names", - version: "0.0.2", + version: "0.0.3", type: "action", props: { ...common.props, diff --git a/components/twitch/actions/get-videos/get-videos.mjs b/components/twitch/actions/get-videos/get-videos.mjs index 5c9651d613025..20de2095dfdb9 100644 --- a/components/twitch/actions/get-videos/get-videos.mjs +++ b/components/twitch/actions/get-videos/get-videos.mjs @@ -5,7 +5,7 @@ export default { name: "Get Videos", key: "twitch-get-videos", description: "Gets video information by video ID, user ID, or game ID", - version: "0.0.2", + version: "0.0.3", type: "action", props: { ...common.props, diff --git a/components/twitch/actions/search-channels/search-channels.mjs b/components/twitch/actions/search-channels/search-channels.mjs index 87740bb283781..a47ef615225ef 100644 --- a/components/twitch/actions/search-channels/search-channels.mjs +++ b/components/twitch/actions/search-channels/search-channels.mjs @@ -7,7 +7,7 @@ export default { description: `Returns a list of channels (users who have streamed within the past 6 months) that match the query via channel name or description either entirely or partially. Results include both live and offline channels.`, - version: "0.0.2", + version: "0.0.3", type: "action", props: { ...common.props, diff --git a/components/twitch/actions/search-games/search-games.mjs b/components/twitch/actions/search-games/search-games.mjs index f9f68ee885a77..d3b385abe3650 100644 --- a/components/twitch/actions/search-games/search-games.mjs +++ b/components/twitch/actions/search-games/search-games.mjs @@ -7,7 +7,7 @@ export default { description: `Searches for games based on a specified query parameter. A game is returned if the query parameter is matched entirely or partially in the channel description or game name`, - version: "0.0.2", + version: "0.0.3", type: "action", props: { ...common.props, diff --git a/components/twitch/actions/unblock-user/unblock-user.mjs b/components/twitch/actions/unblock-user/unblock-user.mjs index 7c9f2f815e365..d6fbec1f97178 100644 --- a/components/twitch/actions/unblock-user/unblock-user.mjs +++ b/components/twitch/actions/unblock-user/unblock-user.mjs @@ -5,7 +5,7 @@ export default { name: "Unblock User", key: "twitch-unblock-user", description: "Unblocks a user; that is, deletes a specified target user to your blocks list", - version: "0.0.2", + version: "0.0.3", type: "action", props: { ...common.props, diff --git a/components/twitch/actions/update-channel/update-channel.mjs b/components/twitch/actions/update-channel/update-channel.mjs index adbfaa4fb0b7b..b01185e5880d1 100644 --- a/components/twitch/actions/update-channel/update-channel.mjs +++ b/components/twitch/actions/update-channel/update-channel.mjs @@ -6,7 +6,7 @@ export default { key: "twitch-update-channel", description: `Update information for the channel owned by the authenticated user. At least one parameter must be provided.`, - version: "0.0.2", + version: "0.0.3", type: "action", props: { ...common.props, diff --git a/components/twitch/package.json b/components/twitch/package.json index 175e1a507b96c..762d486e06b63 100644 --- a/components/twitch/package.json +++ b/components/twitch/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/twitch", - "version": "0.0.2", + "version": "0.0.3", "description": "Pipedream Twitch Components", "main": "twitch.app.mjs", "keywords": [ diff --git a/components/twitch/sources/followed-streams/followed-streams.mjs b/components/twitch/sources/followed-streams/followed-streams.mjs index 6cded1003d77a..41e7fd559e383 100644 --- a/components/twitch/sources/followed-streams/followed-streams.mjs +++ b/components/twitch/sources/followed-streams/followed-streams.mjs @@ -5,7 +5,7 @@ export default { name: "New Followed Streams", key: "twitch-followed-streams", description: "Emit new event when a followed stream is live.", - version: "0.0.4", + version: "0.0.5", type: "source", methods: { ...common.methods, diff --git a/components/twitch/sources/new-clip-by-streamer/new-clip-by-streamer.mjs b/components/twitch/sources/new-clip-by-streamer/new-clip-by-streamer.mjs index 7e50ef988327b..7eabb4ae52dcb 100644 --- a/components/twitch/sources/new-clip-by-streamer/new-clip-by-streamer.mjs +++ b/components/twitch/sources/new-clip-by-streamer/new-clip-by-streamer.mjs @@ -6,7 +6,7 @@ export default { name: "New Clip By Streamer", key: "twitch-new-clip-by-streamer", description: "Emit new event when there is a new clip for the specified streamer.", - version: "0.0.1", + version: "0.0.2", type: "source", props: { ...common.props, diff --git a/components/twitch/sources/new-clips/new-clips.mjs b/components/twitch/sources/new-clips/new-clips.mjs index e9a666ea86272..a969a7afd108f 100644 --- a/components/twitch/sources/new-clips/new-clips.mjs +++ b/components/twitch/sources/new-clips/new-clips.mjs @@ -6,7 +6,7 @@ export default { name: "New Clips", key: "twitch-new-clips", description: "Emit new event when there is a new clip for the specified game.", - version: "0.0.2", + version: "0.0.3", type: "source", props: { ...common.props, diff --git a/components/twitch/sources/new-follower/new-follower.mjs b/components/twitch/sources/new-follower/new-follower.mjs index 48756cc0922c9..e365bf47adfe7 100644 --- a/components/twitch/sources/new-follower/new-follower.mjs +++ b/components/twitch/sources/new-follower/new-follower.mjs @@ -6,7 +6,7 @@ export default { key: "twitch-new-follower", description: "Emit new event when a new user follows your channel.", type: "source", - version: "0.0.4", + version: "0.0.5", methods: { ...common.methods, async getTopics() { diff --git a/components/twitch/sources/new-videos/new-videos.mjs b/components/twitch/sources/new-videos/new-videos.mjs index 1239e974215a9..c0969fa4f4a17 100644 --- a/components/twitch/sources/new-videos/new-videos.mjs +++ b/components/twitch/sources/new-videos/new-videos.mjs @@ -6,7 +6,7 @@ export default { name: "New Videos", key: "twitch-new-videos", description: "Emit new event when there is a new video from channels you follow.", - version: "0.0.2", + version: "0.0.3", type: "source", props: { ...common.props, diff --git a/components/twitch/sources/streams-by-game/streams-by-game.mjs b/components/twitch/sources/streams-by-game/streams-by-game.mjs index 031b87b325072..6c1ca7769d91a 100644 --- a/components/twitch/sources/streams-by-game/streams-by-game.mjs +++ b/components/twitch/sources/streams-by-game/streams-by-game.mjs @@ -6,7 +6,7 @@ export default { name: "New Streams By Game", key: "twitch-streams-by-game", description: "Emit new event when a live stream starts from any stream matching the game and language specified.", - version: "0.0.2", + version: "0.0.3", type: "source", props: { ...common.props, diff --git a/components/twitch/sources/streams-by-streamer/streams-by-streamer.mjs b/components/twitch/sources/streams-by-streamer/streams-by-streamer.mjs index 891d4d1972696..0afd03e8515cf 100644 --- a/components/twitch/sources/streams-by-streamer/streams-by-streamer.mjs +++ b/components/twitch/sources/streams-by-streamer/streams-by-streamer.mjs @@ -5,7 +5,7 @@ export default { name: "New Streams By Streamer", key: "twitch-streams-by-streamer", description: "Emit new event when a live stream starts from the streamers you specify.", - version: "0.0.4", + version: "0.0.5", type: "source", props: { ...common.props, diff --git a/components/twitch/twitch.app.mjs b/components/twitch/twitch.app.mjs index c9676537121d9..4115860a68988 100644 --- a/components/twitch/twitch.app.mjs +++ b/components/twitch/twitch.app.mjs @@ -53,7 +53,7 @@ export default { _getParamsSerializer() { return (p) => qs.stringify(p, { - arrayFormat: "repeat", + arrayFormat: "brackets", }); }, async _makeRequest(method, endpoint, params = {}) { @@ -62,7 +62,9 @@ export default { url: `${this._getBaseUrl()}/${endpoint}`, headers: this._getHeaders(), params, - paramsSerializer: this._getParamsSerializer(params), + paramsSerializer: { + serializer: this._getParamsSerializer(params), + }, }; return await axios(config); },