How do I GET data by using the "cost-per-night" url? ID works fine, but that's the only thing that does.
www.example.com/app/default/api/patterns gives me this:
/room_owner[room_owner]
/room-owner/id/{room_owner.id}
/room-owner/id/{room_owner.id}/:field
/room-owner/cost-per-night/{room_owner.cost_per_night.ge}/{room_owner.cost_per_night.lt}
/room-owner/cost-per-night/{room_owner.cost_per_night.ge}/{room_owner.cost_per_night.lt}/:field
Desired result -
www.example.com/app/default/api/room_owner
Desired result -
www.example.com/app/default/api/room-owner/id/1.json
NOT Desired -
www.example.com/app/default/api/room-owner/cost-per-night/25.json
How do I make the last query work?
/room-owner/cost-per-night/{room_owner.cost_per_night.ge}/{room_owner.cost_per_night.lt}
/room-owner/cost-per-night/{room_owner.cost_per_night.ge}/{room_owner.cost_per_night.lt}/:field
/room-owner/cost-per-night/{room_owner.cost_per_night.eq}
Thanks for replying. So what you're saying is that the auto generated value for cost_per_night is trying to get me to put in two integers and that the resulting json will be a range withing those two? For example: the link you posted would give me all of the values between 25 and 30?
Hey Anthony,Thanks for replying. So what you're saying is that the auto generated value for cost_per_night is trying to get me to put in two integers and that the resulting json will be a range withing those two? For example: the link you posted would give me all of the values between 25 and 30?