async function findGif(keywords) { const gifResp = await xhr.postAsync('https://rightgif.com/search/web', { form: { text: keywords } }); return JSON.parse(gifResp.body); }
function register (url) { return async function () { const serverId = await getServerId() try { await request.postAsync(url, { json: true, form: { id: serverId, os: { platform: os.platform(), release: os.release(), type: os.type(), arch: os.arch() }, node: process.version, version: await data.getVersion() } }) } catch (e) { // do nothing } } }