Bug 338957 - Choqok only lists 20 friends
Summary: Choqok only lists 20 friends
Status: RESOLVED FIXED
Alias: None
Product: choqok
Classification: Applications
Component: Twitter (show other bugs)
Version: Git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Mehrdad Momeny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-09 23:04 UTC by Ian Schwarz
Modified: 2014-12-13 13:46 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.5
Sentry Crash Report:


Attachments
Request all friends using cursor parameter (1.54 KB, application/gzip)
2014-09-09 23:04 UTC, Ian Schwarz
Details
updated patch (1.73 KB, patch)
2014-09-10 19:13 UTC, Ian Schwarz
Details
updated patch, again (1.73 KB, application/gzip)
2014-09-10 19:14 UTC, Ian Schwarz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Schwarz 2014-09-09 23:04:41 UTC
Created attachment 88640 [details]
Request all friends using cursor parameter

Choqok lists a maximum of 20 friends right now, which is the default friend count returned per request (200 maximum).

Attached patch uses the Twitter API's "cursor" parameter to request all friends.
Comment 1 Ian Schwarz 2014-09-10 18:53:33 UTC
Adding a "count" parameter of 200 would further reduce the number of requests per update so we don't hit the rate limit as quickly.
Comment 2 Daniel Kreuter 2014-09-10 18:59:06 UTC
Hi Ian,

setting count to the maximum possible value is always the best way I think (You have only a limited number of requests per hour on Twitter because of performance reasons).

Cheers

Daniel
Comment 3 Daniel Kreuter 2014-09-10 19:00:11 UTC
Oh and btw, can you please upload your patch to git.reviewboard.kde.org (group choqok)

Cheers

Daniel
Comment 4 Ian Schwarz 2014-09-10 19:13:25 UTC
Created attachment 88646 [details]
updated patch

Hey Daniel,

I would, but it's not a git diff and I have no idea how to create one.
I updated my patch to include a larger count.
Comment 5 Ian Schwarz 2014-09-10 19:14:53 UTC
Created attachment 88647 [details]
updated patch, again

Not text/plain.
Comment 6 Mehrdad Momeny 2014-09-11 04:05:40 UTC
(In reply to Ian Schwarz from comment #4)
> Created attachment 88646 [details]
> updated patch
> 
> Hey Daniel,
> 
> I would, but it's not a git diff and I have no idea how to create one.
> I updated my patch to include a larger count.

$ git diff > patch.diff
http://git-scm.com/docs/git-diff
Comment 7 Ian Schwarz 2014-09-11 14:24:34 UTC
(In reply to Mehrdad Momeny from comment #6)
> $ git diff > patch.diff
> http://git-scm.com/docs/git-diff

Huh, that's much easier than what I was doing. I had no idea, thank you very much.

Anyway, I uploaded the patch to the reviewboard.
Comment 8 Mehrdad Momeny 2014-09-12 16:27:07 UTC
Git commit bffb944478e0c7b28923c72dc5d59f37ee13660e by Mehrdad Momeny.
Committed on 12/09/2014 at 16:24.
Pushed by momeny into branch 'master'.
REVIEW:120143
Loop for all friends and list them in Choqok's PM dialog and save.
Based on a patch from Ian Schwarz.

M  +1    -1    helperlibs/twitterapihelper/twitterapidmessagedialog.cpp
M  +37   -21   helperlibs/twitterapihelper/twitterapimicroblog.cpp

http://commits.kde.org/choqok/bffb944478e0c7b28923c72dc5d59f37ee13660e