Restaurant explorer
Goal: Power a discovery list or map screen from three read calls: brand → locations → hours.Prep time: ~10 minutes
Off the shelf
The fastest path isFlynetDiscoveryClient from @flynetdev/core for the reads,
plus the discovery components from @flynetdev/react for the UI:
NearbyLocations, LocationCard, and
OpenHoursBadge. Discovery components are presentational — fetch
on the server with your API key and hand the result down as props, so the key
never reaches the browser.
app/explore.tsx
NearbyLocations sorts venues by distance and renders each as a LocationCard;
OpenHoursBadge computes “open now” from the weekly hours and the location’s
IANA time zone. The same client-side filtering caveat below still applies — the
components don’t change what the server returns.
From scratch
To see the three reads underneath, or work without React, call them directly. All three are Discovery routes: they take the API key, not an OAuth bearer.What you’ll use
GET /flynet/v1/restaurantswithX-API-KeyGET /flynet/v1/restaurants/{id}/locationswithX-API-KeyGET /flynet/v1/locations/{id}/open_hourswithX-API-Key
Code
Tasting note:
open_hours is not paginated: at most 7 entries, one per weekday. Missing days mean closed.Tasting note: Location objects also carry reservation-related fields describing whether and how a venue takes bookings. See the API reference for the per-field shapes; there’s no standalone reservation resource at launch.