reopenWidget with AJAX call

Depends what you are trying to do I suppose but why not use the official Discord Ruby API to get the data into the Discourse db, serialize it to the client and then use it in the widget?