Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Alexa、APKを配布して

 Alexa、APKを配布して

Ryosuke Horie

February 22, 2018
Tweet

More Decks by Ryosuke Horie

Other Decks in Programming

Transcript

  1. © 2018 VASILY,Inc. ࣗݾ঺հ w !)PSJF w 7"4*-: *OD w

    "OESPJEΤϯδχΞ w ϏʔϧɺࣗಈԽ޷͖
  2. © 2018 VASILY,Inc. ᶄ-BNCEBͰ#JUSJTFͷϏϧυΛτϦΨʔ export const bitriseSkill = (event: Alexa.RequestBody<any>,

    context: Alexa.Context) => { const alexa = Alexa.handler(event, context) alexa.registerHandlers({ 'DistributeApk': function () { request({ method:'post', url: `https://www.bitrise.io/app/${appSlug}/build/start.json`, headers: {"Content-Type": "application/json; charset=utf-8"}, json: true, body: { 'hook_info': { 'type': 'bitrise', 'api_token': apiToken }, 'build_params': { 'branch': 'master', 'workflow_id': 'deploy', 'commit_message': 'triggered from alexa' } } }, (error, response, body) => { let workflowId = body.triggered_workflow this.emit(':tell', `ϫʔΫϑϩʔΞΠσΟʔ${workflowId}ͰɺϏοτϥΠζͰͷϏϧυΛ։࢝͠·ͨ͠ɻϏϧυ͕׬ྃޙɺΤʔϐʔέʔΛ഑෍͠·͢ɻ`) }) } }) alexa.execute() }
  3. © 2018 VASILY,Inc. ᶄ-BNCEBͰ#JUSJTFͷϏϧυΛτϦΨʔ export const bitriseSkill = (event: Alexa.RequestBody<any>,

    context: Alexa.Context) => { const alexa = Alexa.handler(event, context) alexa.registerHandlers({ 'DistributeApk': function () { request({ method:'post', url: `https://www.bitrise.io/app/${appSlug}/build/start.json`, headers: {"Content-Type": "application/json; charset=utf-8"}, json: true, body: { 'hook_info': { 'type': 'bitrise', 'api_token': apiToken }, 'build_params': { 'branch': 'master', 'workflow_id': 'deploy', 'commit_message': 'triggered from alexa' } } }, (error, response, body) => { let workflowId = body.triggered_workflow this.emit(':tell', `ϫʔΫϑϩʔΞΠσΟʔ${workflowId}ͰɺϏοτϥΠζͰͷϏϧυΛ։࢝͠·ͨ͠ɻϏϧυ͕׬ྃޙɺΤʔϐʔέʔΛ഑෍͠·͢ɻ`) }) } }) alexa.execute() }
  4. © 2018 VASILY,Inc. ᶄ-BNCEBͰ#JUSJTFͷϏϧυΛτϦΨʔ export const bitriseSkill = (event: Alexa.RequestBody<any>,

    context: Alexa.Context) => { const alexa = Alexa.handler(event, context) alexa.registerHandlers({ 'DistributeApk': function () { request({ method:'post', url: `https://www.bitrise.io/app/${appSlug}/build/start.json`, headers: {"Content-Type": "application/json; charset=utf-8"}, json: true, body: { 'hook_info': { 'type': 'bitrise', 'api_token': apiToken }, 'build_params': { 'branch': 'master', 'workflow_id': 'deploy', 'commit_message': 'triggered from alexa' } } }, (error, response, body) => { let workflowId = body.triggered_workflow this.emit(':tell', `ϫʔΫϑϩʔΞΠσΟʔ${workflowId}ͰɺϏοτϥΠζͰͷϏϧυΛ։࢝͠·ͨ͠ɻϏϧυ͕׬ྃޙɺΤʔϐʔέʔΛ഑෍͠·͢ɻ`) }) } }) alexa.execute() }
  5. © 2018 VASILY,Inc. ᶄ-BNCEBͰ#JUSJTFͷϏϧυΛτϦΨʔ export const bitriseSkill = (event: Alexa.RequestBody<any>,

    context: Alexa.Context) => { const alexa = Alexa.handler(event, context) alexa.registerHandlers({ 'DistributeApk': function () { request({ method:'post', url: `https://www.bitrise.io/app/${appSlug}/build/start.json`, headers: {"Content-Type": "application/json; charset=utf-8"}, json: true, body: { 'hook_info': { 'type': 'bitrise', 'api_token': apiToken }, 'build_params': { 'branch': 'master', 'workflow_id': 'deploy', 'commit_message': 'triggered from alexa' } } }, (error, response, body) => { let workflowId = body.triggered_workflow this.emit(':tell', `ϫʔΫϑϩʔΞΠσΟʔ${workflowId}ͰɺϏοτϥΠζͰͷϏϧυΛ։࢝͠·ͨ͠ɻϏϧυ͕׬ྃޙɺΤʔϐʔέʔΛ഑෍͠·͢ɻ`) }) } }) alexa.execute() } "MFYB͔ΒϢʔβʔ΁ͷԠ౴