Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
dfox428268yPlease email info@devrant.io for full rules.
Generally using any read endpoints for their intended purpose (ex. no mass data-mining) is fine. But we do have some requirements if the data is being displayed anywhere (a link to devRant somewhere in project, and credit to the author of any rant that is being displayed.) -
num_upvotes = 320
num_downvotes = 0
score = 320
I would love to know why you'd need all three of them :P -
donuts238488y@dfox I'm just building my own client, wanna do some C# and personal projects again.
https://github.com/allanx2000/... -
donuts238488y@filthyranter @jAsE Actually I just noticed this in an API response... Why?
https://www.devrant.io/rants/425508
"num_upvotes":1,
"num_downvotes":4,
"score":1,
1 - 4 != 1... -
tahnik389898y@allanx2000 I think for the score devRant uses a algorithm like reddit. So even it has a lot of downvotes, it might not get reflected immediately on the score.
-
donuts238488y@tahnik but if the API is returning the response, why doesn't it calculate it on each request? Or just not return score at all? Leave it to the clients to calculate when it's displayed. That's actually what I did until I noticed the difference.
-
tahnik389898y@allanx2000 I think it does calculate each time. It is just not exposed in the client side logic. Because it can be pretty sensitive and I am pretty sure they don't want us to know how they calculate the score. Even if they tell us, it is information you would not want to be public I guess.
-
donuts238488y@tahnik or maybe it's just:
score = upvote > 0 ? upvotes : -1*downvotes
I guess whatever it is, just use score, maybe it's a abstraction for if they decide to change the formula
Is there any documentation on what is public API or not?
@dfox or is reverse engineering the calls allowed?
undefined