スマホ時代のBotアプリのつくり方

 スマホ時代のBotアプリのつくり方

YAPC::Asia Hachioji 2016 mid in Shinagawa
2016-07-03
Yusuke Wada a.k.a. yusukebe

E48a2f4f6f2db2f98158f1558c2ee3cf?s=128

Yusuke Wada

July 03, 2016
Tweet

Transcript

  1. εϚϗ࣌୅ͷ #PUΞϓϦͷͭ͘Γํ :"1$"TJB)BDIJPKJNJEJO4IJOBHBXB  :VTVLF8BEBBLBZVTVLFCF

  2. ࣗݾ঺հ w ࿨ా༟հBLBZVTVLFCF w ϫσΟοτ୅දऔక໾ w ΦϞϩΩ$50 w ٕज़ސ໰Y w

    DPGPVOEFSPGCPLFUF w XBEBGNEBOEZGN w 1FSM.POHFS
  3. ͦ͏͍͑͹

  4. ԭೄཱྀߦߦ͖ͬͯ·ͨ͠

  5. ཱྀߦͱ͍͑͹

  6. τϥϕϧϒοΫ ג ͷٕज़ސ໰΍ͬͯ·͢

  7. None
  8. ࡢ೔ͷϠύνʔͰ τϥϕϧϒοΫ͔ࣾΒ ໊͕ ֤ࣗॳ ൃදʂ ✕

  9. ΊͰ͍ͨʂ ˎࣸਅ͸άϧΫϯͰ͢

  10. Ϡύνʔʹײँ

  11. ͱ͜ΖͰ

  12. None
  13. ΈΜͳେ޷͖ʂ ͩΑͶʁ

  14. ͦΜͳͭͷϓϥοτϑΥʔϜ ͔Β݄ʹΞφ΢ϯε͕

  15. None
  16. εϚϗϝοηϯδϟʔ w -*/&'BDFCPPL.FTTFOHFS w εϚϗ࣌୅ͷϝοηʔδΞϓϦ w ରPSάϧʔϓ w ΋͸΍͜ͷͭ͸σϑΝΫτε λϯμʔυʹͳ͍ͬͯΔ

    w ͦ͜ʹ#PUͱ͍͏֓೦ͱ࣮૷͕ ೖͬͯ͘Δ
  17. ຊ೔ͷςʔϚ w -*/&'BDFCPPL.FTTFOHFS#PUͷͭ͘Γํ w ओʹ-*/&ʮ#05"1*5SJBM"DDPVOUʯΛར༻ w #0,&5&#05Λྫʹڍ͛·͢ w ҙ֎ͱۤ࿑͢Δ࣮૷ͷ͍͔ͭ͘ͷίτ w

    ίϚϯυࢦ޲ͱͦͷ࣮૷ w ཧ૝తͳΞʔΩςΫνϟͱ࣮ྫ
  18. ͦ΋ͦ΋
 #PUͬͯͳΜͧ

  19. άάΔ

  20. ఆظతʹπΠʔτ͢Δ πΠολʔ ΞΧ΢ϯτ

  21. /0/0 ͦΕ͚ͩ͡Όͳ͍Α

  22. ͔͋ͨ΋ਓؒͷΑ͏ʹ࡞ۀΛ ߦ͏ίϯϐϡʔλϓϩάϥϜ ͷ૯শ

  23. 30#05

  24. ྫ͑͹

  25. ݕࡧΤϯδϯͷ#PU ͱ͔΋͋ΔΑͶ

  26. -*/&#05"1*ͷ৔߹

  27. ެࣜ"1*υΩϡϝϯτΑΓ࿨༁Ҿ༻ w #05"1*Λ࢖͏ͱݸਓͷϢʔβʔͱ௚઀΍ΓͱΓ͕ ग़དྷΔ w #05ΞΧ΢ϯτΛ༑ୡͱͯ͠௥Ճͯ͠΋Β͍ϝο ηʔδΛड͚औΔͱࣗಈతʹΧελϚΠζͨ͠Ϩε ϙϯεΛฦ͢ͳͲ͕ߟ͑ΒΕΔ w ͲΜͳλΠϛϯάͰ΋Ϣʔβʔʹରͯࣗ͠෼ͷ#05

    αʔόʔ͔ΒϝοηʔδΛૹΕΔ
  28. ެࣜ"1*υΩϡϝϯτΑΓਤΛഈआ

  29. ͭͬͯ͘Έͨ

  30. None
  31. ݱࡏ ༑ୡ਺ 

  32. ײ૝

  33. ͭͬͯ͘෼͔Δ#05"1*Ͱग़དྷΔ͜ͱ w جຊ͸#05ରϢʔβʔͷΠϯλϥΫγϣϯ w NJEݸผ#05ΞϓϦʹͱͬͯͷϢʔβʔࣝผࢠ w NJEΛอ࣋ͯ͠Ұ੪ૹ৴ͳͲग़དྷΔ͕ϑΟοτ͠ͳ͍ w ςΩετͳͲϝοηʔδΛड͚औͬͯԿ͔Λฦ͢ w

    Ϧονϝοηʔδ ޙड़ Λར༻ͯ͠ϘλϯΛ࣮ݱ
  34. #0,&5&#05ͷػೳ

  35. ςΩετΛૹΔ Ϙέݕࡧ

  36. ελϯϓΛૹΔ ࡢ೔ͷਓؾϘέ

  37. ʮ΋ͬͱΈΔʯΛλοϓ .03&ίϚϯυൃಈ ଓ͖ͷϘέ͕ݟΕΔ

  38. ࠨԼͷϘλϯΛλοϓ 5*.&-&"1ίϚϯυൃಈ աڈͷ೔ͷਓؾϘέ͕ݟΕΔ

  39. Χʔυͷ্൒෼Λλοϓ 8FC7JFXͰ։͘

  40. ӈԼͷϘλϯΛλοϓ (";0ίϚϯυൃಈ ͦͷϘέͷը૾Λऔಘग़དྷΔ

  41. ػೳ͓͞Β͍

  42. #0,&5&#05 w ςΩετૹΔϘέݕࡧ w ελϯϓૹΔࡢ೔ͷਓؾϘέ w .03&ίϚϯυ΋ͬͱΈΔ w 5*.&-&"1\::::..%%^աڈͷਓؾϘέ w

    (";0\CPLF@JE^Ϙέը૾Λऔಘ w Χʔυͷ্൒෼Λλοϓ8FC7JFXͰදࣔ
  43. ϨεϙϯεΦϒδΣΫτ

  44. Ϧονϝοηʔδ ςΩετ ϝοηʔδ

  45. ը૾ ϝοηʔδ

  46. Ϧονϝοηʔδ w શͯ͸ը૾ w ࠲ඪͰۣܗΛࢦఆͯ͠Ξ ΫγϣϯΛܾΊΕΔ w ࢦఆͨ͠63-Λ։͘ w ࢦఆͨ͠จࣈྻΛൃݴ͞

    ͤΔίϚϯυ w -*/&/&84ͷΞΧ΢ϯ τͳͲ΋͜ΕΛར༻ͯ͠ ΔͬΆ͍
  47. λοϓͨ͠Β  ࢦఆͨ͠จࣈྻΛൃݴͤ͞Δʁ

  48. ࡌͬͯͳ͍

  49. ࣮͸

  50. IUUQTHJUIVCDPNMJOFMJOFCPU TELQFSMCMPCNBTUFSMJC-*/&#PU "1*#VJMEFS3JDI.FTTBHFQN- 4%,ͷιʔεʹͷΈࡌͬͯΔ

  51. ͬͯ͜ͱͰ࣮૷ͷ࿩

  52. جຊతͳΞʔΩςΫνϟ ࣗલ #05ΞϓϦ -*/& ϓϥοτϑΥʔϜ Ϣʔβʔ ϝοηʔδ DBMMCBDL 1045IUUQTFYBNQMFDPNDBMMCBDL NFTTBHF

    1045IUUQTUSJBMCPUBQJMJOFNFWFWFOUT ϝοηʔδ SFTQPOTF
  53. ࣗલ#05ΞϓϦ w DBMMCBDLΛड͚औΓ w ϝοηʔδʹؚ·ΕΔNJEΛऔಘ w NJEΊ͕͚ͯϨεϙϯεΛฦ͢ w த਎͸+40/ άϩʔόϧυϝΠϯ

    )551αʔ ό 44- +40/ύʔα )551Ϋ ϥΠΞϯτ͕͋Ε͹جຊσΩΔʂ ˎॺ໊ͷݕূ͸আ͘
  54. ͨͩ͠ ಠࣗϑϨʔϜϫʔΫ͸඼࣭͕௿͍͜ͱ͕ଟ͍ ॺ໊ͷݕূ͍ͨ͠ -*/&͔ΒૹΒΕ͖ͯͯΔ͔  Ϧονϝοηʔδͱ͔ΊΜͲ͍͘͞

  55. -*/&#054%,

  56. -*/&#PU"1* w IUUQTNFUBDQBOPSHQPE-*/&#PU"1* w $1"/J[F΋͞Ε͍ͯΔ w Ϧονϝοηʔδͷ࡞੒ʹ΋΋ͪΖΜରԠ w ॺ໊ͷݕূ΋ҰߦͰॻ͚Δ w

    ςετ͕े෼ʹଗ͍ͬͯΔͷͰ඼࣭͕ߴ͍ w ྫͷυΩϡϝϯτʹࡌͬͯͳ͍"1*͕࣮૷ w FHσΟϨΫτϦʹϑϨʔϜϫʔΫ͕ܝࡌ
  57. VOMFTT SFRNFUIPEFR1045SFRQBUIFRDBMMCBDL \ SFUVSO< <> </PU'PVOE>> ^ NZJT@WBMJECPUWBMJEBUF@TJHOBUVSF SFRDPOUFOU SFRIFBEFS

    9 -*/&$IBOOFM4JHOBUVSF  VOMFTT JT@WBMJE \ SFUVSO< <> <GBJMFEUPWBMJEBUFTJHOBUVSF>> ^ NZSFDFJWFTCPUDSFBUF@SFDFJWFT@GSPN@KT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Δͱ ൃݴͤ͞Δ΍ͭ λοϓ Ϣʔβʔ͕ উखʹൃݴ

  66. NZSFTTFMGCPUSJDI@NFTTBHF IFJHIUIFJHIU  TFU@BDUJPO  #0,&  UFYUՄԙ  MJOL@VSJIUUQCPLFUFKQCPLFCPLF\JE^

        BEE@MJTUFOFS  BDUJPO#0,&  Y  Z  XJEUI  IFJHIU IFJHIU   TFU@BDUJPO  5*.&-&"1  UFYU5*.&-&"1ZNE  UZQFTFOE.FTTBHF     BEE@MJTUFOFS  BDUJPO5*.&-&"1  Y  Z   XJEUI   IFJHIU      UZQFࢦఆͯ͠΍Δ
  67. #PU։ൃͷ࣮ࡍ

  68. Ϧονϝοηʔδͷ ը૾഑৴

  69. ཧ૝ͷΞʔΩςΫνϟ w ը૾Λੜ੒͢Δʹ͸ίετ͕͔͔Δ w DBMMCBDLޙʮ͙͢ʹϝοηʔδΛૹΔඞཁ͸ແ͍ʯ w KPCRVFVFʹ౤͛ͯը૾ੜ੒ޙϝοηʔδ͕ཧ૝ w 8FCαʔό͕٧·Δ͜ͱ͕ແ͍ 8FCαʔό

    -*/& +PCαʔό XPSLFS XPSLFS DBMMCBDL SFTQPOTF EJTQBUDI NFTTBHF ը૾ੜ੒
  70. ͱ͸͍͑

  71. ࣮ࡍͷΞʔΩςΫνϟ w ొ࿥਺ ਓΛ௒͑ͯ΋ΞΫςΟϒ͸গͳ͍ w 8FCαʔόͷGPSLͨ͠ϓϩηε͕ը૾ੜ੒Λ݉ͶΔ w ͔ͭը૾͸े෼ʹΩϟογϡͯ͠0,ʂ w ؅ཧίετͷ௿͞Λॏࢹͨ͠ઃܭʹͨ͠

    8FCαʔό -*/& DBMMCBDL SFTQPOTF NFTTBHF ը૾ੜ੒ ը૾഑৴ Ωϟογϡ
 αʔό
  72. ը૾ੜ੒഑৴ w ಺෦Ϙέͯ"1*͔ΒϘέ৘ใΛऔಘ w *NBHFSͰΨϦΨϦը૾࡞੒ w े෼ͳ࣌ؒͰNFNDBDIFEʹσʔλΛΩϟογϡ w ্هΛݩσʔλͱ͠ϦαΠζͯ͠഑৴ w

    $%/͸ܦ༝ͤͣ"84&-#͔Β௚઀഑৴ w DBMMCBDL͕དྷͨॠؒʹࣗΒͷը૾Λऔಘ w ΩϟογϡΛੜ੒͓ͯ͘͠
  73. ίϚϯυͷ࣮૷ w ςΩετϝοηʔδΛϋϯυϧ͢ΔࡍจࣈྻΛൺֱ w Ϛονͨ͠ΒͦΕͧΕσΟεύον w Ϛον͠ͳ͔ͬͨΒϘέݕࡧϞʔυ΁ JG BSHT\UFYU^FR3"/,*/( \

    SFUVSOTFMGIBOEMF@TUJDLFS BSHT  ^ JG BSHT\UFYU^_N?5*.&-&"1=T =E  \ SFUVSOTFMGIBOEMF@UJNFMFBQ BSHT  ^ JG BSHT\UFYU^_N?(";0=T =E  \ SFUVSOTFMGIBOEMF@HB[P BSHT  ^ 
  74. .03&ίϚϯυͷ࣮૷ w NJEΛϕʔεʹηογϣϯ*%Λੜ੒ w ηογϣϯ͔ΒݱࡏͷίϯςΩετΛऔಘ w ্هͩͱԿϖʔδ໨͔ʁͱݕࡧΫΤϦʔ w ηογϣϯ৘ใ͸NFNDBDIFEʹஞҰอଘ JG

    BSHT\UFYU^FR.03& \ NZQBSBNTTFTTJPOHFU QBSBNT ]]\^ QBHFQBSBNT\QBHF^  RVFSZQBSBNT\RVFSZ^ ^
  75. #PUͷӡ༻

  76. ϢʔβʔͷߦಈΛ τϥοΩϯά͍ͨ͠

  77. None
  78. +4࣮ߦͱ͔ϜϦϙ

  79. .FBTVSFNFOU1SPUPDPM w )551ϦΫΤετΛૹͬͯΞΫηεͱݟͳ͢ w ͱΓ͋͑ͣϨεϙϯε͕੒ޭͨ͠৔߹ʹૹͬͯΔ w NJEΛΩʔʹϢχʔΫϢʔβʔΛΧ΢ϯτ w CPLFTFBSDIωίCPLFEBJMZ

  80. ݱ࣮

  81. None
  82. ͳ͔ͳ͔ݫ͍͠

  83. ͦΖͦΖ·ͱΊ

  84. #PU։ൃͷݱ࣮·ͱΊ w -*/&#05"1*͸جຊతʹϢʔβର#05 w NJEͰϢʔβʔΛࣝผ͠Ԡ༻͠Α͏ w ϝοηʔδ͸ඇಉظͰฦͤ͹ྑ͍ w ΞΫςΟϒ͕ଟ͘ͳΕ͹ཧ૝తͳΞʔΩςΫνϟ΁ w

    ϦονϝοηʔδͱίϚϯυͰػೳΛ࣮ݱ w ϞόΠϧΞϓϦ͕͍Βͳ͘ͳΔੈք؍͸དྷΔͷ͔ w ίϯςϯπΛੜ੒͢Δ͜ͱ΋ग़དྷΕ͹໘ന͍͔΋