imacrayon / eventsinwichita

Just Events in Wichita, nothing else.
https://eventsinwichita.com
MIT License
11 stars 6 forks source link

Provide a JSON API endpoint for events #28

Closed imacrayon closed 4 years ago

imacrayon commented 4 years ago

The endpoint URL can be something simple like /api/events. You should be able to filter by the same query string filters available on the homepage.

The controller for this endpoint can go here: app/Http/Controllers/Api/EventController.php

lacasera commented 4 years ago

@imacrayon do you mean something like this? api/events?after=2019-11-11 00:00:00&before=2019-10-18 00:00:0

also should the endpoint be versioned?

lacasera commented 4 years ago

also should the event come from the local db or an external source

imacrayon commented 4 years ago

@lacasera yes, that example URL looks correct. The JSON info would come from the local database. The code will probably be similar to the index method in the existing EventController except that it should return a JSON response instead of an Inertia view

lacasera commented 4 years ago

pr to fix #28