Fix People resource to use correct V2 API /api/v2/signups endpoints#6
Merged
Fix People resource to use correct V2 API /api/v2/signups endpoints#6
Conversation
The NationBuilder V2 API uses /api/v2/signups, not /api/v2/people. Updated all People resource endpoints to use the correct path: - show() now calls /api/v2/signups/:id - Added support for /api/v2/signups/me for current user - Updated tests to reflect correct endpoint and resource type (signup vs person) - All 19 tests passing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.
Summary
Fixes the People resource to use the correct NationBuilder V2 API endpoints. The V2 API uses
/api/v2/signupsinstead of/api/v2/people.Changes
Updated
lib/nationbuilder_api/resources/people.rb:/api/v2/people/:idto/api/v2/signups/:id/api/v2/signups/mefor current usersignupinstead ofperson)Updated
spec/nationbuilder_api/resources/people_spec.rb:/api/v2/signupsendpointspersontosignup/api/v2/signups/meendpointMotivation
The gem was calling
/api/v2/people/:idwhich doesn't exist in the NationBuilder V2 API. The correct endpoint is/api/v2/signups/:idas documented in the OpenAPI spec.This was causing 404 errors when trying to fetch user profile data in production.
Test plan
/api/v2/signups/meendpoint🤖 Generated with Claude Code