Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

different number of followers, depending on how fetched #97

Open
sorin-costea opened this issue Sep 27, 2016 · 0 comments
Open

different number of followers, depending on how fetched #97

sorin-costea opened this issue Sep 27, 2016 · 0 comments

Comments

@sorin-costea
Copy link

Hi all, how is it possible that while getFollowersCount() returns a certain value, actually requesting the followers returns about 10% duplicate names - yielding a 10% lower real number of followers? See code below - the final map will be noticeably smaller than the initial count! Is this an API issue or a Jumblr one?
A lesser issue would be that, although the options say 20, the followers() call will usually return anything between 15-20...
Thank you!

            int numFollowers = myBlog.getFollowersCount();
            logger.info("Followers: " + numFollowers);
            Map<String, JsonObject> mapFollowers = new HashMap<>();
            int offset = 0;
            do {
                options.put("offset", Integer.toString(offset));
                List<User> followers = myBlog.followers(options);
                int fetched = followers.size();
                logger.info(offset + "/" + fetched);
                offset += fetched;
                for (User follower : followers) {
                    logger.info("follower: " + follower.getName());
                }
            } while (fetched > 0);
            logger.info("Real map: " + mapFollowers.size());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant