musement / api-documentation

Musement API documentation
https://api-docs.musement.com/
3 stars 7 forks source link

sorting does not work #15

Closed phil-newman closed 8 years ago

phil-newman commented 8 years ago

Try to sort the results using different properties but results are always the same:

https://developers.musement.com/api/v3/cities/1/events.json?vertical=3&sorting=popularity
https://developers.musement.com/api/v3/cities/1/events.json?vertical=3&sorting=price
https://developers.musement.com/api/v3/cities/1/events.json?vertical=3&sorting=rating
hpatoio commented 8 years ago

Ciao. We are working on this. I'll ping you when is ready.

PS: If you can do not call the endpoint using the extension .json or .xml but use the Accept header.

phil-newman commented 8 years ago

PS: If you can do not call the endpoint using the extension .json or .xml but use the Accept header.

Where is this documented? Looking at http://developers.musement.com/documentation suggests that you can specify the response type using an extension, header or querystring param. Which of these is true and what is the order of precedence?

image

hpatoio commented 8 years ago

Where is this documented? Looking at http://developers.musement.com/documentation suggests that you can specify the response type using an extension, header or querystring param. Which of these is true and what is the order of precedence?

Ciao. You are right. This is not written explicitly in our doc but use Accept header to tell the server which format you want in the response is a best practice for RESTful web service.

The file format and the parameter are easier methods for non smart clients.

hpatoio commented 8 years ago

Should be ok now

https://developers.musement.com/api/v3/cities/1/events.json?sort_by=relevance
https://developers.musement.com/api/v3/cities/1/events.json?sort_by=rating
https://developers.musement.com/api/v3/cities/1/events.json?sort_by=price

Please note that the parameter is called sort_by and not sorting