internetarchive / iiif

The official Internet Archive IIIF service
GNU General Public License v3.0
21 stars 4 forks source link

moving labs API iiif catalog to prod service #67

Open mekarpeles opened 3 months ago

mekarpeles commented 3 months ago

This PR has been hacked together as a proof of concept and not tested but should be useful in closing:

glenrobson commented 3 months ago

The two times we use the getids method is:

@app.route('/iiif/')
def index():
    """Lists all available book and image items on Archive.org"""
    cursor = request.args.get('cursor', '')
    q = request.args.get('q', '')
    return jsonify(getids(q, cursor=cursor))

@app.route('/iiif/collection.json')
def catalog():
    cursor = request.args.get('cursor', '')
    q = request.args.get('q', '')
    domain = purify_domain(request.args.get('domain', request.url_root))
    return ldjsonify(collection(domain, getids(q, limit, cursor)['ids']))
glenrobson commented 3 months ago

Live URLs 500:

https://iiif.archive.org/iiif/collection.json https://iiif.archive.org/iiif/

glenrobson commented 3 months ago

Archivelab:

https://iiif.archivelab.org/iiif/

This doesn't work: https://iiif.archivelab.org/iiif/collection.json

glenrobson commented 3 months ago

Need to point this to the spring-2024 branch and get the fix deployed for testing.

mekarpeles commented 2 months ago

https://iiif.archive.org/iiif/ and https://iiif.archivelab.org/iiif/ both work for me, this may have been an ephemeral issue.

https://iiif.archivelab.org/iiif/collection.json definitely seems broken and needs investigation