Пример #1
0
def search():
    conditions = request.json['payload']['conditions']

    params = build_params(conditions, "&$where=")
    records = query_external_datasource(params)

    response = marshal(records, type_ids['complaint'], False)
    return response
Пример #2
0
def seeded_search():
    """
    Defines the /test-search-service endpoint which acquires the
    test-search-service data (entities and links based on conditions)
    """
    print(request.json['payload']['seeds'])

    # TODO: Extract seeded information and use it to search

    return query_external_datasource()
Пример #3
0
def search():
    """
    Defines the /test-search-service endpoint which acquires the
    test-search-service data (entities and links based on conditions)
    """
    print(request.json)

    # TODO: Extract request conditions and use in request to Socrata.
    # Pass conditions into your function.

    return query_external_datasource()
Пример #4
0
def all():
    """
    Defines the /test-service endpoint which acquires the
    test-service data (entities and links)
    """
    return query_external_datasource()
Пример #5
0
def all():
    records = query_external_datasource()
    response = marshal(records)
    return response