Skip to main content

Module thumbnails

Module thumbnails 

Source
Expand description

Revision thumbnails over HTTP. The rules are in crate::thumbnail.

  • PUT /api/parts/:id/revisions/:rev/thumbnail?content_hash=&renderer= with the PNG as the body: { ok, thumbnail }. 409 when the revision’s document is no longer the one pictured.
  • GET /api/parts/:id/revisions/:rev/thumbnail and GET /api/parts/:id/thumbnail (the newest revision’s that is current): the PNG, or 204 when there is none or it is stale; 404 for an unknown part or revision. The ETag is the blob’s hash, and If-None-Match answers 304. Asked with ?v=<that hash> — the URL the listings hand out — the answer may be cached for good; without it, revalidated.

Structs§

GetQuery
PutQuery

Functions§

get_part
A part’s thumbnail: its newest revision’s that is current.
get_revision
One revision’s thumbnail.
put
Keep a revision’s thumbnail.