Commit graph

532 commits

Author SHA1 Message Date
29cb276a2a weapons: add validate, create, download endpoints
Add weapon entity creation API following the established pattern from
characters and summons controllers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 03:04:15 -08:00
d70683ea1f character validator: skip CRL in dev 2025-12-01 02:41:21 -08:00
a27bdecde0 summons: add validate, create, download endpoints 2025-12-01 02:41:16 -08:00
deb5cfddb2 add character creation + image download API
- validate granblue_id via HEAD request to GBF CDN
- create characters with editor role check (role >= 7)
- async image download job with Redis status polling
- download_status endpoint for progress tracking
2025-12-01 00:48:40 -08:00
6e657b2518 add next.granblue.team to cors origins 2025-11-30 20:24:32 -08:00
5547c2b4b8 simplify redis config to use REDIS_URL only 2025-11-30 20:24:29 -08:00
8aedb36fac use DATABASE_URL for database configuration 2025-11-30 20:19:40 -08:00
916b72d58d fix grid_characters: don't overwrite resolved IDs in assign_raw_attributes 2025-11-30 20:17:07 -08:00
af202716a2 add related characters endpoint 2025-11-30 20:16:46 -08:00
be5be0c3fe fix blueprints: use correct association names instead of 'object' 2025-11-29 17:41:29 -08:00
144b5cab58 Return proper REST response for deleting a party for more endpoints 2025-09-22 02:51:50 -07:00
4eee998cea Return proper REST response for deleting a party 2025-09-22 00:50:30 -07:00
02d189e18a Update test suite for grid_ prefix on non-GET endpoints
- Update all POST endpoints in tests from /api/v1/{weapons,characters,summons} to /api/v1/grid_{weapons,characters,summons}
- Update custom action endpoints (update_uncap, resolve, update_quick_summon) to use grid_ prefix
- Fix routes configuration to use :create instead of :post in resources definition
- Add custom DELETE routes that accept ID in request body

