0

I'm using the API from https://www.boardgameatlas.com/. I'm fetching the URL given in their example (https://www.boardgameatlas.com/api/docs/search). I was wondering if there's a smart way to use objects to represent each filter parameter instead of using hardcoded strings.

My code:

REQUEST_URL = `https://api.boardgameatlas.com/api/search?name=Catan&client_id={CLIENT_ID}`
fetch(URL)

What I want (similar):

fetch(boardGames(CLIENT_ID).search().name('Catan'))
João Nunes
  • 11
  • 1
  • 4

0 Answers0