From aa1d96a259b67bab4eb0433f55111012c9d159bb Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 3 Aug 2024 16:44:24 -0700 Subject: [PATCH] Enhancement: use tubearchivist stats endpoints --- src/widgets/tubearchivist/component.jsx | 14 ++++---------- src/widgets/tubearchivist/widget.js | 19 +++++++++++-------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/src/widgets/tubearchivist/component.jsx b/src/widgets/tubearchivist/component.jsx index c29ae1c4..b4476820 100644 --- a/src/widgets/tubearchivist/component.jsx +++ b/src/widgets/tubearchivist/component.jsx @@ -32,16 +32,10 @@ export default function Component({ service }) { return ( - - - - + + + + ); } diff --git a/src/widgets/tubearchivist/widget.js b/src/widgets/tubearchivist/widget.js index addd47c5..85fd1192 100644 --- a/src/widgets/tubearchivist/widget.js +++ b/src/widgets/tubearchivist/widget.js @@ -6,20 +6,23 @@ const widget = { mappings: { downloads: { - endpoint: "download", - validate: ["paginate"], + endpoint: "stats/download", + validate: ["doc_count"], }, videos: { - endpoint: "video", - validate: ["paginate"], + endpoint: "stats/video", + validate: ["doc_count"], }, channels: { - endpoint: "channel", - validate: ["paginate"], + endpoint: "stats/channel", + validate: ["doc_count"], }, playlists: { - endpoint: "playlist", - validate: ["paginate"], + endpoint: "stats/playlist", + validate: ["doc_count"], + }, + stats: { + endpoint: "stats", }, }, };