boxing / boxing/boxrec

What's the recommended way to use this with the frontend?

Open
#243 3 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue help wanted
Dominant language
TypeScript
Stars
117
Forks
17
PR merge metrics
No merged PRs in 30d

Description

Hi, I've read through your examples and a few issues on here, to try and work out what the best way to use this API is, but it seems that maybe I missunderstand its usecase.

Specifically, as per issue https://github.com/boxing/boxrec/issues/65 I was hoping to get a JSON object passed to my frontend via a fetch call, so that I could update my client page with boxer data.

According in the answer in that post, the feature of a JSON object being available on a boxrec.getPersonById call has been disabled, is that right?

Instead we have to use getters `boxer.name` for each piece of data.

Wouldn't this mean I would have to build my own JSON object in the backend before sending it to the front end? Or I would be in danger of making many requests to the API which wouldn't be efficient.

Do you have suggestions for minimal code to send through boxers data from an express node backend to a simple html(template) and js frontend based on some AJAX call?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.