MCPcopy Create free account
hub / github.com/internetarchive/openlibrary / GET

Method GET

openlibrary/plugins/openlibrary/code.py:733–745  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

731 encoding = "marcxml"
732
733 def GET(self, key):
734 page = web.ctx.site.get(key)
735 if page is None or page.type.key != "/type/edition":
736 raise web.notfound("")
737 else:
738 from infogami.utils import template
739
740 try:
741 result = template.typetemplate("marcxml")(page)
742 except:
743 raise web.notfound("")
744 else:
745 return delegate.RawText(result, content_type="application/marcxml+xml; charset=utf-8")
746
747
748delegate.media_types["text/x-yaml"] = "yml"

Callers

nothing calls this directly

Calls 2

notfoundMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected