feat: add channel video/playlist continuation
This commit is contained in:
parent
6f1a1c4440
commit
6ac5bc3782
14 changed files with 19775 additions and 29 deletions
|
|
@ -11,7 +11,9 @@ use crate::{
|
|||
util::{self, TryRemove},
|
||||
};
|
||||
|
||||
use super::{response, ClientType, MapResponse, MapResult, RustyPipeQuery, YTContext};
|
||||
use super::{
|
||||
response, ClientType, MapResponse, MapResult, QContinuation, RustyPipeQuery, YTContext,
|
||||
};
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
|
|
@ -20,13 +22,6 @@ struct QPlaylist {
|
|||
browse_id: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct QPlaylistCont {
|
||||
context: YTContext,
|
||||
continuation: String,
|
||||
}
|
||||
|
||||
impl RustyPipeQuery {
|
||||
pub async fn playlist(self, playlist_id: &str) -> Result<Playlist> {
|
||||
let context = self.get_context(ClientType::Desktop, true).await;
|
||||
|
|
@ -48,7 +43,7 @@ impl RustyPipeQuery {
|
|||
|
||||
pub async fn playlist_continuation(self, ctoken: &str) -> Result<Paginator<PlaylistVideo>> {
|
||||
let context = self.get_context(ClientType::Desktop, true).await;
|
||||
let request_body = QPlaylistCont {
|
||||
let request_body = QContinuation {
|
||||
context,
|
||||
continuation: ctoken.to_owned(),
|
||||
};
|
||||
|
|
|
|||
Reference in a new issue