-
Couldn't load subscription status.
- Fork 5.5k
HypeAuditor new components #14350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
HypeAuditor new components #14350
Changes from 11 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
9b5cf07
Initial AI-generated code (partial)
GTFalcao 7276b30
App and package updates
GTFalcao faaa536
pnpm
GTFalcao 99d4111
Prop description updates
GTFalcao cfe868d
YouTube report action
GTFalcao f8ceec8
TikTok report action
GTFalcao eabacb0
Twitch report action
GTFalcao c17f749
Adjustment
GTFalcao 07aa033
Merge branch 'master' into issue-13275
GTFalcao 74e11e0
Merge branch 'master' into issue-13275
GTFalcao 4d27e13
pnpm
GTFalcao 72af636
Merge remote-tracking branch 'origin/master' into issue-13275
michelle0927 3bee07d
pnpm-lock.yaml
michelle0927 577d222
versions
michelle0927 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,4 +8,4 @@ export default { | |
| console.log(Object.keys(this.$auth)); | ||
| }, | ||
| }, | ||
| }; | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,4 +8,4 @@ export default { | |
| console.log(Object.keys(this.$auth)); | ||
| }, | ||
| }, | ||
| }; | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,4 +8,4 @@ export default { | |
| console.log(Object.keys(this.$auth)); | ||
| }, | ||
| }, | ||
| }; | ||
| }; | ||
29 changes: 29 additions & 0 deletions
29
components/hypeauditor/actions/get-tiktok-report/get-tiktok-report.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| import hypeauditor from "../../hypeauditor.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "hypeauditor-get-tiktok-report", | ||
| name: "Get TikTok Report", | ||
| description: "Generates a comprehensive TikTok report for a specified channel. [See the documentation](https://hypeauditor.readme.io/reference/report_tiktok)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| hypeauditor, | ||
| channel: { | ||
| propDefinition: [ | ||
| hypeauditor, | ||
| "tiktokChannel", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const { | ||
| hypeauditor, ...params | ||
| } = this; | ||
| const response = await hypeauditor.getTikTokReport({ | ||
| $, | ||
| params, | ||
| }); | ||
| $.export("$summary", `Successfully fetched TikTok report for channel ${this.channel}`); | ||
| return response; | ||
| }, | ||
| }; |
29 changes: 29 additions & 0 deletions
29
components/hypeauditor/actions/get-twitch-report/get-twitch-report.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| import hypeauditor from "../../hypeauditor.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "hypeauditor-get-twitch-report", | ||
| name: "Get Twitch Report", | ||
| description: "Generates a Twitch report for a specified channel. [See the documentation](https://hypeauditor.readme.io/reference/report_twitch)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| hypeauditor, | ||
| channel: { | ||
| propDefinition: [ | ||
| hypeauditor, | ||
| "twitchChannel", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const { | ||
| hypeauditor, ...params | ||
| } = this; | ||
| const response = await hypeauditor.getTwitchReport({ | ||
| $, | ||
| params, | ||
| }); | ||
| $.export("$summary", `Successfully fetched Twitch report for channel ${this.channel}`); | ||
| return response; | ||
| }, | ||
| }; |
35 changes: 35 additions & 0 deletions
35
components/hypeauditor/actions/get-youtube-report/get-youtube-report.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import hypeauditor from "../../hypeauditor.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "hypeauditor-get-youtube-report", | ||
| name: "Get YouTube Report", | ||
| description: "Generates a comprehensive YouTube report for a specified channel. [See the documentation](https://hypeauditor.readme.io/reference/report_youtube)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| hypeauditor, | ||
| channel: { | ||
| propDefinition: [ | ||
| hypeauditor, | ||
| "youtubeChannel", | ||
| ], | ||
| }, | ||
| features: { | ||
| propDefinition: [ | ||
| hypeauditor, | ||
| "youtubeFeatures", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const { | ||
| hypeauditor, ...params | ||
| } = this; | ||
| const response = await hypeauditor.getYouTubeReport({ | ||
| $, | ||
| params, | ||
| }); | ||
| $.export("$summary", `Successfully fetched YouTube report for channel ${this.channel}`); | ||
| return response; | ||
| }, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,65 @@ | ||
| import { axios } from "@pipedream/platform"; | ||
|
|
||
| export default { | ||
| type: "app", | ||
| app: "hypeauditor", | ||
| propDefinitions: {}, | ||
| propDefinitions: { | ||
| youtubeChannel: { | ||
| type: "string", | ||
| label: "Channel ID or Username", | ||
| description: "The YouTube channel ID or username for which to generate a report.", | ||
| }, | ||
| youtubeFeatures: { | ||
| type: "string", | ||
| label: "Features List", | ||
| description: "Optional list of features to include in the YouTube report. [See the documentation](https://hypeauditor.readme.io/reference/report_youtube) for more information.", | ||
| optional: true, | ||
| }, | ||
| tiktokChannel: { | ||
| type: "string", | ||
| label: "TikTok Channel Username", | ||
| description: "The TikTok username (e.g. `littlebig`) from a TikTok channel URL (in this example, `https://www.tiktok.com/@littlebig`).", | ||
| }, | ||
| twitchChannel: { | ||
| type: "string", | ||
| label: "Twitch Channel Username", | ||
| description: "The Twitch username (e.g. `nasa`) from a Twitch channel URL (in this example, `https://www.twitch.tv/nasa`).", | ||
| }, | ||
| }, | ||
| methods: { | ||
| // this.$auth contains connected account data | ||
| authKeys() { | ||
| console.log(Object.keys(this.$auth)); | ||
| _baseUrl() { | ||
| return "https://hypeauditor.com/api/method"; | ||
| }, | ||
| async _makeRequest({ | ||
| $ = this, path, headers, ...otherOpts | ||
| } = {}) { | ||
| return axios($, { | ||
| url: `${this._baseUrl()}${path}`, | ||
| headers: { | ||
| ...headers, | ||
| "x-auth-token": this.$auth.token, | ||
| "x-auth-id": this.$auth.id, | ||
| }, | ||
michelle0927 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ...otherOpts, | ||
| }); | ||
| }, | ||
| async getYouTubeReport(opts = {}) { | ||
| return this._makeRequest({ | ||
| path: "/auditor.youtube/", | ||
| ...opts, | ||
| }); | ||
| }, | ||
| async getTikTokReport(opts = {}) { | ||
| return this._makeRequest({ | ||
| path: "/auditor.tiktok/", | ||
| ...opts, | ||
| }); | ||
| }, | ||
| async getTwitchReport(opts = {}) { | ||
| return this._makeRequest({ | ||
| path: "/auditor.twitch/", | ||
| ...opts, | ||
| }); | ||
| }, | ||
| }, | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "name": "@pipedream/hypeauditor", | ||
| "version": "0.0.1", | ||
| "version": "0.1.0", | ||
| "description": "Pipedream HypeAuditor Components", | ||
| "main": "hypeauditor.app.mjs", | ||
| "keywords": [ | ||
|
|
@@ -11,5 +11,8 @@ | |
| "author": "Pipedream <[email protected]> (https://pipedream.com/)", | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "dependencies": { | ||
| "@pipedream/platform": "^3.0.3" | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,4 +8,4 @@ export default { | |
| console.log(Object.keys(this.$auth)); | ||
| }, | ||
| }, | ||
| }; | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,4 +8,4 @@ export default { | |
| console.log(Object.keys(this.$auth)); | ||
| }, | ||
| }, | ||
| }; | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,4 +8,4 @@ export default { | |
| console.log(Object.keys(this.$auth)); | ||
| }, | ||
| }, | ||
| }; | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,4 +8,4 @@ export default { | |
| console.log(Object.keys(this.$auth)); | ||
| }, | ||
| }, | ||
| }; | ||
| }; | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.