Skip to content
This repository has been archived by the owner on Feb 17, 2020. It is now read-only.

Paginator does not work correctly #3

Open
studna opened this issue Sep 26, 2015 · 7 comments
Open

Paginator does not work correctly #3

studna opened this issue Sep 26, 2015 · 7 comments

Comments

@studna
Copy link

studna commented Sep 26, 2015

I'm trying to paginate followers, but I can't figure it out because of response structure (list of followers is under 'users' key). Is there any easy solution to solve this?

Many thanks.

@akadlec
Copy link
Contributor

akadlec commented Sep 27, 2015

Twitter does not use pagination. You have to specify start point and all tweets are loaded automatically.

@studna
Copy link
Author

studna commented Sep 27, 2015

When I try to list followers via IPub\Twitter\ApiCall::get() it returns IPub\Twitter\Paginator and there is no way to get correct data from it. Checkout the API method I mentioned and you'll quickly see, what my problem is.

@akadlec
Copy link
Contributor

akadlec commented Sep 29, 2015

I've got your point. Ok now the extension can support only statuses, because they are not under subarray. What i can do is to create some "map" for other type of lists or not return Paginator for this diiferent lists.

@jirinapravnik
Copy link
Contributor

Same problem here with users/search endpoint. IMHO should be better leave Paginator only for statuses or remove full Paginator...

@studna
Copy link
Author

studna commented Jul 20, 2016

@jirinapravnik I have a solution (two paginators). It's little uggly (extending the extension), but it works. https://gist.github.com/studna/fe7f54f28b5dd58d38030a2a46a25972

@jirinapravnik
Copy link
Contributor

@akadlec what solutions would you like to see? i would prepare PR for it

@akadlec
Copy link
Contributor

akadlec commented Jul 21, 2016

Hmm...two options, full refactoring of paginating functions or use paginator on some endpoints

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants