Exemple #1
0
def get_publication_biblio_endpoint():
    request_biblio = {}
    for (k, v) in request.args.iteritems():
        request_biblio[k] = v
    my_collection = product.run_collection_from_biblio(g.use_cache,
                                                       **request_biblio)
    return jsonify({"results": my_collection.to_dict()})
Exemple #2
0
def get_doi_redirect_endpoint(doi):
    if not doi or not doi.startswith("10."):
        return index_endpoint()  # serve the angular app

    request_biblio = {"doi": doi}
    my_collection = product.run_collection_from_biblio(g.use_cache, **request_biblio)
    my_product = my_collection.products[0]
    return redirect(my_product.best_redirect_url, 302)  # 302 is temporary redirect
Exemple #3
0
def guts(biblio):
    use_cache = False
    my_collection = product.run_collection_from_biblio(use_cache, **biblio)
    my_product = my_collection.products[0]
    return my_product
Exemple #4
0
def get_publication_doi_endpoint(doi):
    request_biblio = {"doi": doi}
    my_collection = product.run_collection_from_biblio(g.use_cache,
                                                       **request_biblio)
    return jsonify({"results": my_collection.to_dict()})