Topic: [Feature] Return own vote for posts with the API

Posted under Site Bug Reports & Feature Requests

Requested feature overview description.
Return the value of the user's vote when getting a post's data from the API.

Why would it be useful?
Returning the user's own vote in the API would allow people to see whether they have already voted for a post or not, something which can already be done on the post page on the website but not through any tools using the API.

The API already returns whether the post is favorited or not, but many people choose not to use the favorites feature and instead use the voting.

What part(s) of the site page(s) are affected?
/posts/(id).json and /posts.json

There is unfortunately fairly significant cost of doing this in bulk, but less so when doing it individually. Offering of favorites may also go away in the future if things are further optimized and refactored.

As the purpose of the API is data export, and not UI interop, it doesn't offer as many amenities for these types of activities.

kiranoot said:
Offering of favorites may also go away in the future

This would not be good, in my opinion. I use bitWolfy's re621, and It's very convenient to see what I have favorite already and what not.
And I think it would be a huge gain, if a big part oh his script would be implemented to e621. E.g.: The hover zoom, custom flags, tiny alias, etc.

https://forums.e-hentai.org/index.php?showtopic=261743 That site even removed page numbers because it's not scaling, anymore. Favorites might end up being divorced from that database on here? One talk was just doing faked page numbers on that other site, using GID ranges, to save on CPU and I/O demands. Could we end up doing something similar?

I mean, technically, a plugin could do favorites, client-side but that kind of defeats the purpose and isn't very portable between devices. :(

  • 1