All 44 grid controller tests now pass with the new endpoint naming convention.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 23:50:14 -07:00
f413471c94 Move endpoints to grid_ prefix 2025-09-19 23:38:50 -07:00
5c6865ce0d Add dates view to search endpoint responses 2025-09-19 23:38:06 -07:00
f0e44249b7 Use full view for individual resource show endpoints 2025-09-19 23:37:38 -07:00
7a1e2fc8f9 Update uncap level endpoints to use uncap view
- Change response view from :nested/:full to :uncap for update_uncap_level
- Add default value of 0 for transcendence_step when not provided
- Fix max_uncap_level method call in GridSummonsController
2025-09-19 23:36:43 -07:00
f66e4d5a48 Add transcendence_step to uncap view in grid blueprints 2025-09-19 23:36:24 -07:00
4e5bb350d1 Make transcendence_step optional in grid models
- Change transcendence_step validation from required to optional
- Allow nil values but maintain numeric validation when present
- Add nil check in GridCharacter transcendence validation
2025-09-19 23:36:04 -07:00
2860552c94 Fix total_pages calculation to respect X-Per-Page header
The total_pages method was using the hardcoded SEARCH_PER_PAGE constant
instead of the dynamic search_page_size value from the X-Per-Page header.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-17 05:59:41 -07:00
42c811c112 Make search parameter optional for search endpoints
Allow search endpoints to work without the 'search' key in the request body.
When no search key is provided, return an empty hash to show all items.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-17 05:54:40 -07:00
8225340eec Fix error handling for ActionController::ParameterMissing
The render_unprocessable_entity_response method was calling to_hash
on all exceptions, but ActionController::ParameterMissing doesn't
have that method. Updated to handle different exception types properly.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-17 05:51:58 -07:00
07e5488e0b Add custom page size support via X-Per-Page header
- Add page_size helper method to read from X-Per-Page header
- Set min (1) and max (100) bounds for page sizes
- Update all paginated endpoints to use dynamic page size
- Maintain backward compatibility with default sizes
2025-09-17 05:44:14 -07:00
819a61015f Add routes for drag-drop endpoints
- Position update routes for weapons, characters, summons
- Swap routes for all grid item types
- Batch grid update route
2025-09-16 03:36:10 -07:00
8c05cd838c Add batch grid update endpoint
- POST /parties/:id/grid_update for atomic multi-operations
- Support move, swap, and remove operations
- Validate all operations before executing
- Use transaction for atomicity
- Optional character sequence maintenance
2025-09-16 03:33:02 -07:00
311e8254d0 Add summon position update and swap endpoints
- PUT /parties/:party_id/grid_summons/:id/position
- POST /parties/:party_id/grid_summons/swap
- Restrict main and friend summon positions
- Validate sub/subaura slot transitions
2025-09-16 03:32:45 -07:00
5ed8a68ab6 Add character position update and swap endpoints
- PUT /parties/:party_id/grid_characters/:id/position
- POST /parties/:party_id/grid_characters/swap
- Auto-compact main slots to maintain sequential filling
- Handle main/extra slot transitions
2025-09-16 03:28:26 -07:00
197577d951 Add weapon position update and swap endpoints
- PUT /parties/:party_id/grid_weapons/:id/position
- POST /parties/:party_id/grid_weapons/swap
- Validate positions and handle mainhand/extra slots
- Use transactions for atomic swaps
2025-09-16 03:28:02 -07:00
7ab6355f17 Add error classes for drag-drop validation
- InvalidPositionError for out-of-bounds positions
- PositionOccupiedError for occupied slot conflicts
2025-09-16 03:27:19 -07:00
f7015d04dd Add UUID and granblue_id resolution support
- Create IdResolvable concern for flexible ID lookups
- Update character/summon/weapon controllers to use concern
- Support both UUID and granblue_id in API calls
2025-09-16 03:26:15 -07:00
b03d5e6618
Fix error in weapons (#199) 2025-03-30 21:08:04 -07:00
309a499446
Merge pull request #198 from jedmund/jedmund/202503-legfest
Adds items from the March 2025 Legend Festival/Event
2025-03-30 21:05:39 -07:00
832bf86d47 New items from March Legfest and Scenario Event 2025-03-31 00:02:25 -04:00
65a58d8b4c
Merge pull request #197 from jedmund/jedmund/20250327-new-items
Add new items from March 2025
2025-03-26 22:44:36 -07:00
92de40bbbf Add columns for Classic II and Collab Gacha 2025-03-27 01:37:53 -04:00
aaa046c01f Add new items 2025-03-27 01:37:42 -04:00
2f04a7d3a7
Add a data miner for downloading data from GBF (#196)
* First pass at dataminer service

* Got output printing from dataminer

* Fetches summons, characters and weapons

* Can loop over objects

* Finish dataminer

Adds logger and continuing downloads
2025-03-06 19:12:44 -08:00
7880ac76cc
Add data ingestion endpoints (#195)
* Update schema.rb

* Add endpoints for importing game data

This lets privileged users import canonical data for characters, weapons and summons directly from the game
2025-03-02 17:48:35 -08:00
28a6b1894e
Delete db/migrate/20250301143956_add_wiki_raw_to_characters.rb (#194) 2025-03-02 16:29:05 -08:00
3746ee9af6
Merge pull request #193 from jedmund/jedmund/wiki-fields
Implement columns for raw wiki/game data
2025-03-02 16:20:55 -08:00
cec6132823 Update wiki namespace in parsers 2025-03-02 16:19:13 -08:00
311c218863 Adds a task for fetching data from wiki
Can be used to fetch one object or multiple
2025-03-02 16:17:32 -08:00
c060a4525b Update migration
Now this adds raw data columns to weapons, summons, and characters
2025-03-02 16:08:35 -08:00
2b8dfe9e20 Merge branch 'main' into jedmund/wiki-fields 2025-03-01 07:32:17 -08:00
b1800f411f
Cleans up data on some Characters (#192)
This should update the `wiki_en` field for Kaguya, Fenie, and Uriel. It also adds `character_id` for 6 characters that were missing a value.
2025-03-01 07:31:49 -08:00
2de10d03f3 Fix path for Wiki object 2025-03-01 06:34:29 -08:00
a6ede6ecf7
Merge pull request #191 from jedmund/jedmund/parallelize-downloaders
Parallelize downloaders and update sizes
2025-03-01 05:46:08 -08:00
e75578bea3 Refactor download_all_images task
This refactor focuses on implementing parallelization. This allows us to pass in a number of threads and download concurrently. This makes downloading lots of images a lot faster.
2025-03-01 05:43:57 -08:00
ffbc8d0c1e Add support for passing in a Logger 2025-03-01 05:43:05 -08:00
0d997d6ad5 Add new image sizes
* Weapons can now download the “raw”image size, which is the weapon art without a background
* Characters now download the “detail” image size, which is a horizontal crop of the character’s art
* Summons now download the “detail” image size, which is a horizontal crop of the summon’s art
* Summons also download “ls” and “m” instead of “party_main” and “party_sub”, as they match the aspect ratio of weapon sizes better, which should make our lives a lot easier.
2025-03-01 05:42:40 -08:00