Method: Line::Bot::V2::MessagingApi::ApiClient#reply_message_with_http_info
- Defined in:
- lib/line/bot/v2/messaging_api/api/messaging_api_client.rb
#reply_message_with_http_info(reply_message_request:) ⇒ Array(Line::Bot::V2::MessagingApi::ReplyMessageResponse, Integer, Hash{String => String}), ...
Send reply message This requests to POST https://api.line.me/v2/bot/message/reply This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 |
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2927 def ( # steep:ignore MethodBodyTypeMismatch reply_message_request: ) path = "/v2/bot/message/reply" response = @http_client.post( path: path, body_params: , ) case response.code.to_i when 200 json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body)) json.transform_keys! do |key| Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key end response_body = Line::Bot::V2::MessagingApi::ReplyMessageResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] when 400 json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body)) json.transform_keys! do |key| Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key end response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 400, response.each_header.to_h] when 429 json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body)) json.transform_keys! do |key| Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key end response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 429, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end |