Create LINE Bot with Elixir

Create LINE Bot with Elixir

Introduce my own LINE Bot created with Elixir and that's features.
tokyo.ex #2 LT Slide #beamlangtokyo
http://beam-lang.connpass.com/event/30513/

509e5167fdb3871d6b6e045e34a3e019?s=128

Takayuki Matsubara

May 23, 2016
Tweet

Transcript

  1. 2.

    self-introduction me |> name # Takayuki Matsubara |> job #

    Software Engineer |> work_at # M3, Inc. |> works # Rails, Java, JavaScript |> twitter # ma2ge |> github # ma2gedev |> oss # PowerAssertEx, breadcrumble, # chrono_logger, bundle-star, # faraday-encoding
  2. 6.
  3. 12.

    Implementation - Worker defmodule ZakuHead.PeriodicTask do use GenServer def start_link

    do GenServer.start_link(__MODULE__, %{}) end def init(state) do Process.send_after(self(), :work, 0) # start immediately when starting {:ok, state} end def handle_info(:work, state) do # scraping from the train information page # find some trouble routes and notify LINE BOT API Process.send_after(self(), :work, 5 * 60 * 1000) # every 5 minutes {:noreply, state} end end
  4. 16.
  5. 17.
  6. 20.