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

API to get post voters #12423

Open
nesro opened this issue Mar 20, 2024 · 2 comments
Open

API to get post voters #12423

nesro opened this issue Mar 20, 2024 · 2 comments
Assignees

Comments

@nesro
Copy link
Contributor

nesro commented Mar 20, 2024

Description

We used the v2 API that GET /api/v2/posts/{pid}/vote and it returned a list of upvoters. This stopped working when we updated NodeBB to v3.x.x.

As I'm looking at the current API, there is no way how to get the list of upvoters. I can load them directly from the database with {_key: 'pid:{pid}:upvote'}, but an API would be much better.

Community forum reference

No response

@julianlam
Copy link
Member

Hi @nesro, @barisusakli did some digging but didn't see that particular GET in the write api. The naming is peculiar, since it's vote.

Since the v2 and v3 APIs were designed, I personally wouldn't have attached a GET method to a verb. That said, I could be wrong 😆


Currently, the only way to retrieve post voters would be to call the websocket with message posts.getVoters.

If you're needing this in the v3 api, please let me know and I will try to get this made available.

@nesro
Copy link
Contributor Author

nesro commented Mar 20, 2024

We want to call this from one of our backends, so the v3 API would be great. I would much appreciate if you could provide it.

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

2 participants