module Kamigo::Clients::LineClient
Public Instance Methods
client()
click to toggle source
# File lib/kamigo/clients/line_client.rb, line 4 def client @client ||= Line::Bot::Client.new do |config| config.channel_secret = ENV['LINE_CHANNEL_SECRET'] config.channel_token = ENV['LINE_CHANNEL_TOKEN'] end end
validate_signature(request, body)
click to toggle source
# File lib/kamigo/clients/line_client.rb, line 11 def validate_signature(request, body) signature = request.env['HTTP_X_LINE_SIGNATURE'] client.validate_signature(body, signature) end