Skip to content

feat: implement DM Blocks management API endpoints#221

Merged
sivchari merged 1 commit intomainfrom
feature/dm-blocks-management-endpoints
Jul 16, 2025
Merged

feat: implement DM Blocks management API endpoints#221
sivchari merged 1 commit intomainfrom
feature/dm-blocks-management-endpoints

Conversation

@sivchari
Copy link
Owner

@sivchari sivchari commented Jul 16, 2025

  • Added postDMBlockingURL and undoDMBlockingURL endpoint constants
  • Added DM Blocks methods to DirectMessages interface
  • Extended direct_message.go with DM blocking data structures
  • Created dm_blocks.go with implementation functions
  • Added client methods for DM blocking operations
  • Added comprehensive tests covering success and error scenarios

Implements DM Blocks management endpoints:

  • POST /2/users/{id}/dm/block - Block DMs from a user
  • DELETE /2/users/{id}/dm/unblock - Unblock DMs from a user

Features:

  • DM-specific blocking (separate from regular user blocking)
  • Granular control over direct message communications
  • Proper error handling for various scenarios
  • JSON request/response handling

close #207

- Added postDMBlockingURL and undoDMBlockingURL endpoint constants
- Added DM Blocks methods to DirectMessages interface
- Extended direct_message.go with DM blocking data structures
- Created dm_blocks.go with implementation functions
- Added client methods for DM blocking operations
- Added comprehensive tests covering success and error scenarios

Implements DM Blocks management endpoints:
- POST /2/users/{id}/dm/block - Block DMs from a user
- DELETE /2/users/{id}/dm/unblock - Unblock DMs from a user

Features:
- DM-specific blocking (separate from regular user blocking)
- Granular control over direct message communications
- Proper error handling for various scenarios
- JSON request/response handling

Resolves Issue #207
@sivchari sivchari merged commit 4bb8af4 into main Jul 16, 2025
4 checks passed
@sivchari sivchari deleted the feature/dm-blocks-management-endpoints branch July 16, 2025 04:07
This was referenced Jul 16, 2025
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.

Implement DM Blocks management endpoints

1 participant

Comments