Skip to content

Commit 7276b30

Browse files
committed
App and package updates
1 parent 9b5cf07 commit 7276b30

File tree

2 files changed

+17
-49
lines changed

2 files changed

+17
-49
lines changed

components/hypeauditor/hypeauditor.app.mjs

Lines changed: 12 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { axios } from "@pipedream/platform";
33
export default {
44
type: "app",
55
app: "hypeauditor",
6-
version: "0.0.ts",
76
propDefinitions: {
87
youtubeChannel: {
98
type: "string",
@@ -21,79 +20,45 @@ export default {
2120
label: "TikTok User Name or ID",
2221
description: "The TikTok username or ID for which to generate a report.",
2322
},
24-
instagramUser: {
25-
type: "string",
26-
label: "Instagram User Name or ID",
27-
description: "The Instagram username or ID for which to generate a report.",
28-
},
2923
twitchChannel: {
3024
type: "string",
3125
label: "Twitch Channel Username",
3226
description: "The Twitch channel username for which to generate a report.",
3327
},
3428
},
3529
methods: {
36-
authKeys() {
37-
console.log(Object.keys(this.$auth));
38-
},
3930
_baseUrl() {
40-
return "https://hypeauditor.com/api/method/auditor";
31+
return "https://hypeauditor.com/api/method";
4132
},
42-
async _makeRequest(opts = {}) {
43-
const {
44-
$ = this, method = "GET", path = "/", headers = {}, ...otherOpts
45-
} = opts;
33+
async _makeRequest({
34+
$ = this, path, headers, ...otherOpts
35+
} = {}) {
4636
return axios($, {
47-
method,
4837
url: `${this._baseUrl()}${path}`,
4938
headers: {
5039
...headers,
51-
"X-Auth-Token": this.$auth.token,
52-
"X-Auth-Id": this.$auth.id,
40+
"x-auth-token": this.$auth.token,
41+
"x-auth-id": this.$auth.id,
5342
},
5443
...otherOpts,
5544
});
5645
},
5746
async getYouTubeReport(opts = {}) {
58-
const {
59-
channel, features,
60-
} = opts;
61-
const params = {
62-
channel,
63-
};
64-
if (features) {
65-
params.features = features;
66-
}
6747
return this._makeRequest({
68-
path: "/youtube/",
69-
params,
48+
path: "/auditor.youtube/",
49+
...opts,
7050
});
7151
},
7252
async getTikTokReport(opts = {}) {
73-
const { channel } = opts;
7453
return this._makeRequest({
75-
path: "/tiktok/",
76-
params: {
77-
channel,
78-
},
79-
});
80-
},
81-
async getInstagramReport(opts = {}) {
82-
const { channel } = opts;
83-
return this._makeRequest({
84-
path: "/instagram/",
85-
params: {
86-
channel,
87-
},
54+
path: "/auditor.tiktok/",
55+
...opts,
8856
});
8957
},
9058
async getTwitchReport(opts = {}) {
91-
const { channel } = opts;
9259
return this._makeRequest({
93-
path: "/twitch/",
94-
params: {
95-
channel,
96-
},
60+
path: "/auditor.twitch/",
61+
...opts,
9762
});
9863
},
9964
},

components/hypeauditor/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/hypeauditor",
3-
"version": "0.0.1",
3+
"version": "0.1.0",
44
"description": "Pipedream HypeAuditor Components",
55
"main": "hypeauditor.app.mjs",
66
"keywords": [
@@ -11,5 +11,8 @@
1111
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
1212
"publishConfig": {
1313
"access": "public"
14+
},
15+
"dependencies": {
16+
"@pipedream/platform": "^3.0.3"
1417
}
15-
}
18+
}

0 commit comments

Comments
 (0)