def set_wrapped(self, url, wrapped): from r2.lib.pages.things import wrap_things if not isinstance(wrapped, Wrapped): wrapped = wrap_things(wrapped)[0] self.data[url] = wrapped.render_nocache('api').finalize()
def GET_my_multis(self): """Fetch a list of multis belonging to the current user.""" multis = LabeledMulti.by_owner(c.user) wrapped = wrap_things(*multis) resp = [w.render() for w in wrapped] return self.api_wrapper(resp)
def _format_multi(self, multi): resp = wrap_things(multi)[0].render() return self.api_wrapper(resp)