Skip to content

Add Item Catalog API#1

Merged
great-majority merged 2 commits into
mainfrom
feat/item-command
Jun 27, 2025
Merged

Add Item Catalog API#1
great-majority merged 2 commits into
mainfrom
feat/item-command

Conversation

@great-majority

Copy link
Copy Markdown
Owner

This PR introduces a new item catalog system that allows external clients to browse and retrieve information about all available items in the Studio.

What's Added

  • New item command type with three subcommands:
    • list-groups - Get all item groups with category counts
    • list-group - Get categories within a specific group
    • list-category - Get all items within a category with detailed properties
  • ItemCommandHandler - Handles item catalog requests and returns structured data about available items, groups, and categories
  • Comprehensive documentation - Updated both English and Japanese README files with examples and usage instructions

Why This is Useful

  • Enables external tools to programmatically discover what items are available
  • Provides detailed item properties (animation support, color slots, pattern support, etc.)
  • Supports building dynamic UI for item selection in external applications
  • Chunked data retrieval avoids WebSocket size limitations

Usage Example

// Get all groups
{"type": "item", "command": "list-groups"}

// Get items in a category
{"type": "item", "command": "list-category", "groupId": 0, "categoryId": 1}

The implementation integrates seamlessly with the existing WebSocket command architecture and maintains backward compatibility.

- Implemented ItemCommandHandler class to handle various item commands such as listing groups, categories, and retrieving catalog data.
- Integrated item command handling into KKStudioSocketPlugin, allowing for processing of item commands received via WebSocket.
- Added ItemCommand class to represent item command structure with properties for command type, group ID, and category ID.
- Updated project files to include the new ItemCommandHandler class.
@great-majority great-majority self-assigned this Jun 27, 2025
@great-majority great-majority merged commit 73224e9 into main Jun 27, 2025
3 checks passed
@great-majority great-majority deleted the feat/item-command branch June 27, 2025 04:43
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.

1 participant