mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-17 08:34:42 -05:00
api changes
This commit is contained in:
parent
79ba510788
commit
eb7f0e6019
1 changed files with 8 additions and 5 deletions
|
@ -127,7 +127,7 @@ app.get("/avatars/:v", async function (req, res) {
|
||||||
} catch {}
|
} catch {}
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get("/api/user-score-api", async (req, res) => {
|
app.get("/api/getEngagementData", async (req, res) => {
|
||||||
const { fetch } = await import("undici");
|
const { fetch } = await import("undici");
|
||||||
|
|
||||||
const id = req.query.v;
|
const id = req.query.v;
|
||||||
|
@ -192,7 +192,8 @@ app.get("/avatars/:v", async function (req, res) {
|
||||||
var respon = {
|
var respon = {
|
||||||
like_count:likes,
|
like_count:likes,
|
||||||
dislike_count:dislikes,
|
dislike_count:dislikes,
|
||||||
user_score : {
|
rating:engagement.rating,
|
||||||
|
userScore : {
|
||||||
label:userScoreLabel,
|
label:userScoreLabel,
|
||||||
color:userScoreColor,
|
color:userScoreColor,
|
||||||
},
|
},
|
||||||
|
@ -200,10 +201,12 @@ app.get("/avatars/:v", async function (req, res) {
|
||||||
likeColor:likeColor,
|
likeColor:likeColor,
|
||||||
dislikeColor: dislikeColor,
|
dislikeColor: dislikeColor,
|
||||||
percentage: {
|
percentage: {
|
||||||
likePercentage:likePercentage,
|
likePercentage:`${likePercentage}%`,
|
||||||
dislikePercentage:dislikePercentage
|
dislikePercentage:`${dislikePercentage}%`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
ReturnYouTubeDislikesApiRawResponse:engagement,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
res.send(respon)
|
res.send(respon)
|
||||||
|
|
Loading…
Reference in a new issue