Closed DFurnes closed 9 years ago
We need a "flag" in the JSON response to indicate whether more than limit results exist.
limit
Example: http://lofischools.herokuapp.com/search?state=CT&query=c
{ "meta": { "code": 200, "more_results": true }, "results": [ { "city": "Hartford", "country": "US", "gsid": "0900002", "lat": "41.742813", "lon": "-72.70701", "name": "A. I. Prince Technical High School", /*...*/
Example #2: http://lofischools.herokuapp.com/search?state=CT&query=c&limit=50
{ "meta": { "code": 200, "more_results": false }, "results": [ { "ALL": "THE", "RESULTS": "YOU COULD WANT", "UP TO": 50, } /*...*/
If meta[more_results] is set to true, then the client knows it can request a higher limit. (A more robust solution would be to set up paging for results from the API, but that seems outside the scope of what we really need to have here.)
meta[more_results]
@DFurnes Try this:
https://mshmsh50001-5000.terminal.com/search?state=CT&query=c https://mshmsh50001-5000.terminal.com/search?state=CT&query=c&limit=50 https://mshmsh50001-5000.terminal.com/search?state=CT&query=c&limit=1600
Looks great! :+1:
We need a "flag" in the JSON response to indicate whether more than
limit
results exist.Example: http://lofischools.herokuapp.com/search?state=CT&query=c
Example #2: http://lofischools.herokuapp.com/search?state=CT&query=c&limit=50
If
meta[more_results]
is set to true, then the client knows it can request a higher limit. (A more robust solution would be to set up paging for results from the API, but that seems outside the scope of what we really need to have here.)