Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def saved_search(search_id, sort, pretty, limit):
'''Execute a saved search'''
sid = read(search_id)
cl = clientv1()
page_size = min(limit, MAX_PAGE_SIZE)
echo_json_response(call_and_wrap(
cl.saved_search, sid, page_size=page_size, sort=sort
), limit=limit, pretty=pretty)
def search_mosaics(name, bbox, rbox, limit, pretty):
'''Get quad IDs and information for a mosaic'''
bbox = bbox or rbox
cl = clientv1()
mosaic, = cl.get_mosaic_by_name(name).items_iter(1)
response = call_and_wrap(cl.get_quads, mosaic, bbox)
echo_json_response(response, pretty, limit)
def get_collection_info(subscription_id, pretty):
'''Get metadata for specific collection.'''
cl = clientv1()
sub_info = cl.get_collection_info(subscription_id)
echo_json_response(sub_info, pretty)
def cancel_order(order_id, pretty):
'''Cancel a running order by given order ID'''
cl = clientv1()
echo_json_response(call_and_wrap(cl.cancel_order, order_id), pretty)
def list_feeds(pretty, limit, stats):
'''List all subscriptions user has access to.'''
cl = clientv1()
response = cl.list_analytic_feeds(stats)
echo_json_response(response, pretty, limit)
def create_search(pretty, **kw):
'''Create a saved search'''
req = search_req_from_opts(**kw)
cl = clientv1()
echo_json_response(call_and_wrap(cl.create_search, req), pretty)
def get_order(order_id, pretty):
'''Get order request for a given order ID'''
cl = clientv1()
echo_json_response(call_and_wrap(cl.get_individual_order, order_id),
pretty)
def stats(pretty, **kw):
'''Get search stats'''
req = search_req_from_opts(**kw)
cl = clientv1()
echo_json_response(call_and_wrap(cl.stats, req), pretty)
def conformance(pretty):
'''
Details about WFS3 conformance.
:param pretty:
:return:
'''
cl = clientv1()
response = cl.wfs_conformance()
echo_json_response(response, pretty)
def mosaic_info(name, pretty):
'''Get information for a specific mosaic'''
cl = clientv1()
echo_json_response(call_and_wrap(cl.get_mosaic_by_name, name), pretty)