mirror of
https://framagit.org/veretcle/scootaloo.git
synced 2025-07-21 17:34:37 +02:00
feat: add customizable page_size to twitter timeline
This commit is contained in:
@@ -32,10 +32,11 @@ pub async fn get_user_timeline(
|
||||
screen_name: &str,
|
||||
token: &Token,
|
||||
lid: Option<u64>,
|
||||
page_size: i32,
|
||||
) -> Result<Vec<Tweet>, Box<dyn Error>> {
|
||||
// fix the page size to 200 as it is the maximum Twitter authorizes
|
||||
let (_, feed) = user_timeline(UserID::from(screen_name.to_owned()), true, false, token)
|
||||
.with_page_size(200)
|
||||
.with_page_size(page_size)
|
||||
.older(lid)
|
||||
.await?;
|
||||
|
||||
|
Reference in New Issue
Block a user