Skip to content

Commit cfe868d

Browse files
committed
YouTube report action
1 parent 99d4111 commit cfe868d

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

components/hypeauditor/actions/get-youtube-report/get-youtube-report.mjs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,33 @@ import hypeauditor from "../../hypeauditor.app.mjs";
33
export default {
44
key: "hypeauditor-get-youtube-report",
55
name: "Get YouTube Report",
6-
description: "Generates a comprehensive YouTube report for a specified channel. [See the documentation]()",
7-
version: "0.0.{{ts}}",
6+
description: "Generates a comprehensive YouTube report for a specified channel. [See the documentation](https://hypeauditor.readme.io/reference/report_youtube)",
7+
version: "0.0.1",
88
type: "action",
99
props: {
1010
hypeauditor,
11-
youtubeChannel: {
11+
channel: {
1212
propDefinition: [
1313
hypeauditor,
1414
"youtubeChannel",
1515
],
1616
},
17-
youtubeFeatures: {
17+
features: {
1818
propDefinition: [
1919
hypeauditor,
2020
"youtubeFeatures",
2121
],
2222
},
2323
},
2424
async run({ $ }) {
25-
const response = await this.hypeauditor.getYouTubeReport({
26-
channel: this.youtubeChannel,
27-
features: this.youtubeFeatures,
25+
const {
26+
hypeauditor, ...params
27+
} = this;
28+
const response = await hypeauditor.getYouTubeReport({
29+
$,
30+
params,
2831
});
29-
$.export("$summary", `Successfully generated YouTube report for channel ${this.youtubeChannel}`);
32+
$.export("$summary", `Successfully fetched YouTube report for channel ${this.channel}`);
3033
return response;
3134
},
3235
};

components/hypeauditor/hypeauditor.app.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default {
1212
youtubeFeatures: {
1313
type: "string",
1414
label: "Features List",
15-
description: "Optional list of features to include in the YouTube report. [See the documentation](https://hypeauditor.readme.io/reference/get_report_youtube) for more information.",
15+
description: "Optional list of features to include in the YouTube report. [See the documentation](https://hypeauditor.readme.io/reference/report_youtube) for more information.",
1616
optional: true,
1717
},
1818
tiktokChannel: {

0 commit comments

Comments
 (0)