Progress during requests
jajosheni opened this issue · comments
Sheni Hamitaj commented
Hello, awesome work done in this repo.
I wanted to ask if there is any way to see the progress of the requests.
I.e. while getting followers can I see how many of them are retrieved?
Then compare it to the number of followers retrieved from profile info.
Thank you
Stefano Bertagno commented
You can use the updateHandler
parameter on methods such as UserHandler.followed
.
It accepts a block as such:
public typealias PaginationUpdateHandler<R, P> = (
_ update: P,
_ inserting: [R],
_ nextParameters: Bookmark,
_ runningResponse: [R]
) -> Void
inserting
represents the newly fetchedUser
s.runningResponse
represents allUser
s returned until then.