bgrnwd / fotmob

:soccer: An unofficial JavaScript/TypeScript client for the FotMob API
MIT License
137 stars 18 forks source link

new: type inference, upgrading to ESmodule and cleaning up #434

Closed ItamarShDev closed 9 months ago

ItamarShDev commented 10 months ago

Description

In this PR, I have made the following changes:

  1. Upgraded the ts file to ES6 and target to node.
  2. The API will return JSON and throw an error on failure, to be compatible with best practices.
  3. Added type inference for the api calls. if the conversion fails - the api returns a JSON object
  4. cleaned up the code to handle errors easier

    Checklist

Additional Comments

Anything else you'd like to add.

bgrnwd commented 9 months ago

@ItamarShDev Thanks for the PR, give me a couple days to look it over.

ItamarShDev commented 9 months ago

@ItamarShDev Thanks for the PR, give me a couple days to look it over.

Thanks!

ItamarShDev commented 9 months ago

Thanks for the contribution! I'll get this merged in and a new release out there shortly

Thanks! patiently waiting for the version :)

bgrnwd commented 9 months ago

It should be out there now!