コード例 #1
0
def get_all_areas():
    """
    Returns a list of dictionaries representing all the rows in the
    area table.
    """
    return request_or_fail("/area")
コード例 #2
0
def get_measurements_for_location(location_id):
    """
    Return a list of dictionaries giving the measurement rows for the given location.
    """
    return request_or_fail("/location/" + str(location_id) + "/measurement")
コード例 #3
0
def get_categories_for_area(area_id):
    """
    Return a list of rows from the category table that all contain the given area.
    """
    return request_or_fail("/area/" + str(area_id) + "/category")
コード例 #4
0
def number_of_locations_by_area(area_id):
    """
    Returns the number of locations for the given area.
    """
    return request_or_fail("/area/" + str(area_id) + "/number_locations")
コード例 #5
0
def get_locations_for_area(area_id):
    """
    Return a list of dictionaries giving the locations for the given area.
    """
    return request_or_fail("/area/" + str(area_id) + "/location")
コード例 #6
0
def number_of_locations_by_area(area_id):
    """
    Returns the number of locations for the given area.
    """
    return request_or_fail("/area/" + str(area_id) + "/number_locations")
コード例 #7
0
def get_average_measurements_for_area(area_id):
    """
    Returns the average value of all measurements for all locations in the given area.
    Returns None if there are no measurements.
    """
    return request_or_fail("/area/" + str(area_id) + "/average_measurement")
コード例 #8
0
def get_average_measurements_for_area(area_id):
    """
    Returns the average value of all measurements for all locations in the given area.
    Returns None if there are no measurements.
    """
    return request_or_fail("/area/" + str(area_id) + "/average_measurement")
コード例 #9
0
def get_all_areas():
    """
    Returns a list of dictionaries representing all the rows in the
    area table.
    """
    return request_or_fail("/area")
コード例 #10
0
def get_categories_for_area(area_id):
    """
    Return a list of rows from the category table that all contain the given area.
    """
    return request_or_fail("/area/" + str(area_id) + "/category")
コード例 #11
0
def get_measurements_for_location(location_id):
    """
    Return a list of dictionaries giving the measurement rows for the given location.
    """
    return request_or_fail("/location/" + str(location_id) + "/measurement")
コード例 #12
0
def get_locations_for_area(area_id):
    """
    Return a list of dictionaries giving the locations for the given area.
    """
    return request_or_fail("/area/" + str(area_id) + "/location")