Method: Line::Bot::Client#push_message
- Defined in:
- lib/line/bot/client.rb
#push_message(user_id, messages) ⇒ Net::HTTPResponse
Push messages to line server and to users.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/line/bot/client.rb', line 68 def (user_id, ) raise Line::Bot::API::InvalidCredentialsError, 'Invalidates credentials' unless credentials? = [] if .is_a?(Hash) request = Request.new do |config| config.httpclient = httpclient config.endpoint = endpoint config.endpoint_path = '/message/push' config.credentials = credentials config.to = user_id config. = end request.post end |