Skip to content

Add V1 API support for people taggings and tags#12

Merged
ebrett merged 1 commit intomainfrom
feature/v1-api-taggings-tags
Jan 29, 2026
Merged

Add V1 API support for people taggings and tags#12
ebrett merged 1 commit intomainfrom
feature/v1-api-taggings-tags

Conversation

@ebrett
Copy link
Owner

@ebrett ebrett commented Jan 29, 2026

Summary

Implements GitHub issue #11 to provide V1 API methods for managing person taggings and listing tags. The V2 API does not include tag names or provide tag management endpoints, so V1 API support is required for these operations.

Changes

People Resource - V1 API Methods

  • list_taggings(person_id) - GET /api/v1/people/:id/taggings
    • Returns taggings with tag names (V2 only returns IDs)
  • add_tagging(person_id, tag_name) - PUT /api/v1/people/:id/taggings
    • Adds a tag to a person
  • remove_tagging(person_id, tag_name) - DELETE /api/v1/people/:id/taggings/:tag
    • Removes a tag from a person

Tags Resource - V1 API

  • list() - GET /api/v1/tags
    • Lists all available tags

Documentation

  • Updated README with usage examples for all new methods
  • Added notes explaining V1 vs V2 API differences
  • Preserved existing V2 taggings() method for backward compatibility

Testing

  • ✅ All tests passing (200 examples, 0 failures)
  • ✅ Test coverage: 92.83% (exceeds 90% target)
  • ✅ StandardRB linter: No offenses
  • Added comprehensive RSpec tests for all new methods

Impact

This allows applications using the gem to:

  • Replace hardcoded V1 API calls with proper gem methods
  • Get tag names from person taggings (not available in V2 API)
  • Manage tags programmatically
  • Improve testing (mock gem methods instead of HTTP requests)

Related Issues

Closes #11


🤖 Generated with Claude Code

Implements GitHub issue #11 to provide V1 API methods for managing
person taggings and listing tags. V2 API does not include tag names
or provide tag management endpoints, so V1 API support is required.

Added People resource methods:
- list_taggings(person_id) - GET /api/v1/people/:id/taggings
  Returns taggings with tag names (V2 only returns IDs)
- add_tagging(person_id, tag_name) - PUT /api/v1/people/:id/taggings
  Adds a tag to a person
- remove_tagging(person_id, tag_name) - DELETE /api/v1/people/:id/taggings/:tag
  Removes a tag from a person

Added Tags resource:
- list() - GET /api/v1/tags
  Lists all available tags

The existing V2 taggings() method is preserved for backward
compatibility but now includes a note that it doesn't return tag names.

All methods include comprehensive RSpec tests. Test coverage: 92.83%

Resolves: #11

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@ebrett ebrett merged commit 64a9e4e into main Jan 29, 2026
3 checks passed
@ebrett ebrett deleted the feature/v1-api-taggings-tags branch January 29, 2026 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add V1 API support for taggings and tags resources

1 participant