Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

202
Views
Best approach to remove hardcoded URL strings from using an API that uses filter parameters

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'))
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!