Skip to content

Add venue_name filter to Events API v1 - #781

Open
oliviasculley wants to merge 9 commits into
hackgvl:developfrom
oliviasculley:feat/api-filter-venue-name
Open

oliviasculley wants to merge 9 commits into
hackgvl:developfrom
oliviasculley:feat/api-filter-venue-name

Conversation

@oliviasculley

Copy link
Copy Markdown
Member

Summary

Adds a venue_name query parameter to GET /api/v1/events so consumers can filter events by location name.

This is a partial, case-insensitive match that also ignores spaces, covering the SynergyMill / Open Works use case from #780. For example, venue_name=openworks matches a venue named Open Works.

v0 is unchanged; that version is legacy and does not take new filters.

Usage

curl "https://hackgreenville.com/api/v1/events?venue_name=synergy"
curl "https://hackgreenville.com/api/v1/events?venue_name=openworks"

The parameter is documented in /docs/api alongside the existing venue_city and venue_state filters.

Test plan

  • php artisan test app-modules/api/tests/Feature/EventApiV1Test.php
  • Pint
  • Regenerated Scribe docs
  • Confirm CI unit tests pass against MySQL
  • In /docs/api, confirm venue_name appears on the v1 events endpoint and Try it out filters as expected

Closes #780

@allella allella left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I posted the venue data in the #hg-labs and added a comment that we might consider using a venue slug that's generated once on input so we're not doing and O(n) real-time conversion on every row in the venue table to find lower case.

If we get to normalizing the venues on input, that slug could be a cleaner way for people like Jen to query than a venue id or title.

If we had a venue slug, then we could also run the normalized user input through the whereLikeContains() macro that's part of the pending maps API pull request to sanitize.

Comment thread app-modules/api/src/Http/Controllers/EventApiV1Controller.php
Comment thread app/Models/Venue.php Outdated
Comment thread app-modules/api/tests/Feature/EventApiV1Test.php
Comment thread tests/Unit/Models/VenueTest.php Outdated
oliviasculley and others added 5 commits October 4, 2026 01:32
Allow GET /api/v1/events to filter by venue name with a partial,
case-insensitive match that ignores spaces so queries like
"openworks" match venues named "Open Works".

Closes hackgvl#780
Store a venue slug (editable in Filament, auto-generated from the name)
and expose it on GET /api/v1/events so consumers can filter with
venue_slug instead of converting names at query time.
@oliviasculley
oliviasculley force-pushed the feat/api-filter-venue-name branch from 6693454 to 5cba5e5 Compare October 4, 2026 01:32
Stop creating a new venue whenever the address or coordinates drift, and stop overwriting a custom slug on import.
Comment thread database/migrations/2026_09_14_000000_backfill_venue_slugs.php Outdated
oliviasculley and others added 2 commits October 13, 2026 08:47
The backfill now uses the same helper as the importer and the Filament form, so blank and messy slugs stay consistent.
Keep the dynamic Scribe base URL from develop and the venue_slug
example on the v1 events curl sample.
@allella

allella commented Oct 14, 2026

Copy link
Copy Markdown
Member

I think we can merge this and test on stage. Thanks.

This branch has not been deployed

No deployments
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.

API: Add the ability to filter on venue_name

3 participants