def handle_resource(resource_type): if resource_type == 'metadata': return redirect("/static/doc/metadata") if resource_type in [ 'callsets', 'variantsets', 'readgroupsets', 'referencesets', 'variant' ]: if request.method == 'GET': return ga4gh.api.ga_handle_search(request, resource_type) elif resource_type in [ 'variantset', 'genomes', 'files', 'runs', 'genomes' ]: if request.method == 'GET': return basespace.api.bs_handle_search(request, resource_type) elif resource_type in RESOURCES: if request.method == 'GET': return ttam.api.ttam_handle_search(request, resource_type) else: return fhir_error.inform_not_found() g.api_base = request.api_base = util.get_api_base() fhir_request = fhir_api.FHIRRequest(request) if request.method == 'GET': return fhir_api.handle_search(fhir_request, resource_type) else: return fhir_api.handle_create(fhir_request, resource_type)
def handle_resource(resource_type): if resource_type not in RESOURCES: return fhir_error.inform_not_found() g.api_base = request.api_base = util.get_api_base() fhir_request = fhir_api.FHIRRequest(request) if request.method == 'GET': return fhir_api.handle_search(fhir_request, resource_type) else: return fhir_api.handle_create(fhir_request, resource_type)
def handle_resource(resource_type): if resource_type not in RESOURCES: return fhir_error.inform_not_found() g.api_base = request.api_base = util.get_api_base() fhir_request = fhir_api.FHIRRequest(request) if request.method == "GET": return fhir_api.handle_search(fhir_request, resource_type) else: return fhir_api.handle_create(fhir_request, resource_type)
def handle_resource(resource_type): if resource_type in ['callsets', 'variantsets', 'readgroupsets', 'referencesets', 'variant']: if request.method == 'GET': return ga4gh.api.ga_handle_search(request, resource_type) if resource_type not in RESOURCES: return fhir_error.inform_not_found() g.api_base = request.api_base = util.get_api_base() fhir_request = fhir_api.FHIRRequest(request) if request.method == 'GET': return fhir_api.handle_search(fhir_request, resource_type) else: return fhir_api.handle_create(fhir_request, resource_type)
def handle_resource(resource_type): if resource_type in [ 'callsets', 'variantsets', 'readgroupsets', 'referencesets', 'variant' ]: if request.method == 'GET': return ga4gh.api.ga_handle_search(request, resource_type) if resource_type not in RESOURCES: return fhir_error.inform_not_found() g.api_base = request.api_base = util.get_api_base() fhir_request = fhir_api.FHIRRequest(request) if request.method == 'GET': return fhir_api.handle_search(fhir_request, resource_type) else: return fhir_api.handle_create(fhir_request, resource_type)
def handle_resource(resource_type): if resource_type == 'metadata': return redirect("/static/doc/metadata") if resource_type in ['callsets', 'variantsets', 'readgroupsets', 'referencesets', 'variant']: if request.method == 'GET': return ga4gh.api.ga_handle_search(request, resource_type) elif resource_type in ['variantset', 'genomes', 'files', 'runs', 'genomes']: if request.method == 'GET': return basespace.api.bs_handle_search(request, resource_type) elif resource_type in RESOURCES: if request.method == 'GET': return ttam.api.ttam_handle_search(request, resource_type) else: return fhir_error.inform_not_found() g.api_base = request.api_base = util.get_api_base() fhir_request = fhir_api.FHIRRequest(request) if request.method == 'GET': return fhir_api.handle_search(fhir_request, resource_type) else: return fhir_api.handle_create(fhir_request, resource_type)