server.controllers package¶
Submodules¶
server.controllers.hosts_controller module¶
server.controllers.layers_controller module¶
- server.controllers.layers_controller.find_complaints_layer()¶
Retrieve Complaints Layer details
Returns details to diyplay Complaints Layer (amount per neighbourhood)
- Return type
- server.controllers.layers_controller.find_crime_layer()¶
Retrieve Crime Layer details
Returns details to diyplay Crime Layer (amount per neighbourhood)
- Return type
server.controllers.listings_controller module¶
- server.controllers.listings_controller.find_listing_by_id(listing_id)¶
Find Listing by ID
Returns a single Listing matching the given ID
- Parameters
listing_id (int) – ID of Listing to return
- Return type
- server.controllers.listings_controller.find_listings(listing_name=None, host_id=None, host_name=None, location=None, area=None, price_min=None, price_max=None, min_nights=None, availability=None, listings_per_host=None, room_type=None)¶
Retrieve NYC AirBnB listings
Returns a list of AirBnB Listings based on the provided filter criteria
- Parameters
listing_name (str) – Name to match Listings (can bei either exact match or not)
host_id (int) – Filter Listings based on hostId
host_name (str) – Name to match Hosts of Listings (can bei either exact match or not)
location (list of str) – Filter Listings by their location
area (list of str) – Filter Listings by their area
price_min (int) – Filter Listings by minimum price
price_max (int) – Filter Listings by maximum price
min_nights (int) – Filter Listings by minimum nights
availability (int) – Filter Listings by their availability
listings_per_host (int) – Filter Listings by the number of Listings per Host
room_type (list of str) – Filter Listings by room type
- Return type
List[Listing]
- server.controllers.listings_controller.find_reviews_for_listing(listing_id)¶
Find Reviews for a given Listing
Returns all Reviews for a single Listing matching the given ID
- Parameters
listing_id (int) – ID of Listing to return Reviews
- Return type
List[Review]
- server.controllers.listings_controller.get_metadata()¶
Get metadata about all listings
Returns basic statistics over all listings like min, max prices etc. :return: Object[ListingsMetadata]
server.controllers.recommendations_controller module¶
- server.controllers.recommendations_controller.recommend_listings(listing_id=None, host_id=None, listing_name=None, host_name=None, location=None, area=None, price_min=None, price_max=None, min_nights=None, availability=None, listings_per_host=None, room_type=None)¶
Recommend AirBnBs based on provided filter criteria
Returns a list of recommended Listings based on a provided Listing and taking filter criteria into account
- Parameters
listing_id (int) – target Listing ID
host_id (int) – host ID
listing_name (str) – Name to match Listings (can bei either exact match or not)
host_name (str) – Name to match Hosts of Listings (can bei either exact match or not)
location (list of str) – Filter Listings by their location
area (list of str) – Filter Listings by their area
price_min (int) – Filter Listings by minimum price
price_max (int) – Filter Listings by maximum price
min_nights (int) – Filter Listings by minimum nights
availability (int) – Filter Listings by their availability
listings_per_host (int) – Filter Listings by the number of Listings per Host
room_type (list of str) – Filter Listings by room type
- Return type
List[Listing]