The service exposes two endpoints for requesting data:
GET /rentals/{id}
- get rental by id
GET /rentals
- list filtered rentals
ids
- list of integers representing rental idsprice_min
- integer value to filter for minimum priceprice_max
- integer value to filter for maximum pricenear
- 2 float values representing a locationsort
- string value representing a field to order results bylimit
- integer value to specify a pagination limitoffset
- integer value to specify a pagination offset
rentals?ids=3,4,5
rentals?price_min=9000&price_max=75000
rentals?limit=3&offset=6
rentals?near=33.64,-117.93
rentals?sort=price
rentals?near=33.64,-117.93&price_min=9000&price_max=75000&limit=3&offset=6&sort=price
go install github.com/moq/moq@latest
make init
make generate
make test
make init
make db-up
make server-start
make db-down
make volumes-down