feat: add tracing

This commit is contained in:
ThetaDev 2023-09-22 03:22:38 +02:00
parent ab599206c5
commit 1d1dcd622f
24 changed files with 146 additions and 68 deletions

View file

@ -11,6 +11,7 @@ use super::{response, ClientType, MapResponse, QBrowse, QBrowseParams, RustyPipe
impl RustyPipeQuery {
/// Get the videos from the YouTube startpage
#[tracing::instrument(skip(self))]
pub async fn startpage(&self) -> Result<Paginator<VideoItem>, Error> {
let context = self.get_context(ClientType::Desktop, true, None).await;
let request_body = QBrowse {
@ -29,6 +30,7 @@ impl RustyPipeQuery {
}
/// Get the videos from the YouTube trending page
#[tracing::instrument(skip(self))]
pub async fn trending(&self) -> Result<Vec<VideoItem>, Error> {
let context = self.get_context(ClientType::Desktop, true, None).await;
let request_body = QBrowseParams {