fantasydata / fantasydata-api-node

FantasyData API client library wrapper for Node
MIT License
23 stars 8 forks source link

Does this library have TypeScript typings available? #5

Open kegbuna opened 3 years ago

keithlayne commented 3 years ago

@kegbuna If you haven't implemented anything yet, I wouldn't use this lib. I maintain my own types, which I can't share, and it's not great. But they wouldn't probably be that useful anyway since this API pretty much exclusively returns Promise<string> from its endpoints.

IMO you'd be much better served to take the openapi/swagger definition and generate your own client that generates types as well and fits your needs. The only concern there is that I know the openapi definition hasn't always matched the actual API. I think they had an issue with generation or publishing with that, no clue if it's fixed.

kegbuna commented 3 years ago

Thanks for that quick response, Keith! This makes sense and luckily I haven't implemented anything just yet. I hadn't thought about the possibility of generating a client from Swagger. Do you think this api would be the best bet for a hobby project Discord bot that would be used for my fantasy football league? I haven't looked into pricing yet.

keithlayne commented 3 years ago

There is a free tier, but I don't know what it contains exactly. I use it at work, and I have no clue if you can do what you want cheaply. I'd definitely look around, especially if you can find something like a hobby plan through some provider.

Lioness100 commented 3 years ago

Hey @kegbuna! I'm in the exact same place as you (using typescript for a hobby project Discord bot). Might I ask what you ended up doing?