JakenHerman / mlb-the-show-community-market-listings

List out community market current prices for MLB The Show 19
0 stars 3 forks source link

Add Type Parameter filter for API call #2

Open JakenHerman opened 5 years ago

JakenHerman commented 5 years ago

By default, the app calls /apis/listings.json, but I'd like to add functionality to give the user the option to only look for Stadiums or MLB Cards or any other available type. To modify the call to include the type, the call will look like this:

GET /apis/listings.json?type=Stadium

Available type values:

gjohn34 commented 5 years ago

I can do this.

At the moment you are just calling getListings without any args, did you have an idea of how you want to forward the data (obj, array, string) and is type the only query param that will be passed?

JakenHerman commented 5 years ago

I'll leave the "how" up to you - I have no preference. As for type being the only query - yes, I'd like to add pages later, but not right now. Just type.

gjohn34 commented 5 years ago

pr #5 up.