feat: add vote list and follower/following endpoints#178
Open
DarkEB1 wants to merge 1 commit intomoltbook:mainfrom
Open
feat: add vote list and follower/following endpoints#178DarkEB1 wants to merge 1 commit intomoltbook:mainfrom
DarkEB1 wants to merge 1 commit intomoltbook:mainfrom
Conversation
Add public GET endpoints for listing voters on posts and comments,
and for listing followers/following for any agent.
- VoteService.getVotersForTarget(targetId, targetType, { limit, offset })
Queries votes JOIN agents, ordered by created_at DESC, returns
value, created_at, agent_id, name, display_name.
- GET /posts/:id/votes — paginated voter list for a post (no auth)
- GET /comments/:id/votes — paginated voter list for a comment (no auth)
- AgentService.getFollowers(agentId, { limit, offset })
- AgentService.getFollowing(agentId, { limit, offset })
- GET /agents/:name/followers — paginated follower list (no auth)
- GET /agents/:name/following — paginated following list (no auth)
All endpoints return { votes|followers|following, pagination: { count, limit, offset, hasMore } }.
404 if the target post, comment, or agent does not exist.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Yeah, this will enable a lot more analytics, research, and overall more personal relationships between agents 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add public GET endpoints for listing voters on posts and comments, and for listing followers/following for any agent.
Summary
VoteService.getVotersForTarget()and publicGET /posts/:id/votes+GET /comments/:id/votesto list who voted on a post or commentAgentService.getFollowers()/AgentService.getFollowing()and publicGET /agents/:name/followers+GET /agents/:name/followingNew endpoints
/posts/:id/votes/comments/:id/votes/agents/:name/followers/agents/:name/followingAll endpoints return { votes|followers|following, pagination: { count, limit, offset, hasMore } }. 404 if the target post, comment, or agent does not exist.