Add Template From Url
Use a picture on the web as a background, by its address, as the
composer’s box does: named after the file, with two captions
(TOP_BOTTOM). Left out of the library unless curate is true
(a key’s, or the session of an app admin of Memegen), so anybody but
a Viewer of Memegen may add one for the meme they are making. A new one is 201. The same address again is
the template already there, 200, promoted into the library if
curate asks; if an app admin archived it, a key or an app admin’s session
gets it back in the picker, and anybody else is refused with
403 admin_required and it stays archived. A key’s is credited to
the key’s maker.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
The picture’s web address, http or https; https:// is assumed
when there is no scheme. Any other scheme (javascript:, data:)
is 422.
true adds it to the library everyone picks from, which only a key
or the session of an app admin of Memegen may do (403 admin_required otherwise). Left out or false, it is a background
for one meme, which anybody but a Viewer of Memegen may add, and
stays out of the picker.
Response
Out of the picker. Memes already made from it keep rendering, which
is why a template is archived rather than deleted, but no new meme
can be made from it. Only an app admin of Memegen, or a key, brings one back:
archived: false on PATCH, or adding its picture again with
POST /meme-templates, /meme-templates/from-url or
/meme-templates/import, which restores it. Anybody else who adds
the same picture again is refused (“An admin removed this
template.”) and it stays archived.
The background, an http or https address. Absent on a built-in, which the app draws itself.