feat: update runkit schema #24

pull/89/head
Amio 2018-08-07 20:33:24 +08:00
rodzic af18f4da96
commit 6cdee9b71a
1 zmienionych plików z 10 dodań i 2 usunięć

Wyświetl plik

@ -1,7 +1,15 @@
const axios = require('../axios.js')
module.exports = async function (account, notebook, ...args) {
const endpoint = `https://runkit.io/${account}/${notebook}/branches/master?args=${args.join('/')}`
/**
* EXAMPLES
*
* /runkit/satisfaction-flq08o9mm3ka/102909/employee
* /runkit/satisfaction-flq08o9mm3ka/102909/people
* /runkit/satisfaction-flq08o9mm3ka/102909/topic
*/
module.exports = async function (endpointId, ...args) {
const endpoint = `https://${endpointId}.runkit.sh/${args.join('/')}`
const { subject, status, color } = await axios(endpoint).then(res => res.data)
if (subject && status) {