whatadewitt / yahoo-fantasy-sports-api

NodeJS wrapper for the Yahoo! Fantasy Sports API
https://yahoo-fantasy-node-docs.vercel.app/
MIT License
192 stars 52 forks source link

Request: include REST query in the demo #25

Closed philip closed 6 years ago

philip commented 7 years ago

Please print the REST query in the demo's output under "How To Use" so we can generate the output ourselves (without the app). Currently it only displays yfsapi code.

For example: http://yfantasysandbox.herokuapp.com/resource/league/scoreboard

Granted the above does refer to this: http://fantasysports.yahooapis.com/fantasy/v2/league/{league_key}/{sub_resource}

This is a feature request to include attributes we enter, which is "league_key" and optionally "week" on that page. This way we can test the executed REST query ourselves.

philip commented 7 years ago

Sorry for not looking at the code before posting this confusing request.

tl;dr version: consider printing "url" somewhere on each page, perhaps under "How To Use".

whatadewitt commented 7 years ago

You mean on my fantasy sandbox app? Where in particular? In the writeups at the top of most pages I have a note that says

"maps to http://fantasysports.yahooapis.com/fantasy/v2/team/{team_key}/{sub_resource}"

... although those should probably be listed as HTTPS now...

philip commented 7 years ago

Ah yes, sorry for mixing up the sandbox and library. But while we're here, I'm referring to the executed query, such as:

http://fantasysports.yahooapis.com/fantasy/v2/league/123.l.4567/scoreboard;week=15?format=json

My use case is to use your sandbox to generate (and figure out) URLs for my own code, although perhaps folks will also be curious what the executed REST query looks like.

Consider adding that directly under "Sample Output" right above the JSON, or elsewhere.

whatadewitt commented 7 years ago

Hi @philip, while I can appreciate that you want to see the URLs for yourself, they're pretty easy to figure out if you just take a look at the code. Adding in the extra information is not really needed, as that's why I've built this tool, to allow users to simply implement it much easier than Yahoo! makes it.