class Line::Bot::V2::MessagingApi::ApiClient
Public Class Methods
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 38 def initialize(base_url: nil, channel_access_token:, http_options: {}) @http_client = HttpClient.new( base_url: base_url || 'https://api.line.me', http_headers: { Authorization: "Bearer #{channel_access_token}" }, http_options: http_options ) end
Initializes a new {Line::Bot::V2::MessagingApi::ApiClient} instance.
@param base_url [String] The base URL for requests (optional).
Defaults to 'https://api.line.me' if none is provided. You can override this for testing or to use a mock server.
@param channel_access_token [String] The channel access token for authorization. @param http_options [Hash] HTTP options (same as Net::HTTP options).
See: https://docs.ruby-lang.org/en/3.4/Net/HTTP.html to understand the options.
@example
@client ||= Line::Bot::V2::MessagingApi::ApiClient.new( channel_access_token: "YOUR_CHANNEL_ACCESS_TOKEN", http_options: { open_timeout: 5, read_timeout: 5, } )
Public Instance Methods
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 125 def broadcast( broadcast_request:, x_line_retry_key: nil ) response_body, _status_code, _headers = broadcast_with_http_info( broadcast_request: broadcast_request, x_line_retry_key: x_line_retry_key ) response_body end
Sends a message to multiple users at any time. This requests to POST https://api.line.me/v2/bot/message/broadcast
When you want to get HTTP status code or response headers, use {#broadcast_with_http_info} instead of this.
@param broadcast_request [BroadcastRequest] @param x_line_retry_key [String, nil] Retry key. Specifies the UUID in hexadecimal format (e.g., ‘123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn’t generated by LINE. Each developer must generate their own retry key. @see developers.line.biz/en/reference/messaging-api/#send-broadcast-message @return [String, nil] when HTTP status code is 200 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 403 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 409 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 429 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 61 def broadcast_with_http_info( # steep:ignore MethodBodyTypeMismatch broadcast_request:, x_line_retry_key: nil ) path = "/v2/bot/message/broadcast" header_params = { "X-Line-Retry-Key": x_line_retry_key }.compact response = @http_client.post( path: path, body_params: broadcast_request, headers: header_params ) case response.code.to_i when 200 [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 403 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, 403, response.each_header.to_h] when 409 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, 409, 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
Sends a message to multiple users at any time. This requests to POST https://api.line.me/v2/bot/message/broadcast
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param broadcast_request [BroadcastRequest] @param x_line_retry_key [String, nil] Retry key. Specifies the UUID in hexadecimal format (e.g., ‘123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn’t generated by LINE. Each developer must generate their own retry key. @see developers.line.biz/en/reference/messaging-api/#send-broadcast-message @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 400 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 403 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 409 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 429 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 420 def get_aggregation_unit_name_list( limit: nil, start: nil ) response_body, _status_code, _headers = get_aggregation_unit_name_list_with_http_info( limit: limit, start: start ) response_body end
Get name list of units used this month This requests to GET https://api.line.me/v2/bot/message/aggregation/list
When you want to get HTTP status code or response headers, use {#get_aggregation_unit_name_list_with_http_info} instead of this.
@param limit [String, nil] The maximum number of aggregation units you can get per request. @param start [String, nil] Value of the continuation token found in the next property of the JSON object returned in the response. If you can’t get all the aggregation units in one request, include this parameter to get the remaining array. @see developers.line.biz/en/reference/messaging-api/#get-name-list-of-units-used-this-month @return [Line::Bot::V2::MessagingApi::GetAggregationUnitNameListResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 383 def get_aggregation_unit_name_list_with_http_info( # steep:ignore MethodBodyTypeMismatch limit: nil, start: nil ) path = "/v2/bot/message/aggregation/list" query_params = { "limit": limit, "start": start }.compact response = @http_client.get( path: path, query_params: query_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::GetAggregationUnitNameListResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Get name list of units used this month This requests to GET https://api.line.me/v2/bot/message/aggregation/list
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param limit [String, nil] The maximum number of aggregation units you can get per request. @param start [String, nil] Value of the continuation token found in the next property of the JSON object returned in the response. If you can’t get all the aggregation units in one request, include this parameter to get the remaining array. @see developers.line.biz/en/reference/messaging-api/#get-name-list-of-units-used-this-month @return [Array(Line::Bot::V2::MessagingApi::GetAggregationUnitNameListResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 467 def get_aggregation_unit_usage( ) response_body, _status_code, _headers = get_aggregation_unit_usage_with_http_info( ) response_body end
Get number of units used this month This requests to GET https://api.line.me/v2/bot/message/aggregation/info
When you want to get HTTP status code or response headers, use {#get_aggregation_unit_usage_with_http_info} instead of this.
@see developers.line.biz/en/reference/messaging-api/#get-number-of-units-used-this-month @return [Line::Bot::V2::MessagingApi::GetAggregationUnitUsageResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 439 def get_aggregation_unit_usage_with_http_info( # steep:ignore MethodBodyTypeMismatch ) path = "/v2/bot/message/aggregation/info" response = @http_client.get( path: path, ) 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::GetAggregationUnitUsageResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Get number of units used this month This requests to GET https://api.line.me/v2/bot/message/aggregation/info
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@see developers.line.biz/en/reference/messaging-api/#get-number-of-units-used-this-month @return [Array(Line::Bot::V2::MessagingApi::GetAggregationUnitUsageResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 510 def get_bot_info( ) response_body, _status_code, _headers = get_bot_info_with_http_info( ) response_body end
Get bot info This requests to GET https://api.line.me/v2/bot/info
When you want to get HTTP status code or response headers, use {#get_bot_info_with_http_info} instead of this.
@see developers.line.biz/en/reference/messaging-api/#get-bot-info @return [Line::Bot::V2::MessagingApi::BotInfoResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 482 def get_bot_info_with_http_info( # steep:ignore MethodBodyTypeMismatch ) path = "/v2/bot/info" response = @http_client.get( path: path, ) 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::BotInfoResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Get bot info This requests to GET https://api.line.me/v2/bot/info
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@see developers.line.biz/en/reference/messaging-api/#get-bot-info @return [Array(Line::Bot::V2::MessagingApi::BotInfoResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 607 def get_followers( start: nil, limit: nil ) response_body, _status_code, _headers = get_followers_with_http_info( start: start, limit: limit ) response_body end
Get a list of users who added your LINE Official Account as a friend This requests to GET https://api.line.me/v2/bot/followers/ids
When you want to get HTTP status code or response headers, use {#get_followers_with_http_info} instead of this.
@param start [String, nil] Value of the continuation token found in the next property of the JSON object returned in the response. Include this parameter to get the next array of user IDs. @param limit [Integer, nil] The maximum number of user IDs to retrieve in a single request. @see developers.line.biz/en/reference/messaging-api/#get-follower-ids @return [Line::Bot::V2::MessagingApi::GetFollowersResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 570 def get_followers_with_http_info( # steep:ignore MethodBodyTypeMismatch start: nil, limit: nil ) path = "/v2/bot/followers/ids" query_params = { "start": start, "limit": limit }.compact response = @http_client.get( path: path, query_params: query_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::GetFollowersResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Get a list of users who added your LINE Official Account as a friend This requests to GET https://api.line.me/v2/bot/followers/ids
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param start [String, nil] Value of the continuation token found in the next property of the JSON object returned in the response. Include this parameter to get the next array of user IDs. @param limit [Integer, nil] The maximum number of user IDs to retrieve in a single request. @see developers.line.biz/en/reference/messaging-api/#get-follower-ids @return [Array(Line::Bot::V2::MessagingApi::GetFollowersResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 658 def get_group_member_count( group_id: ) response_body, _status_code, _headers = get_group_member_count_with_http_info( group_id: group_id ) response_body end
Get number of users in a group chat This requests to GET https://api.line.me/v2/bot/group/{groupId}/members/count
When you want to get HTTP status code or response headers, use {#get_group_member_count_with_http_info} instead of this.
@param group_id [String] Group ID @see developers.line.biz/en/reference/messaging-api/#get-members-group-count @return [Line::Bot::V2::MessagingApi::GroupMemberCountResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 627 def get_group_member_count_with_http_info( # steep:ignore MethodBodyTypeMismatch group_id: ) path = "/v2/bot/group/{groupId}/members/count" .gsub(/{groupId}/, group_id.to_s) response = @http_client.get( path: path, ) 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::GroupMemberCountResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Get number of users in a group chat This requests to GET https://api.line.me/v2/bot/group/{groupId}/members/count
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param group_id [String] Group ID @see developers.line.biz/en/reference/messaging-api/#get-members-group-count @return [Array(Line::Bot::V2::MessagingApi::GroupMemberCountResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 711 def get_group_member_profile( group_id:, user_id: ) response_body, _status_code, _headers = get_group_member_profile_with_http_info( group_id: group_id, user_id: user_id ) response_body end
Get group chat member profile This requests to GET https://api.line.me/v2/bot/group/{groupId}/member/{userId}
When you want to get HTTP status code or response headers, use {#get_group_member_profile_with_http_info} instead of this.
@param group_id [String] Group ID @param user_id [String] User ID @see developers.line.biz/en/reference/messaging-api/#get-group-member-profile @return [Line::Bot::V2::MessagingApi::GroupUserProfileResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 677 def get_group_member_profile_with_http_info( # steep:ignore MethodBodyTypeMismatch group_id:, user_id: ) path = "/v2/bot/group/{groupId}/member/{userId}" .gsub(/{groupId}/, group_id.to_s) .gsub(/{userId}/, user_id.to_s) response = @http_client.get( path: path, ) 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::GroupUserProfileResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Get group chat member profile This requests to GET https://api.line.me/v2/bot/group/{groupId}/member/{userId}
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param group_id [String] Group ID @param user_id [String] User ID @see developers.line.biz/en/reference/messaging-api/#get-group-member-profile @return [Array(Line::Bot::V2::MessagingApi::GroupUserProfileResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 769 def get_group_members_ids( group_id:, start: nil ) response_body, _status_code, _headers = get_group_members_ids_with_http_info( group_id: group_id, start: start ) response_body end
Get group chat member user IDs This requests to GET https://api.line.me/v2/bot/group/{groupId}/members/ids
When you want to get HTTP status code or response headers, use {#get_group_members_ids_with_http_info} instead of this.
@param group_id [String] Group ID @param start [String, nil] Value of the continuation token found in the ‘next` property of the JSON object returned in the response. Include this parameter to get the next array of user IDs for the members of the group. @see developers.line.biz/en/reference/messaging-api/#get-group-member-user-ids @return [Line::Bot::V2::MessagingApi::MembersIdsResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 732 def get_group_members_ids_with_http_info( # steep:ignore MethodBodyTypeMismatch group_id:, start: nil ) path = "/v2/bot/group/{groupId}/members/ids" .gsub(/{groupId}/, group_id.to_s) query_params = { "start": start }.compact response = @http_client.get( path: path, query_params: query_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::MembersIdsResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Get group chat member user IDs This requests to GET https://api.line.me/v2/bot/group/{groupId}/members/ids
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param group_id [String] Group ID @param start [String, nil] Value of the continuation token found in the ‘next` property of the JSON object returned in the response. Include this parameter to get the next array of user IDs for the members of the group. @see developers.line.biz/en/reference/messaging-api/#get-group-member-user-ids @return [Array(Line::Bot::V2::MessagingApi::MembersIdsResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 820 def get_group_summary( group_id: ) response_body, _status_code, _headers = get_group_summary_with_http_info( group_id: group_id ) response_body end
Get group chat summary This requests to GET https://api.line.me/v2/bot/group/{groupId}/summary
When you want to get HTTP status code or response headers, use {#get_group_summary_with_http_info} instead of this.
@param group_id [String] Group ID @see developers.line.biz/en/reference/messaging-api/#get-group-summary @return [Line::Bot::V2::MessagingApi::GroupSummaryResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 789 def get_group_summary_with_http_info( # steep:ignore MethodBodyTypeMismatch group_id: ) path = "/v2/bot/group/{groupId}/summary" .gsub(/{groupId}/, group_id.to_s) response = @http_client.get( path: path, ) 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::GroupSummaryResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Get group chat summary This requests to GET https://api.line.me/v2/bot/group/{groupId}/summary
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param group_id [String] Group ID @see developers.line.biz/en/reference/messaging-api/#get-group-summary @return [Array(Line::Bot::V2::MessagingApi::GroupSummaryResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 898 def get_joined_membership_users( membership_id:, start: nil, limit: nil ) response_body, _status_code, _headers = get_joined_membership_users_with_http_info( membership_id: membership_id, start: start, limit: limit ) response_body end
Get a list of user IDs who joined the membership. This requests to GET https://api.line.me/v2/bot/membership/{membershipId}/users/ids
When you want to get HTTP status code or response headers, use {#get_joined_membership_users_with_http_info} instead of this.
@param membership_id [Integer] Membership
plan ID. @param start [String, nil] A continuation token to get next remaining membership user IDs. Returned only when there are remaining user IDs that weren’t returned in the userIds property in the previous request. The continuation token expires in 24 hours (86,400 seconds). @param limit [Integer, nil] The max number of items to return for this API call. The value is set to 300 by default, but the max acceptable value is 1000. @see developers.line.biz/en/reference/messaging-api/#get-membership-user-ids @return [Line::Bot::V2::MessagingApi::GetJoinedMembershipUsersResponse] when HTTP status code is 200 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 404 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 842 def get_joined_membership_users_with_http_info( # steep:ignore MethodBodyTypeMismatch membership_id:, start: nil, limit: nil ) path = "/v2/bot/membership/{membershipId}/users/ids" .gsub(/{membershipId}/, membership_id.to_s) query_params = { "start": start, "limit": limit }.compact response = @http_client.get( path: path, query_params: query_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::GetJoinedMembershipUsersResponse.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 404 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, 404, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Get a list of user IDs who joined the membership. This requests to GET https://api.line.me/v2/bot/membership/{membershipId}/users/ids
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param membership_id [Integer] Membership
plan ID. @param start [String, nil] A continuation token to get next remaining membership user IDs. Returned only when there are remaining user IDs that weren’t returned in the userIds property in the previous request. The continuation token expires in 24 hours (86,400 seconds). @param limit [Integer, nil] The max number of items to return for this API call. The value is set to 300 by default, but the max acceptable value is 1000. @see developers.line.biz/en/reference/messaging-api/#get-membership-user-ids @return [Array(Line::Bot::V2::MessagingApi::GetJoinedMembershipUsersResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 400 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 404 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 956 def get_membership_list( ) response_body, _status_code, _headers = get_membership_list_with_http_info( ) response_body end
Get a list of memberships. This requests to GET https://api.line.me/v2/bot/membership/list
When you want to get HTTP status code or response headers, use {#get_membership_list_with_http_info} instead of this.
@see developers.line.biz/en/reference/messaging-api/#get-membership-plans @return [Line::Bot::V2::MessagingApi::MembershipListResponse] when HTTP status code is 200 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 404 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 920 def get_membership_list_with_http_info( # steep:ignore MethodBodyTypeMismatch ) path = "/v2/bot/membership/list" response = @http_client.get( path: path, ) 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::MembershipListResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] when 404 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, 404, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Get a list of memberships. This requests to GET https://api.line.me/v2/bot/membership/list
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@see developers.line.biz/en/reference/messaging-api/#get-membership-plans @return [Array(Line::Bot::V2::MessagingApi::MembershipListResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 404 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1021 def get_membership_subscription( user_id: ) response_body, _status_code, _headers = get_membership_subscription_with_http_info( user_id: user_id ) response_body end
Get a user’s membership subscription. This requests to GET https://api.line.me/v2/bot/membership/subscription/{userId}
When you want to get HTTP status code or response headers, use {#get_membership_subscription_with_http_info} instead of this.
@param user_id [String] User ID @see developers.line.biz/en/reference/messaging-api/#get-a-users-membership-subscription-status @return [Line::Bot::V2::MessagingApi::GetMembershipSubscriptionResponse] when HTTP status code is 200 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 404 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 974 def get_membership_subscription_with_http_info( # steep:ignore MethodBodyTypeMismatch user_id: ) path = "/v2/bot/membership/subscription/{userId}" .gsub(/{userId}/, user_id.to_s) response = @http_client.get( path: path, ) 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::GetMembershipSubscriptionResponse.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 404 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, 404, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Get a user’s membership subscription. This requests to GET https://api.line.me/v2/bot/membership/subscription/{userId}
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param user_id [String] User ID @see developers.line.biz/en/reference/messaging-api/#get-a-users-membership-subscription-status @return [Array(Line::Bot::V2::MessagingApi::GetMembershipSubscriptionResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 400 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 404 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1066 def get_message_quota( ) response_body, _status_code, _headers = get_message_quota_with_http_info( ) response_body end
Gets the target limit for sending messages in the current month. The total number of the free messages and the additional messages is returned. This requests to GET https://api.line.me/v2/bot/message/quota
When you want to get HTTP status code or response headers, use {#get_message_quota_with_http_info} instead of this.
@see developers.line.biz/en/reference/messaging-api/#get-quota @return [Line::Bot::V2::MessagingApi::MessageQuotaResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1109 def get_message_quota_consumption( ) response_body, _status_code, _headers = get_message_quota_consumption_with_http_info( ) response_body end
Gets the number of messages sent in the current month. This requests to GET https://api.line.me/v2/bot/message/quota/consumption
When you want to get HTTP status code or response headers, use {#get_message_quota_consumption_with_http_info} instead of this.
@see developers.line.biz/en/reference/messaging-api/#get-consumption @return [Line::Bot::V2::MessagingApi::QuotaConsumptionResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1081 def get_message_quota_consumption_with_http_info( # steep:ignore MethodBodyTypeMismatch ) path = "/v2/bot/message/quota/consumption" response = @http_client.get( path: path, ) 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::QuotaConsumptionResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Gets the number of messages sent in the current month. This requests to GET https://api.line.me/v2/bot/message/quota/consumption
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@see developers.line.biz/en/reference/messaging-api/#get-consumption @return [Array(Line::Bot::V2::MessagingApi::QuotaConsumptionResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1038 def get_message_quota_with_http_info( # steep:ignore MethodBodyTypeMismatch ) path = "/v2/bot/message/quota" response = @http_client.get( path: path, ) 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::MessageQuotaResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Gets the target limit for sending messages in the current month. The total number of the free messages and the additional messages is returned. This requests to GET https://api.line.me/v2/bot/message/quota
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@see developers.line.biz/en/reference/messaging-api/#get-quota @return [Array(Line::Bot::V2::MessagingApi::MessageQuotaResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1159 def get_narrowcast_progress( request_id: ) response_body, _status_code, _headers = get_narrowcast_progress_with_http_info( request_id: request_id ) response_body end
Gets the status of a narrowcast message. This requests to GET https://api.line.me/v2/bot/message/progress/narrowcast
When you want to get HTTP status code or response headers, use {#get_narrowcast_progress_with_http_info} instead of this.
@param request_id [String] The narrowcast message’s request ID. Each Messaging API request has a request ID. @see developers.line.biz/en/reference/messaging-api/#get-narrowcast-progress-status @return [Line::Bot::V2::MessagingApi::NarrowcastProgressResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1125 def get_narrowcast_progress_with_http_info( # steep:ignore MethodBodyTypeMismatch request_id: ) path = "/v2/bot/message/progress/narrowcast" query_params = { "requestId": request_id }.compact response = @http_client.get( path: path, query_params: query_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::NarrowcastProgressResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Gets the status of a narrowcast message. This requests to GET https://api.line.me/v2/bot/message/progress/narrowcast
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param request_id [String] The narrowcast message’s request ID. Each Messaging API request has a request ID. @see developers.line.biz/en/reference/messaging-api/#get-narrowcast-progress-status @return [Array(Line::Bot::V2::MessagingApi::NarrowcastProgressResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1211 def get_number_of_sent_broadcast_messages( date: ) response_body, _status_code, _headers = get_number_of_sent_broadcast_messages_with_http_info( date: date ) response_body end
Get number of sent broadcast messages This requests to GET https://api.line.me/v2/bot/message/delivery/broadcast
When you want to get HTTP status code or response headers, use {#get_number_of_sent_broadcast_messages_with_http_info} instead of this.
@param date [String] Date the messages were sent Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9 @see developers.line.biz/en/reference/messaging-api/#get-number-of-broadcast-messages @return [Line::Bot::V2::MessagingApi::NumberOfMessagesResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1177 def get_number_of_sent_broadcast_messages_with_http_info( # steep:ignore MethodBodyTypeMismatch date: ) path = "/v2/bot/message/delivery/broadcast" query_params = { "date": date }.compact response = @http_client.get( path: path, query_params: query_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::NumberOfMessagesResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Get number of sent broadcast messages This requests to GET https://api.line.me/v2/bot/message/delivery/broadcast
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param date [String] Date the messages were sent Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9 @see developers.line.biz/en/reference/messaging-api/#get-number-of-broadcast-messages @return [Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1263 def get_number_of_sent_multicast_messages( date: ) response_body, _status_code, _headers = get_number_of_sent_multicast_messages_with_http_info( date: date ) response_body end
Get number of sent multicast messages This requests to GET https://api.line.me/v2/bot/message/delivery/multicast
When you want to get HTTP status code or response headers, use {#get_number_of_sent_multicast_messages_with_http_info} instead of this.
@param date [String] Date the messages were sent Format: ‘yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9 @see developers.line.biz/en/reference/messaging-api/#get-number-of-multicast-messages @return [Line::Bot::V2::MessagingApi::NumberOfMessagesResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1229 def get_number_of_sent_multicast_messages_with_http_info( # steep:ignore MethodBodyTypeMismatch date: ) path = "/v2/bot/message/delivery/multicast" query_params = { "date": date }.compact response = @http_client.get( path: path, query_params: query_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::NumberOfMessagesResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Get number of sent multicast messages This requests to GET https://api.line.me/v2/bot/message/delivery/multicast
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param date [String] Date the messages were sent Format: ‘yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9 @see developers.line.biz/en/reference/messaging-api/#get-number-of-multicast-messages @return [Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1315 def get_number_of_sent_push_messages( date: ) response_body, _status_code, _headers = get_number_of_sent_push_messages_with_http_info( date: date ) response_body end
Get number of sent push messages This requests to GET https://api.line.me/v2/bot/message/delivery/push
When you want to get HTTP status code or response headers, use {#get_number_of_sent_push_messages_with_http_info} instead of this.
@param date [String] Date the messages were sent Format: ‘yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9 @see developers.line.biz/en/reference/messaging-api/#get-number-of-push-messages @return [Line::Bot::V2::MessagingApi::NumberOfMessagesResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1281 def get_number_of_sent_push_messages_with_http_info( # steep:ignore MethodBodyTypeMismatch date: ) path = "/v2/bot/message/delivery/push" query_params = { "date": date }.compact response = @http_client.get( path: path, query_params: query_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::NumberOfMessagesResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Get number of sent push messages This requests to GET https://api.line.me/v2/bot/message/delivery/push
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param date [String] Date the messages were sent Format: ‘yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9 @see developers.line.biz/en/reference/messaging-api/#get-number-of-push-messages @return [Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1367 def get_number_of_sent_reply_messages( date: ) response_body, _status_code, _headers = get_number_of_sent_reply_messages_with_http_info( date: date ) response_body end
Get number of sent reply messages This requests to GET https://api.line.me/v2/bot/message/delivery/reply
When you want to get HTTP status code or response headers, use {#get_number_of_sent_reply_messages_with_http_info} instead of this.
@param date [String] Date the messages were sent Format: ‘yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9 @see developers.line.biz/en/reference/messaging-api/#get-number-of-reply-messages @return [Line::Bot::V2::MessagingApi::NumberOfMessagesResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1333 def get_number_of_sent_reply_messages_with_http_info( # steep:ignore MethodBodyTypeMismatch date: ) path = "/v2/bot/message/delivery/reply" query_params = { "date": date }.compact response = @http_client.get( path: path, query_params: query_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::NumberOfMessagesResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Get number of sent reply messages This requests to GET https://api.line.me/v2/bot/message/delivery/reply
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param date [String] Date the messages were sent Format: ‘yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9 @see developers.line.biz/en/reference/messaging-api/#get-number-of-reply-messages @return [Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1419 def get_pnp_message_statistics( date: ) response_body, _status_code, _headers = get_pnp_message_statistics_with_http_info( date: date ) response_body end
Get number of sent LINE notification messages This requests to GET https://api.line.me/v2/bot/message/delivery/pnp
When you want to get HTTP status code or response headers, use {#get_pnp_message_statistics_with_http_info} instead of this.
@param date [String] Date the message was sent Format: ‘yyyyMMdd` (Example:`20211231`) Time zone: UTC+9 @see developers.line.biz/en/reference/partner-docs/#get-number-of-sent-line-notification-messages @return [Line::Bot::V2::MessagingApi::NumberOfMessagesResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1385 def get_pnp_message_statistics_with_http_info( # steep:ignore MethodBodyTypeMismatch date: ) path = "/v2/bot/message/delivery/pnp" query_params = { "date": date }.compact response = @http_client.get( path: path, query_params: query_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::NumberOfMessagesResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Get number of sent LINE notification messages This requests to GET https://api.line.me/v2/bot/message/delivery/pnp
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param date [String] Date the message was sent Format: ‘yyyyMMdd` (Example:`20211231`) Time zone: UTC+9 @see developers.line.biz/en/reference/partner-docs/#get-number-of-sent-line-notification-messages @return [Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1468 def get_profile( user_id: ) response_body, _status_code, _headers = get_profile_with_http_info( user_id: user_id ) response_body end
Get profile This requests to GET https://api.line.me/v2/bot/profile/{userId}
When you want to get HTTP status code or response headers, use {#get_profile_with_http_info} instead of this.
@param user_id [String] User ID @see developers.line.biz/en/reference/messaging-api/#get-profile @return [Line::Bot::V2::MessagingApi::UserProfileResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1437 def get_profile_with_http_info( # steep:ignore MethodBodyTypeMismatch user_id: ) path = "/v2/bot/profile/{userId}" .gsub(/{userId}/, user_id.to_s) response = @http_client.get( path: path, ) 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::UserProfileResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Get profile This requests to GET https://api.line.me/v2/bot/profile/{userId}
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param user_id [String] User ID @see developers.line.biz/en/reference/messaging-api/#get-profile @return [Array(Line::Bot::V2::MessagingApi::UserProfileResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1802 def get_room_member_count( room_id: ) response_body, _status_code, _headers = get_room_member_count_with_http_info( room_id: room_id ) response_body end
Get number of users in a multi-person chat This requests to GET https://api.line.me/v2/bot/room/{roomId}/members/count
When you want to get HTTP status code or response headers, use {#get_room_member_count_with_http_info} instead of this.
@param room_id [String] Room ID @see developers.line.biz/en/reference/messaging-api/#get-members-room-count @return [Line::Bot::V2::MessagingApi::RoomMemberCountResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1771 def get_room_member_count_with_http_info( # steep:ignore MethodBodyTypeMismatch room_id: ) path = "/v2/bot/room/{roomId}/members/count" .gsub(/{roomId}/, room_id.to_s) response = @http_client.get( path: path, ) 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::RoomMemberCountResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Get number of users in a multi-person chat This requests to GET https://api.line.me/v2/bot/room/{roomId}/members/count
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param room_id [String] Room ID @see developers.line.biz/en/reference/messaging-api/#get-members-room-count @return [Array(Line::Bot::V2::MessagingApi::RoomMemberCountResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1855 def get_room_member_profile( room_id:, user_id: ) response_body, _status_code, _headers = get_room_member_profile_with_http_info( room_id: room_id, user_id: user_id ) response_body end
Get multi-person chat member profile This requests to GET https://api.line.me/v2/bot/room/{roomId}/member/{userId}
When you want to get HTTP status code or response headers, use {#get_room_member_profile_with_http_info} instead of this.
@param room_id [String] Room ID @param user_id [String] User ID @see developers.line.biz/en/reference/messaging-api/#get-room-member-profile @return [Line::Bot::V2::MessagingApi::RoomUserProfileResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1821 def get_room_member_profile_with_http_info( # steep:ignore MethodBodyTypeMismatch room_id:, user_id: ) path = "/v2/bot/room/{roomId}/member/{userId}" .gsub(/{roomId}/, room_id.to_s) .gsub(/{userId}/, user_id.to_s) response = @http_client.get( path: path, ) 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::RoomUserProfileResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Get multi-person chat member profile This requests to GET https://api.line.me/v2/bot/room/{roomId}/member/{userId}
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param room_id [String] Room ID @param user_id [String] User ID @see developers.line.biz/en/reference/messaging-api/#get-room-member-profile @return [Array(Line::Bot::V2::MessagingApi::RoomUserProfileResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1913 def get_room_members_ids( room_id:, start: nil ) response_body, _status_code, _headers = get_room_members_ids_with_http_info( room_id: room_id, start: start ) response_body end
Get multi-person chat member user IDs This requests to GET https://api.line.me/v2/bot/room/{roomId}/members/ids
When you want to get HTTP status code or response headers, use {#get_room_members_ids_with_http_info} instead of this.
@param room_id [String] Room ID @param start [String, nil] Value of the continuation token found in the ‘next` property of the JSON object returned in the response. Include this parameter to get the next array of user IDs for the members of the group. @see developers.line.biz/en/reference/messaging-api/#get-room-member-user-ids @return [Line::Bot::V2::MessagingApi::MembersIdsResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1876 def get_room_members_ids_with_http_info( # steep:ignore MethodBodyTypeMismatch room_id:, start: nil ) path = "/v2/bot/room/{roomId}/members/ids" .gsub(/{roomId}/, room_id.to_s) query_params = { "start": start }.compact response = @http_client.get( path: path, query_params: query_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::MembersIdsResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Get multi-person chat member user IDs This requests to GET https://api.line.me/v2/bot/room/{roomId}/members/ids
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param room_id [String] Room ID @param start [String, nil] Value of the continuation token found in the ‘next` property of the JSON object returned in the response. Include this parameter to get the next array of user IDs for the members of the group. @see developers.line.biz/en/reference/messaging-api/#get-room-member-user-ids @return [Array(Line::Bot::V2::MessagingApi::MembersIdsResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1960 def get_webhook_endpoint( ) response_body, _status_code, _headers = get_webhook_endpoint_with_http_info( ) response_body end
Get webhook endpoint information This requests to GET https://api.line.me/v2/bot/channel/webhook/endpoint
When you want to get HTTP status code or response headers, use {#get_webhook_endpoint_with_http_info} instead of this.
@see developers.line.biz/en/reference/messaging-api/#get-webhook-endpoint-information @return [Line::Bot::V2::MessagingApi::GetWebhookEndpointResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1932 def get_webhook_endpoint_with_http_info( # steep:ignore MethodBodyTypeMismatch ) path = "/v2/bot/channel/webhook/endpoint" response = @http_client.get( path: path, ) 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::GetWebhookEndpointResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Get webhook endpoint information This requests to GET https://api.line.me/v2/bot/channel/webhook/endpoint
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@see developers.line.biz/en/reference/messaging-api/#get-webhook-endpoint-information @return [Array(Line::Bot::V2::MessagingApi::GetWebhookEndpointResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2007 def issue_link_token( user_id: ) response_body, _status_code, _headers = issue_link_token_with_http_info( user_id: user_id ) response_body end
Issue link token This requests to POST https://api.line.me/v2/bot/user/{userId}/linkToken
When you want to get HTTP status code or response headers, use {#issue_link_token_with_http_info} instead of this.
@param user_id [String] User ID for the LINE account to be linked. Found in the ‘source` object of account link event objects. Do not use the LINE ID used in LINE. @see developers.line.biz/en/reference/messaging-api/#issue-link-token @return [Line::Bot::V2::MessagingApi::IssueLinkTokenResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 1976 def issue_link_token_with_http_info( # steep:ignore MethodBodyTypeMismatch user_id: ) path = "/v2/bot/user/{userId}/linkToken" .gsub(/{userId}/, user_id.to_s) response = @http_client.post( path: path, ) 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::IssueLinkTokenResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Issue link token This requests to POST https://api.line.me/v2/bot/user/{userId}/linkToken
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param user_id [String] User ID for the LINE account to be linked. Found in the ‘source` object of account link event objects. Do not use the LINE ID used in LINE. @see developers.line.biz/en/reference/messaging-api/#issue-link-token @return [Array(Line::Bot::V2::MessagingApi::IssueLinkTokenResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2069 def leave_group( group_id: ) response_body, _status_code, _headers = leave_group_with_http_info( group_id: group_id ) response_body end
Leave group chat This requests to POST https://api.line.me/v2/bot/group/{groupId}/leave
When you want to get HTTP status code or response headers, use {#leave_group_with_http_info} instead of this.
@param group_id [String] Group ID @see developers.line.biz/en/reference/messaging-api/#leave-group @return [String, nil] when HTTP status code is 200 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 404 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2027 def leave_group_with_http_info( # steep:ignore MethodBodyTypeMismatch group_id: ) path = "/v2/bot/group/{groupId}/leave" .gsub(/{groupId}/, group_id.to_s) response = @http_client.post( path: path, ) case response.code.to_i when 200 [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 404 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, 404, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Leave group chat This requests to POST https://api.line.me/v2/bot/group/{groupId}/leave
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param group_id [String] Group ID @see developers.line.biz/en/reference/messaging-api/#leave-group @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 400 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 404 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2113 def leave_room( room_id: ) response_body, _status_code, _headers = leave_room_with_http_info( room_id: room_id ) response_body end
Leave multi-person chat This requests to POST https://api.line.me/v2/bot/room/{roomId}/leave
When you want to get HTTP status code or response headers, use {#leave_room_with_http_info} instead of this.
@param room_id [String] Room ID @see developers.line.biz/en/reference/messaging-api/#leave-room @return [String, nil] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2087 def leave_room_with_http_info( # steep:ignore MethodBodyTypeMismatch room_id: ) path = "/v2/bot/room/{roomId}/leave" .gsub(/{roomId}/, room_id.to_s) response = @http_client.post( path: path, ) case response.code.to_i when 200 [response.body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Leave multi-person chat This requests to POST https://api.line.me/v2/bot/room/{roomId}/leave
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param room_id [String] Room ID @see developers.line.biz/en/reference/messaging-api/#leave-room @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2251 def mark_messages_as_read( mark_messages_as_read_request: ) response_body, _status_code, _headers = mark_messages_as_read_with_http_info( mark_messages_as_read_request: mark_messages_as_read_request ) response_body end
Mark messages from users as read This requests to POST https://api.line.me/v2/bot/message/markAsRead
When you want to get HTTP status code or response headers, use {#mark_messages_as_read_with_http_info} instead of this.
@param mark_messages_as_read_request [MarkMessagesAsReadRequest] @see developers.line.biz/en/reference/partner-docs/#mark-messages-from-users-as-read @return [String, nil] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2225 def mark_messages_as_read_with_http_info( # steep:ignore MethodBodyTypeMismatch mark_messages_as_read_request: ) path = "/v2/bot/message/markAsRead" response = @http_client.post( path: path, body_params: mark_messages_as_read_request, ) case response.code.to_i when 200 [response.body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Mark messages from users as read This requests to POST https://api.line.me/v2/bot/message/markAsRead
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param mark_messages_as_read_request [MarkMessagesAsReadRequest] @see developers.line.biz/en/reference/partner-docs/#mark-messages-from-users-as-read @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2338 def multicast( multicast_request:, x_line_retry_key: nil ) response_body, _status_code, _headers = multicast_with_http_info( multicast_request: multicast_request, x_line_retry_key: x_line_retry_key ) response_body end
An API that efficiently sends the same message to multiple user IDs. You can’t send messages to group chats or multi-person chats. This requests to POST https://api.line.me/v2/bot/message/multicast
When you want to get HTTP status code or response headers, use {#multicast_with_http_info} instead of this.
@param multicast_request [MulticastRequest] @param x_line_retry_key [String, nil] Retry key. Specifies the UUID in hexadecimal format (e.g., ‘123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn’t generated by LINE. Each developer must generate their own retry key. @see developers.line.biz/en/reference/messaging-api/#send-multicast-message @return [String, nil] when HTTP status code is 200 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 403 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 409 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 429 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2274 def multicast_with_http_info( # steep:ignore MethodBodyTypeMismatch multicast_request:, x_line_retry_key: nil ) path = "/v2/bot/message/multicast" header_params = { "X-Line-Retry-Key": x_line_retry_key }.compact response = @http_client.post( path: path, body_params: multicast_request, headers: header_params ) case response.code.to_i when 200 [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 403 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, 403, response.each_header.to_h] when 409 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, 409, 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
An API that efficiently sends the same message to multiple user IDs. You can’t send messages to group chats or multi-person chats. This requests to POST https://api.line.me/v2/bot/message/multicast
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param multicast_request [MulticastRequest] @param x_line_retry_key [String, nil] Retry key. Specifies the UUID in hexadecimal format (e.g., ‘123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn’t generated by LINE. Each developer must generate their own retry key. @see developers.line.biz/en/reference/messaging-api/#send-multicast-message @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 400 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 403 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 409 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 429 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2427 def narrowcast( narrowcast_request:, x_line_retry_key: nil ) response_body, _status_code, _headers = narrowcast_with_http_info( narrowcast_request: narrowcast_request, x_line_retry_key: x_line_retry_key ) response_body end
Send narrowcast message This requests to POST https://api.line.me/v2/bot/message/narrowcast
When you want to get HTTP status code or response headers, use {#narrowcast_with_http_info} instead of this.
@param narrowcast_request [NarrowcastRequest] @param x_line_retry_key [String, nil] Retry key. Specifies the UUID in hexadecimal format (e.g., ‘123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn’t generated by LINE. Each developer must generate their own retry key. @see developers.line.biz/en/reference/messaging-api/#send-narrowcast-message @return [String, nil] when HTTP status code is 202 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 403 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 409 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 429 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2363 def narrowcast_with_http_info( # steep:ignore MethodBodyTypeMismatch narrowcast_request:, x_line_retry_key: nil ) path = "/v2/bot/message/narrowcast" header_params = { "X-Line-Retry-Key": x_line_retry_key }.compact response = @http_client.post( path: path, body_params: narrowcast_request, headers: header_params ) case response.code.to_i when 202 [response.body, 202, 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 403 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, 403, response.each_header.to_h] when 409 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, 409, 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
Send narrowcast message This requests to POST https://api.line.me/v2/bot/message/narrowcast
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param narrowcast_request [NarrowcastRequest] @param x_line_retry_key [String, nil] Retry key. Specifies the UUID in hexadecimal format (e.g., ‘123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn’t generated by LINE. Each developer must generate their own retry key. @see developers.line.biz/en/reference/messaging-api/#send-narrowcast-message @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 202 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 400 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 403 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 409 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 429 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2521 def push_message( push_message_request:, x_line_retry_key: nil ) response_body, _status_code, _headers = push_message_with_http_info( push_message_request: push_message_request, x_line_retry_key: x_line_retry_key ) response_body end
Sends a message to a user, group chat, or multi-person chat at any time. This requests to POST https://api.line.me/v2/bot/message/push
When you want to get HTTP status code or response headers, use {#push_message_with_http_info} instead of this.
@param push_message_request [PushMessageRequest] @param x_line_retry_key [String, nil] Retry key. Specifies the UUID in hexadecimal format (e.g., ‘123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn’t generated by LINE. Each developer must generate their own retry key. @see developers.line.biz/en/reference/messaging-api/#send-push-message @return [Line::Bot::V2::MessagingApi::PushMessageResponse] when HTTP status code is 200 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 403 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 409 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 429 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2452 def push_message_with_http_info( # steep:ignore MethodBodyTypeMismatch push_message_request:, x_line_retry_key: nil ) path = "/v2/bot/message/push" header_params = { "X-Line-Retry-Key": x_line_retry_key }.compact response = @http_client.post( path: path, body_params: push_message_request, headers: header_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::PushMessageResponse.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 403 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, 403, response.each_header.to_h] when 409 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, 409, 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
Sends a message to a user, group chat, or multi-person chat at any time. This requests to POST https://api.line.me/v2/bot/message/push
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param push_message_request [PushMessageRequest] @param x_line_retry_key [String, nil] Retry key. Specifies the UUID in hexadecimal format (e.g., ‘123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn’t generated by LINE. Each developer must generate their own retry key. @see developers.line.biz/en/reference/messaging-api/#send-push-message @return [Array(Line::Bot::V2::MessagingApi::PushMessageResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 400 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 403 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 409 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 429 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2583 def push_messages_by_phone( pnp_messages_request:, x_line_delivery_tag: nil ) response_body, _status_code, _headers = push_messages_by_phone_with_http_info( pnp_messages_request: pnp_messages_request, x_line_delivery_tag: x_line_delivery_tag ) response_body end
Send LINE notification message This requests to POST https://api.line.me/bot/pnp/push
When you want to get HTTP status code or response headers, use {#push_messages_by_phone_with_http_info} instead of this.
@param pnp_messages_request [PnpMessagesRequest] @param x_line_delivery_tag [String, nil] String returned in the delivery.data property of the delivery completion event via Webhook
. @see developers.line.biz/en/reference/partner-docs/#send-line-notification-message @return [String, nil] when HTTP status code is 200 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 422 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2543 def push_messages_by_phone_with_http_info( # steep:ignore MethodBodyTypeMismatch pnp_messages_request:, x_line_delivery_tag: nil ) path = "/bot/pnp/push" header_params = { "X-Line-Delivery-Tag": x_line_delivery_tag }.compact response = @http_client.post( path: path, body_params: pnp_messages_request, headers: header_params ) case response.code.to_i when 200 [response.body, 200, response.each_header.to_h] when 422 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, 422, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Send LINE notification message This requests to POST https://api.line.me/bot/pnp/push
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param pnp_messages_request [PnpMessagesRequest] @param x_line_delivery_tag [String, nil] String returned in the delivery.data property of the delivery completion event via Webhook
. @see developers.line.biz/en/reference/partner-docs/#send-line-notification-message @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 422 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2652 def reply_message( reply_message_request: ) response_body, _status_code, _headers = reply_message_with_http_info( reply_message_request: reply_message_request ) response_body end
Send reply message This requests to POST https://api.line.me/v2/bot/message/reply
When you want to get HTTP status code or response headers, use {#reply_message_with_http_info} instead of this.
@param reply_message_request [ReplyMessageRequest] @see developers.line.biz/en/reference/messaging-api/#send-reply-message @return [Line::Bot::V2::MessagingApi::ReplyMessageResponse] when HTTP status code is 200 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 429 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2605 def reply_message_with_http_info( # steep:ignore MethodBodyTypeMismatch reply_message_request: ) path = "/v2/bot/message/reply" response = @http_client.post( path: path, body_params: reply_message_request, ) 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
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.
@param reply_message_request [ReplyMessageRequest] @see developers.line.biz/en/reference/messaging-api/#send-reply-message @return [Array(Line::Bot::V2::MessagingApi::ReplyMessageResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 400 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 429 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2784 def set_webhook_endpoint( set_webhook_endpoint_request: ) response_body, _status_code, _headers = set_webhook_endpoint_with_http_info( set_webhook_endpoint_request: set_webhook_endpoint_request ) response_body end
Set webhook endpoint URL This requests to PUT https://api.line.me/v2/bot/channel/webhook/endpoint
When you want to get HTTP status code or response headers, use {#set_webhook_endpoint_with_http_info} instead of this.
@param set_webhook_endpoint_request [SetWebhookEndpointRequest] @see developers.line.biz/en/reference/messaging-api/#set-webhook-endpoint-url @return [String, nil] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2758 def set_webhook_endpoint_with_http_info( # steep:ignore MethodBodyTypeMismatch set_webhook_endpoint_request: ) path = "/v2/bot/channel/webhook/endpoint" response = @http_client.put( path: path, body_params: set_webhook_endpoint_request, ) case response.code.to_i when 200 [response.body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Set webhook endpoint URL This requests to PUT https://api.line.me/v2/bot/channel/webhook/endpoint
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param set_webhook_endpoint_request [SetWebhookEndpointRequest] @see developers.line.biz/en/reference/messaging-api/#set-webhook-endpoint-url @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2837 def show_loading_animation( show_loading_animation_request: ) response_body, _status_code, _headers = show_loading_animation_with_http_info( show_loading_animation_request: show_loading_animation_request ) response_body end
Display a loading animation in one-on-one chats between users and LINE Official Accounts. This requests to POST https://api.line.me/v2/bot/chat/loading/start
When you want to get HTTP status code or response headers, use {#show_loading_animation_with_http_info} instead of this.
@param show_loading_animation_request [ShowLoadingAnimationRequest] @see developers.line.biz/en/reference/messaging-api/#display-a-loading-indicator @return [String, nil] when HTTP status code is 202 @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2803 def show_loading_animation_with_http_info( # steep:ignore MethodBodyTypeMismatch show_loading_animation_request: ) path = "/v2/bot/chat/loading/start" response = @http_client.post( path: path, body_params: show_loading_animation_request, ) case response.code.to_i when 202 [response.body, 202, 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] else [response.body, response.code.to_i, response.each_header.to_h] end end
Display a loading animation in one-on-one chats between users and LINE Official Accounts. This requests to POST https://api.line.me/v2/bot/chat/loading/start
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param show_loading_animation_request [ShowLoadingAnimationRequest] @see developers.line.biz/en/reference/messaging-api/#display-a-loading-indicator @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 202 @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse
, Integer, Hash{String => String})] when HTTP status code is 400 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2886 def test_webhook_endpoint( test_webhook_endpoint_request: nil ) response_body, _status_code, _headers = test_webhook_endpoint_with_http_info( test_webhook_endpoint_request: test_webhook_endpoint_request ) response_body end
Test webhook endpoint This requests to POST https://api.line.me/v2/bot/channel/webhook/test
When you want to get HTTP status code or response headers, use {#test_webhook_endpoint_with_http_info} instead of this.
@param test_webhook_endpoint_request [TestWebhookEndpointRequest, nil] @see developers.line.biz/en/reference/messaging-api/#test-webhook-endpoint @return [Line::Bot::V2::MessagingApi::TestWebhookEndpointResponse] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 2855 def test_webhook_endpoint_with_http_info( # steep:ignore MethodBodyTypeMismatch test_webhook_endpoint_request: nil ) path = "/v2/bot/channel/webhook/test" response = @http_client.post( path: path, body_params: test_webhook_endpoint_request, ) 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::TestWebhookEndpointResponse.create(json) # steep:ignore InsufficientKeywordArguments [response_body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Test webhook endpoint This requests to POST https://api.line.me/v2/bot/channel/webhook/test
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param test_webhook_endpoint_request [TestWebhookEndpointRequest, nil] @see developers.line.biz/en/reference/messaging-api/#test-webhook-endpoint @return [Array(Line::Bot::V2::MessagingApi::TestWebhookEndpointResponse
, Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 3077 def validate_broadcast( validate_message_request: ) response_body, _status_code, _headers = validate_broadcast_with_http_info( validate_message_request: validate_message_request ) response_body end
Validate message objects of a broadcast message This requests to POST https://api.line.me/v2/bot/message/validate/broadcast
When you want to get HTTP status code or response headers, use {#validate_broadcast_with_http_info} instead of this.
@param validate_message_request [ValidateMessageRequest] @see developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-broadcast-message @return [String, nil] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 3051 def validate_broadcast_with_http_info( # steep:ignore MethodBodyTypeMismatch validate_message_request: ) path = "/v2/bot/message/validate/broadcast" response = @http_client.post( path: path, body_params: validate_message_request, ) case response.code.to_i when 200 [response.body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Validate message objects of a broadcast message This requests to POST https://api.line.me/v2/bot/message/validate/broadcast
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param validate_message_request [ValidateMessageRequest] @see developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-broadcast-message @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 3121 def validate_multicast( validate_message_request: ) response_body, _status_code, _headers = validate_multicast_with_http_info( validate_message_request: validate_message_request ) response_body end
Validate message objects of a multicast message This requests to POST https://api.line.me/v2/bot/message/validate/multicast
When you want to get HTTP status code or response headers, use {#validate_multicast_with_http_info} instead of this.
@param validate_message_request [ValidateMessageRequest] @see developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-multicast-message @return [String, nil] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 3095 def validate_multicast_with_http_info( # steep:ignore MethodBodyTypeMismatch validate_message_request: ) path = "/v2/bot/message/validate/multicast" response = @http_client.post( path: path, body_params: validate_message_request, ) case response.code.to_i when 200 [response.body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Validate message objects of a multicast message This requests to POST https://api.line.me/v2/bot/message/validate/multicast
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param validate_message_request [ValidateMessageRequest] @see developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-multicast-message @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 3165 def validate_narrowcast( validate_message_request: ) response_body, _status_code, _headers = validate_narrowcast_with_http_info( validate_message_request: validate_message_request ) response_body end
Validate message objects of a narrowcast message This requests to POST https://api.line.me/v2/bot/message/validate/narrowcast
When you want to get HTTP status code or response headers, use {#validate_narrowcast_with_http_info} instead of this.
@param validate_message_request [ValidateMessageRequest] @see developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-narrowcast-message @return [String, nil] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 3139 def validate_narrowcast_with_http_info( # steep:ignore MethodBodyTypeMismatch validate_message_request: ) path = "/v2/bot/message/validate/narrowcast" response = @http_client.post( path: path, body_params: validate_message_request, ) case response.code.to_i when 200 [response.body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Validate message objects of a narrowcast message This requests to POST https://api.line.me/v2/bot/message/validate/narrowcast
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param validate_message_request [ValidateMessageRequest] @see developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-narrowcast-message @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 3209 def validate_push( validate_message_request: ) response_body, _status_code, _headers = validate_push_with_http_info( validate_message_request: validate_message_request ) response_body end
Validate message objects of a push message This requests to POST https://api.line.me/v2/bot/message/validate/push
When you want to get HTTP status code or response headers, use {#validate_push_with_http_info} instead of this.
@param validate_message_request [ValidateMessageRequest] @see developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-push-message @return [String, nil] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 3183 def validate_push_with_http_info( # steep:ignore MethodBodyTypeMismatch validate_message_request: ) path = "/v2/bot/message/validate/push" response = @http_client.post( path: path, body_params: validate_message_request, ) case response.code.to_i when 200 [response.body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Validate message objects of a push message This requests to POST https://api.line.me/v2/bot/message/validate/push
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param validate_message_request [ValidateMessageRequest] @see developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-push-message @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 3253 def validate_reply( validate_message_request: ) response_body, _status_code, _headers = validate_reply_with_http_info( validate_message_request: validate_message_request ) response_body end
Validate message objects of a reply message This requests to POST https://api.line.me/v2/bot/message/validate/reply
When you want to get HTTP status code or response headers, use {#validate_reply_with_http_info} instead of this.
@param validate_message_request [ValidateMessageRequest] @see developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-reply-message @return [String, nil] when HTTP status code is 200 @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
Source
# File lib/line/bot/v2/messaging_api/api/messaging_api_client.rb, line 3227 def validate_reply_with_http_info( # steep:ignore MethodBodyTypeMismatch validate_message_request: ) path = "/v2/bot/message/validate/reply" response = @http_client.post( path: path, body_params: validate_message_request, ) case response.code.to_i when 200 [response.body, 200, response.each_header.to_h] else [response.body, response.code.to_i, response.each_header.to_h] end end
Validate message objects of a reply message This requests to POST https://api.line.me/v2/bot/message/validate/reply
This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
@param validate_message_request [ValidateMessageRequest] @see developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-reply-message @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200 @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.