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

Comment and Post are missing Upvote Ratio - needed for Downvotes estimation #120

Open
zmarty opened this issue Aug 23, 2017 · 5 comments
Open

Comments

@zmarty
Copy link

zmarty commented Aug 23, 2017

Some time ago Reddit stopped revealing the actual downvotes count in the API. So downvotes are always set to 0 for Comment and Post instances (this is expected).

The API also returns a JSON field called "upvote_ratio". When combined with the "ups" field we could estimate a value for downvotes.

So my request is: expose upvote_ratio in the Comment and Post classes so I can estimate downvotes.

I am using NuGet 2.0.0-CI00028

@CrustyJew
Copy link
Owner

Feel free to send in a pull request, otherwise someone will eventually get around to it.

@zmarty
Copy link
Author

zmarty commented Aug 24, 2017

I looked into this more and also implemented a local version. However, there is a small problem. Based on what I see here and what I read online, upvote_ratio is only populated for a post in the call to comments. So when we get a list of let's say top 25 posts in a subreddit, that data structure does NOT contain upvote_ratio. It's only if you make separate requests for each post that you get it. I believe this has been reported as a bug to Reddit.

@CrustyJew
Copy link
Owner

I believe this has been reported as a bug to Reddit.

I wouldn't hold my breath for a fix ;) I'd say that if you make it a nullable type and put it in the annotations for the method about how/when it is filled that'll work for now.

@justcool393
Copy link
Contributor

Will add this once the PR for #119 gets merged. I'm not too familiar with merge conflicts in Git, but I want to avoid them if at all possible.

@justcool393
Copy link
Contributor

By the way, this is an intentional thing to require a single submission to be called.

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

No branches or pull requests

3 participants