Class: Line::Bot::Client Deprecated
- Inherits:
-
Object
- Object
- Line::Bot::Client
- Defined in:
- lib/line/bot/v1/client.rb
Overview
This is deprecated. Please use one of the following instead:
API Client of LINE Bot SDK Ruby (deprecated)
@client ||= Line::Bot::Client.new do |config|
config.channel_id = ENV["LINE_CHANNEL_ID"]
config.channel_secret = ENV["LINE_CHANNEL_SECRET"]
config.channel_token = ENV["LINE_CHANNEL_TOKEN"]
end
Instance Attribute Summary collapse
-
#blob_endpoint ⇒ Object
@return [String].
-
#channel_id ⇒ Object
@return [String].
-
#channel_secret ⇒ Object
@return [String].
-
#channel_token ⇒ Object
@return [String].
-
#endpoint ⇒ Object
@return [String].
- #http_options ⇒ Hash
- #httpclient ⇒ Object
Instance Method Summary collapse
- #broadcast(messages, headers: {}) ⇒ Net::HTTPResponse deprecated Deprecated.
- #bulk_link_rich_menus(user_ids, rich_menu_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #bulk_unlink_rich_menus(user_ids) ⇒ Net::HTTPResponse deprecated Deprecated.
- #create_click_audience(params) ⇒ Net::HTTPResponse deprecated Deprecated.
- #create_impression_audience(params) ⇒ Net::HTTPResponse deprecated Deprecated.
- #create_liff_app(app) ⇒ Object deprecated Deprecated.
- #create_link_token(user_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #create_rich_menu(rich_menu) ⇒ Net::HTTPResponse deprecated Deprecated.
- #create_rich_menu_image(rich_menu_id, file) ⇒ Net::HTTPResponse deprecated Deprecated.
- #create_user_id_audience(params) ⇒ Net::HTTPResponse deprecated Deprecated.
- #credentials ⇒ Hash
- #delete(endpoint_base, endpoint_path, headers = {}) ⇒ Net::HTTPResponse deprecated Deprecated.
- #delete_audience(audience_group_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #delete_liff_app(liff_id) ⇒ Object deprecated Deprecated.
- #delete_rich_menu(rich_menu_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get(endpoint_base, endpoint_path, headers = {}) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_aggregation_info ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_aggregation_list(limit: nil, start: nil) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_audience(audience_group_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_audience_authority_level ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_audiences(params) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_bot_info ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_channel_access_token_key_ids_jwt(jwt) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_default_rich_menu ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_delivery_result_sent_by_phone_numbers(date) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_follower_ids(deprecated_continuation_token = nil, start: nil, limit: nil) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_friend_demographics ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_group_member_ids(group_id, continuation_token = nil) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_group_member_profile(group_id, user_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_group_members_count(group_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_group_summary(group_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_liff_apps ⇒ Object deprecated Deprecated.
- #get_message_content(identifier) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_message_delivery_broadcast(date) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_message_delivery_multicast(date) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_message_delivery_pnp(date) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_message_delivery_push(date) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_message_delivery_reply(date) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_narrowcast_message_status(request_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_number_of_followers(date) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_number_of_message_deliveries(date) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_profile(user_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_profile_by_access_token(access_token) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_quota ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_quota_consumption ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_rich_menu(rich_menu_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_rich_menu_image(rich_menu_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_rich_menus ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_rich_menus_alias(rich_menu_alias_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_rich_menus_alias_list ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_room_member_ids(room_id, continuation_token = nil) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_room_member_profile(room_id, user_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_room_members_count(room_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_statistics_per_unit(unit:, from:, to:) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_user_interaction_statistics(request_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_user_rich_menu(user_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #get_webhook_endpoint ⇒ Net::HTTPResponse deprecated Deprecated.
- #initialize(options = {}) {|_self| ... } ⇒ Line::Bot::Client constructor deprecated Deprecated.
- #issue_channel_access_token_jwt(jwt) ⇒ Net::HTTPResponse deprecated Deprecated.
- #issue_channel_token(grant_type = 'client_credentials') ⇒ Net::HTTPResponse deprecated Deprecated.
- #leave_group(group_id) ⇒ Object deprecated Deprecated.
- #leave_room(room_id) ⇒ Object deprecated Deprecated.
- #liff_endpoint ⇒ Object
- #link_user_rich_menu(user_id, rich_menu_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #multicast(to, messages, headers: {}, payload: {}) ⇒ Net::HTTPResponse deprecated Deprecated.
- #multicast_by_phone_numbers(to, messages, headers: {}, payload: {}) ⇒ Net::HTTPResponse deprecated Deprecated.
- #narrowcast(messages, recipient: nil, filter: nil, limit: nil, headers: {}) ⇒ Net::HTTPResponse deprecated Deprecated.
- #oauth_endpoint ⇒ Object
- #parse_events_from(request_body) ⇒ Array<Line::Bot::Event::Class> deprecated Deprecated.
- #post(endpoint_base, endpoint_path, payload = nil, headers = {}) ⇒ Net::HTTPResponse deprecated Deprecated.
- #push_message(user_id, messages, headers: {}, payload: {}) ⇒ Net::HTTPResponse deprecated Deprecated.
- #push_pnp(hashed_phone_number, messages, headers: {}, payload: {}) ⇒ Net::HTTPResponse deprecated Deprecated.
- #put(endpoint_base, endpoint_path, payload = nil, headers = {}) ⇒ Net::HTTPResponse deprecated Deprecated.
- #rename_audience(audience_group_id, description) ⇒ Net::HTTPResponse deprecated Deprecated.
- #reply_message(token, messages) ⇒ Net::HTTPResponse deprecated Deprecated.
- #revoke_channel_access_token_jwt(access_token) ⇒ Net::HTTPResponse deprecated Deprecated.
- #revoke_channel_token(access_token) ⇒ Net::HTTPResponse deprecated Deprecated.
- #set_default_rich_menu(rich_menu_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #set_rich_menus_alias(rich_menu_id, rich_menu_alias_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #set_webhook_endpoint(webhook_endpoint) ⇒ Net::HTTPResponse deprecated Deprecated.
- #test_webhook_endpoint(webhook_endpoint = nil) ⇒ Net::HTTPResponse deprecated Deprecated.
- #unlink_user_rich_menu(user_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #unset_default_rich_menu ⇒ Net::HTTPResponse deprecated Deprecated.
- #unset_rich_menus_alias(rich_menu_alias_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #update_audience_authority_level(authority_level) ⇒ Net::HTTPResponse deprecated Deprecated.
- #update_liff_app(liff_id, app) ⇒ Object deprecated Deprecated.
- #update_rich_menus_alias(rich_menu_id, rich_menu_alias_id) ⇒ Net::HTTPResponse deprecated Deprecated.
- #update_user_id_audience(params) ⇒ Net::HTTPResponse deprecated Deprecated.
- #validate_broadcast_message_objects(messages) ⇒ Net::HTTPResponse deprecated Deprecated.
- #validate_multicast_message_objects(messages) ⇒ Net::HTTPResponse deprecated Deprecated.
- #validate_narrowcast_message_objects(messages) ⇒ Net::HTTPResponse deprecated Deprecated.
- #validate_push_message_objects(messages) ⇒ Net::HTTPResponse deprecated Deprecated.
- #validate_reply_message_objects(messages) ⇒ Net::HTTPResponse deprecated Deprecated.
- #validate_rich_menu_object(rich_menu) ⇒ Net::HTTPResponse deprecated Deprecated.
- #validate_signature(content, channel_signature) ⇒ Boolean deprecated Deprecated.
- #verify_access_token(access_token) ⇒ Net::HTTPResponse deprecated Deprecated.
- #verify_id_token(id_token, nonce: nil, user_id: nil) ⇒ Net::HTTPResponse deprecated Deprecated.
Constructor Details
#initialize(options = {}) {|_self| ... } ⇒ Line::Bot::Client
This is deprecated. Please use one of the following instead:
Initialize a new client.
62 63 64 65 66 67 |
# File 'lib/line/bot/v1/client.rb', line 62 def initialize( = {}) .each do |key, value| instance_variable_set("@#{key}", value) end yield(self) if block_given? end |
Instance Attribute Details
#blob_endpoint ⇒ Object
@return [String]
40 41 42 |
# File 'lib/line/bot/v1/client.rb', line 40 def blob_endpoint @blob_endpoint end |
#channel_id ⇒ Object
@return [String]
40 41 42 |
# File 'lib/line/bot/v1/client.rb', line 40 def channel_id @channel_id end |
#channel_secret ⇒ Object
@return [String]
40 41 42 |
# File 'lib/line/bot/v1/client.rb', line 40 def channel_secret @channel_secret end |
#channel_token ⇒ Object
@return [String]
40 41 42 |
# File 'lib/line/bot/v1/client.rb', line 40 def channel_token @channel_token end |
#endpoint ⇒ Object
@return [String]
40 41 42 |
# File 'lib/line/bot/v1/client.rb', line 40 def endpoint @endpoint end |
#http_options ⇒ Hash
46 47 48 |
# File 'lib/line/bot/v1/client.rb', line 46 def @http_options end |
#httpclient ⇒ Object
43 44 45 |
# File 'lib/line/bot/v1/client.rb', line 43 def httpclient @httpclient end |
Instance Method Details
#broadcast(messages, headers: {}) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#broadcast instead.
Send messages to all friends.
370 371 372 373 374 375 376 377 378 379 380 |
# File 'lib/line/bot/v1/client.rb', line 370 def broadcast(, headers: {}) warn '[DEPRECATION] `Line::Bot::Client#broadcast` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#broadcast` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required = [] if .is_a?(Hash) endpoint_path = '/bot/message/broadcast' payload = { messages: }.to_json post(endpoint, endpoint_path, payload, credentials.merge(headers)) end |
#bulk_link_rich_menus(user_ids, rich_menu_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#link_rich_menu_id_to_users instead.
To link a rich menu to multiple users at a time
1099 1100 1101 1102 1103 1104 1105 1106 |
# File 'lib/line/bot/v1/client.rb', line 1099 def (user_ids, ) warn '[DEPRECATION] `Line::Bot::Client#bulk_link_rich_menus` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#link_rich_menu_id_to_users` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/richmenu/bulk/link" post(endpoint, endpoint_path, { richMenuId: , userIds: user_ids }.to_json, credentials) end |
#bulk_unlink_rich_menus(user_ids) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#unlink_rich_menu_id_from_users instead.
To unlink a rich menu from multiple users at a time
1117 1118 1119 1120 1121 1122 1123 1124 |
# File 'lib/line/bot/v1/client.rb', line 1117 def (user_ids) warn '[DEPRECATION] `Line::Bot::Client#bulk_unlink_rich_menus` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#unlink_rich_menu_id_from_users` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/richmenu/bulk/unlink" post(endpoint, endpoint_path, { userIds: user_ids }.to_json, credentials) end |
#create_click_audience(params) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::ManageAudience::ApiClient#create_click_based_audience_group instead.
Create an audience group of users that clicked a URL in a message sent in the past
Parameters are described here. developers.line.biz/en/reference/messaging-api/#create-click-audience-group
1464 1465 1466 1467 1468 1469 1470 1471 |
# File 'lib/line/bot/v1/client.rb', line 1464 def create_click_audience(params) warn '[DEPRECATION] `Line::Bot::Client#create_click_audience` is deprecated. Please use `Line::Bot::V2::ManageAudience::ApiClient#create_click_based_audience_group` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = '/bot/audienceGroup/click' post(endpoint, endpoint_path, params.to_json, credentials) end |
#create_impression_audience(params) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::ManageAudience::ApiClient#create_imp_based_audience_group instead.
Create an audience group of users that opened a message sent in the past
Parameters are described here. developers.line.biz/en/reference/messaging-api/#create-imp-audience-group
1485 1486 1487 1488 1489 1490 1491 1492 |
# File 'lib/line/bot/v1/client.rb', line 1485 def create_impression_audience(params) warn '[DEPRECATION] `Line::Bot::Client#create_impression_audience` is deprecated. Please use `Line::Bot::V2::ManageAudience::ApiClient#create_imp_based_audience_group` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = '/bot/audienceGroup/imp' post(endpoint, endpoint_path, params.to_json, credentials) end |
#create_liff_app(app) ⇒ Object
This is deprecated. Please use V2::Liff::ApiClient#add_liff_app instead.
1375 1376 1377 1378 1379 1380 1381 1382 |
# File 'lib/line/bot/v1/client.rb', line 1375 def create_liff_app(app) warn '[DEPRECATION] `Line::Bot::Client#create_liff_app` is deprecated. Please use `Line::Bot::V2::Liff::ApiClient#add_liff_app` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = '/apps' post(liff_endpoint, endpoint_path, app.to_json, credentials) end |
#create_link_token(user_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#issue_link_token instead.
Issue a link token to a user
1173 1174 1175 1176 1177 1178 1179 1180 |
# File 'lib/line/bot/v1/client.rb', line 1173 def create_link_token(user_id) warn '[DEPRECATION] `Line::Bot::Client#create_link_token` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#issue_link_token` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/user/#{user_id}/linkToken" post(endpoint, endpoint_path, nil, credentials) end |
#create_rich_menu(rich_menu) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#create_rich_menu instead.
Create a rich menu
846 847 848 849 850 851 852 853 |
# File 'lib/line/bot/v1/client.rb', line 846 def () warn '[DEPRECATION] `Line::Bot::Client#create_rich_menu` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#create_rich_menu` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = '/bot/richmenu' post(endpoint, endpoint_path, .to_json, credentials) end |
#create_rich_menu_image(rich_menu_id, file) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiBlobClient#set_rich_menu_image instead.
Upload and attaches an image to a rich menu
1154 1155 1156 1157 1158 1159 1160 1161 1162 |
# File 'lib/line/bot/v1/client.rb', line 1154 def (, file) warn '[DEPRECATION] `Line::Bot::Client#create_rich_menu_image` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiBlobClient#set_rich_menu_image` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/richmenu/#{}/content" headers = credentials.merge('Content-Type' => content_type(file)) post(blob_endpoint, endpoint_path, file.rewind && file.read, headers) end |
#create_user_id_audience(params) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::ManageAudience::ApiClient#create_audience_group instead.
Create an audience group by uploading user_ids
Parameters are described here. developers.line.biz/en/reference/messaging-api/#create-upload-audience-group
1422 1423 1424 1425 1426 1427 1428 1429 |
# File 'lib/line/bot/v1/client.rb', line 1422 def create_user_id_audience(params) warn '[DEPRECATION] `Line::Bot::Client#create_user_id_audience` is deprecated. Please use `Line::Bot::V2::ManageAudience::ApiClient#create_audience_group` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = '/bot/audienceGroup/upload' post(endpoint, endpoint_path, params.to_json, credentials) end |
#credentials ⇒ Hash
97 98 99 100 101 |
# File 'lib/line/bot/v1/client.rb', line 97 def credentials { "Authorization" => "Bearer #{channel_token}", } end |
#delete(endpoint_base, endpoint_path, headers = {}) ⇒ Net::HTTPResponse
This is obsolete. You may use V2::HttpClient#delete instead, but it is not recommended.
Delete content of specified URL.
1835 1836 1837 1838 |
# File 'lib/line/bot/v1/client.rb', line 1835 def delete(endpoint_base, endpoint_path, headers = {}) headers = API::DEFAULT_HEADERS.merge(headers) httpclient.delete(endpoint_base + endpoint_path, headers) end |
#delete_audience(audience_group_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::ManageAudience::ApiClient#delete_audience_group instead.
Delete an existing audience group
Parameters are described here. developers.line.biz/en/reference/messaging-api/#delete-audience-group
1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'lib/line/bot/v1/client.rb', line 1526 def delete_audience(audience_group_id) warn '[DEPRECATION] `Line::Bot::Client#delete_audience` is deprecated. Please use `Line::Bot::V2::ManageAudience::ApiClient#delete_audience_group` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/audienceGroup/#{audience_group_id}" delete(endpoint, endpoint_path, credentials) end |
#delete_liff_app(liff_id) ⇒ Object
This is deprecated. Please use V2::Liff::ApiClient#delete_liff_app instead.
1401 1402 1403 1404 1405 1406 1407 1408 |
# File 'lib/line/bot/v1/client.rb', line 1401 def delete_liff_app(liff_id) warn '[DEPRECATION] `Line::Bot::Client#delete_liff_app` is deprecated. Please use `Line::Bot::V2::Liff::ApiClient#delete_liff_app` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/apps/#{liff_id}" delete(liff_endpoint, endpoint_path, credentials) end |
#delete_rich_menu(rich_menu_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#delete_rich_menu instead.
Delete a rich menu
882 883 884 885 886 887 888 889 |
# File 'lib/line/bot/v1/client.rb', line 882 def () warn '[DEPRECATION] `Line::Bot::Client#delete_rich_menu` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#delete_rich_menu` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/richmenu/#{}" delete(endpoint, endpoint_path, credentials) end |
#get(endpoint_base, endpoint_path, headers = {}) ⇒ Net::HTTPResponse
This is obsolete. You may use V2::HttpClient#get instead, but it is not recommended.
Fetch data, get content of specified URL.
1785 1786 1787 1788 |
# File 'lib/line/bot/v1/client.rb', line 1785 def get(endpoint_base, endpoint_path, headers = {}) headers = API::DEFAULT_HEADERS.merge(headers) httpclient.get(endpoint_base + endpoint_path, headers) end |
#get_aggregation_info ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_aggregation_unit_usage instead.
Get the number of aggregation units used this month.
1644 1645 1646 1647 1648 1649 1650 1651 |
# File 'lib/line/bot/v1/client.rb', line 1644 def get_aggregation_info warn '[DEPRECATION] `Line::Bot::Client#get_aggregation_info` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_aggregation_unit_usage` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/message/aggregation/info" get(endpoint, endpoint_path, credentials) end |
#get_aggregation_list(limit: nil, start: nil) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_aggregation_unit_name_list instead.
Get the name list of units used this month for statistics aggregation.
1663 1664 1665 1666 1667 1668 1669 1670 1671 |
# File 'lib/line/bot/v1/client.rb', line 1663 def get_aggregation_list(limit: nil, start: nil) warn '[DEPRECATION] `Line::Bot::Client#get_aggregation_list` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_aggregation_unit_name_list` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required params = {limit: limit, start: start}.compact endpoint_path = "/bot/message/aggregation/list?" + URI.encode_www_form(params) get(endpoint, endpoint_path, credentials) end |
#get_audience(audience_group_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::ManageAudience::ApiClient#get_audience_data instead.
Get audience group data
Parameters are described here. developers.line.biz/en/reference/messaging-api/#get-audience-group
1547 1548 1549 1550 1551 1552 1553 1554 |
# File 'lib/line/bot/v1/client.rb', line 1547 def get_audience(audience_group_id) warn '[DEPRECATION] `Line::Bot::Client#get_audience` is deprecated. Please use `Line::Bot::V2::ManageAudience::ApiClient#get_audience_data` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/audienceGroup/#{audience_group_id}" get(endpoint, endpoint_path, credentials) end |
#get_audience_authority_level ⇒ Net::HTTPResponse
This is obsolete.
Get the authority level of the audience
Parameters are described here. developers.line.biz/en/reference/messaging-api/#get-authority-level
1586 1587 1588 1589 1590 1591 1592 1593 |
# File 'lib/line/bot/v1/client.rb', line 1586 def warn '[DEPRECATION] `Line::Bot::Client#get_audience_authority_level` is obsolete.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/audienceGroup/authorityLevel" get(endpoint, endpoint_path, credentials) end |
#get_audiences(params) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::ManageAudience::ApiClient#get_audience_groups instead.
Get data for more than one audience group
Parameters are described here. developers.line.biz/en/reference/messaging-api/#get-audience-groups
1568 1569 1570 1571 1572 1573 1574 1575 |
# File 'lib/line/bot/v1/client.rb', line 1568 def get_audiences(params) warn '[DEPRECATION] `Line::Bot::Client#get_audiences` is deprecated. Please use `Line::Bot::V2::ManageAudience::ApiClient#get_audience_groups` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/audienceGroup/list?" + URI.encode_www_form(params) get(endpoint, endpoint_path, credentials) end |
#get_bot_info ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_bot_info instead.
Gets a bot’s basic information.
1291 1292 1293 1294 1295 1296 1297 1298 |
# File 'lib/line/bot/v1/client.rb', line 1291 def get_bot_info warn '[DEPRECATION] `Line::Bot::Client#get_bot_info` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_bot_info` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = '/bot/info' get(endpoint, endpoint_path, credentials) end |
#get_channel_access_token_key_ids_jwt(jwt) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::ChannelAccessToken::ApiClient#gets_all_valid_channel_access_token_key_ids instead.
Get all valid channel access token key IDs v2.1
246 247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/line/bot/v1/client.rb', line 246 def get_channel_access_token_key_ids_jwt(jwt) warn '[DEPRECATION] `Line::Bot::Client#get_channel_access_token_key_ids_jwt` is deprecated. Please use `Line::Bot::V2::ChannelAccessToken::ApiClient#gets_all_valid_channel_access_token_key_ids` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] payload = URI.encode_www_form( client_assertion_type: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer', client_assertion: jwt ) endpoint_path = "/oauth2/v2.1/tokens/kid?#{payload}" headers = { 'Content-Type' => 'application/x-www-form-urlencoded' } get(oauth_endpoint, endpoint_path, headers) end |
#get_default_rich_menu ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_default_rich_menu_id instead.
Get default rich menu
916 917 918 919 920 921 922 923 |
# File 'lib/line/bot/v1/client.rb', line 916 def warn '[DEPRECATION] `Line::Bot::Client#get_default_rich_menu` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_default_rich_menu_id` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = '/bot/user/all/richmenu' get(endpoint, endpoint_path, credentials) end |
#get_delivery_result_sent_by_phone_numbers(date) ⇒ Net::HTTPResponse
This is obsolete.
Get the delivery result of the message delivered in Send message using phone number. (#multicast_by_phone_numbers)
1723 1724 1725 1726 1727 1728 1729 1730 |
# File 'lib/line/bot/v1/client.rb', line 1723 def get_delivery_result_sent_by_phone_numbers(date) warn '[DEPRECATION] `Line::Bot::Client#get_delivery_result_sent_by_phone_numbers` is obsolete.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/message/delivery/ad_phone?date=#{date}" get(endpoint, endpoint_path, credentials) end |
#get_follower_ids(deprecated_continuation_token = nil, start: nil, limit: nil) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_followers instead.
Get user IDs of who added your LINE Official Account as a friend
523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/line/bot/v1/client.rb', line 523 def get_follower_ids(deprecated_continuation_token = nil, start: nil, limit: nil) warn '[DEPRECATION] `Line::Bot::Client#get_follower_ids` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_followers` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required if deprecated_continuation_token warn "continuation_token as the first argument is deprecated. Please use :start instead." start = deprecated_continuation_token end params = { start: start, limit: limit }.compact endpoint_path = "/bot/followers/ids" endpoint_path += "?" + URI.encode_www_form(params) unless params.empty? get(endpoint, endpoint_path, credentials) end |
#get_friend_demographics ⇒ Net::HTTPResponse
This is deprecated. Please use V2::Insight::ApiClient#get_friends_demographics instead.
Get the demographic attributes for a bot’s friends.
1275 1276 1277 1278 1279 1280 1281 1282 |
# File 'lib/line/bot/v1/client.rb', line 1275 def get_friend_demographics warn '[DEPRECATION] `Line::Bot::Client#get_friend_demographics` is deprecated. Please use `Line::Bot::V2::Insight::ApiClient#get_friends_demographics` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = '/bot/insight/demographic' get(endpoint, endpoint_path, credentials) end |
#get_group_member_ids(group_id, continuation_token = nil) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_group_members_ids instead.
Get user IDs of a group
551 552 553 554 555 556 557 558 559 |
# File 'lib/line/bot/v1/client.rb', line 551 def get_group_member_ids(group_id, continuation_token = nil) warn '[DEPRECATION] `Line::Bot::Client#get_group_member_ids` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_group_members_ids` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/group/#{group_id}/members/ids" endpoint_path += "?start=#{continuation_token}" if continuation_token get(endpoint, endpoint_path, credentials) end |
#get_group_member_profile(group_id, user_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_group_member_profile instead.
Get an user’s profile of a group.
485 486 487 488 489 490 491 492 |
# File 'lib/line/bot/v1/client.rb', line 485 def get_group_member_profile(group_id, user_id) warn '[DEPRECATION] `Line::Bot::Client#get_group_member_profile` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_group_member_profile` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/group/#{group_id}/member/#{user_id}" get(endpoint, endpoint_path, credentials) end |
#get_group_members_count(group_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_group_member_count instead.
Gets the user IDs of the members of a group that the bot is in.
609 610 611 612 613 614 615 616 |
# File 'lib/line/bot/v1/client.rb', line 609 def get_group_members_count(group_id) warn '[DEPRECATION] `Line::Bot::Client#get_group_members_count` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_group_member_count` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/group/#{group_id}/members/count" get(endpoint, endpoint_path, credentials) end |
#get_group_summary(group_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_group_summary instead.
Gets the group ID, group name, and group icon URL of a group where the LINE Official Account is a member.
591 592 593 594 595 596 597 598 |
# File 'lib/line/bot/v1/client.rb', line 591 def get_group_summary(group_id) warn '[DEPRECATION] `Line::Bot::Client#get_group_summary` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_group_summary` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/group/#{group_id}/summary" get(endpoint, endpoint_path, credentials) end |
#get_liff_apps ⇒ Object
This is deprecated. Please use V2::Liff::ApiClient#get_all_liff_apps instead.
1362 1363 1364 1365 1366 1367 1368 1369 |
# File 'lib/line/bot/v1/client.rb', line 1362 def get_liff_apps warn '[DEPRECATION] `Line::Bot::Client#get_liff_apps` is deprecated. Please use `Line::Bot::V2::Liff::ApiClient#get_all_liff_apps` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = '/apps' get(liff_endpoint, endpoint_path, credentials) end |
#get_message_content(identifier) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiBlobClient#get_message_content instead.
Get message content.
449 450 451 452 453 454 455 456 |
# File 'lib/line/bot/v1/client.rb', line 449 def (identifier) warn '[DEPRECATION] `Line::Bot::Client#get_message_content` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiBlobClient#get_message_content` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/message/#{identifier}/content" get(blob_endpoint, endpoint_path, credentials) end |
#get_message_delivery_broadcast(date) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_number_of_sent_broadcast_messages instead.
Gets the number of messages sent with the /bot/message/multicast endpoint.
733 734 735 736 737 738 739 740 |
# File 'lib/line/bot/v1/client.rb', line 733 def (date) warn '[DEPRECATION] `Line::Bot::Client#get_message_delivery_broadcast` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_number_of_sent_broadcast_messages` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/message/delivery/broadcast?date=#{date}" get(endpoint, endpoint_path, credentials) end |
#get_message_delivery_multicast(date) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_number_of_sent_multicast_messages instead.
Gets the number of messages sent with the /bot/message/multicast endpoint.
715 716 717 718 719 720 721 722 |
# File 'lib/line/bot/v1/client.rb', line 715 def (date) warn '[DEPRECATION] `Line::Bot::Client#get_message_delivery_multicast` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_number_of_sent_multicast_messages` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/message/delivery/multicast?date=#{date}" get(endpoint, endpoint_path, credentials) end |
#get_message_delivery_pnp(date) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_pnp_message_statistics instead.
Get the number of LINE notification messages sent using the /bot/pnp/push endpoint.
1765 1766 1767 1768 1769 1770 1771 1772 |
# File 'lib/line/bot/v1/client.rb', line 1765 def (date) warn '[DEPRECATION] `Line::Bot::Client#get_message_delivery_pnp` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_pnp_message_statistics` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/message/delivery/pnp?date=#{date}" get(endpoint, endpoint_path, credentials) end |
#get_message_delivery_push(date) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_message_delivery_push instead.
Gets the number of messages sent with the /bot/message/push endpoint.
697 698 699 700 701 702 703 704 |
# File 'lib/line/bot/v1/client.rb', line 697 def (date) warn '[DEPRECATION] `Line::Bot::Client#get_message_delivery_push` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_message_delivery_push` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/message/delivery/push?date=#{date}" get(endpoint, endpoint_path, credentials) end |
#get_message_delivery_reply(date) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_number_of_sent_reply_messages instead.
Gets the number of messages sent with the /bot/message/reply endpoint.
679 680 681 682 683 684 685 686 |
# File 'lib/line/bot/v1/client.rb', line 679 def (date) warn '[DEPRECATION] `Line::Bot::Client#get_message_delivery_reply` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_number_of_sent_reply_messages` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/message/delivery/reply?date=#{date}" get(endpoint, endpoint_path, credentials) end |
#get_narrowcast_message_status(request_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_narrowcast_progress instead.
Gets the status of a narrowcast message.
1682 1683 1684 1685 1686 1687 1688 1689 |
# File 'lib/line/bot/v1/client.rb', line 1682 def (request_id) warn '[DEPRECATION] `Line::Bot::Client#get_narrowcast_message_status` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_narrowcast_progress` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/message/progress/narrowcast?requestId=#{request_id}" get(endpoint, endpoint_path, credentials) end |
#get_number_of_followers(date) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::Insight::ApiClient#get_number_of_followers instead.
Returns the number of followers
1259 1260 1261 1262 1263 1264 1265 1266 |
# File 'lib/line/bot/v1/client.rb', line 1259 def get_number_of_followers(date) warn '[DEPRECATION] `Line::Bot::Client#get_number_of_followers` is deprecated. Please use `Line::Bot::V2::Insight::ApiClient#get_number_of_followers` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/insight/followers?date=#{date}" get(endpoint, endpoint_path, credentials) end |
#get_number_of_message_deliveries(date) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::Insight::ApiClient#get_number_of_message_deliveries instead.
Returns the number of messages sent on a specified day
1223 1224 1225 1226 1227 1228 1229 1230 |
# File 'lib/line/bot/v1/client.rb', line 1223 def (date) warn '[DEPRECATION] `Line::Bot::Client#get_number_of_message_deliveries` is deprecated. Please use `Line::Bot::V2::Insight::ApiClient#get_number_of_message_deliveries` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/insight/message/delivery?date=#{date}" get(endpoint, endpoint_path, credentials) end |
#get_profile(user_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_profile instead.
Get an user’s profile.
466 467 468 469 470 471 472 473 |
# File 'lib/line/bot/v1/client.rb', line 466 def get_profile(user_id) warn '[DEPRECATION] `Line::Bot::Client#get_profile` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_profile` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/profile/#{user_id}" get(endpoint, endpoint_path, credentials) end |
#get_profile_by_access_token(access_token) ⇒ Net::HTTPResponse
This is obsolete.
Get user profile by access token
267 268 269 270 271 272 273 274 275 |
# File 'lib/line/bot/v1/client.rb', line 267 def get_profile_by_access_token(access_token) warn '[DEPRECATION] `Line::Bot::Client#get_profile_by_access_token` is obsolete. (LINE Login feature, not bot feature)' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] headers = { "Authorization" => "Bearer #{access_token}", } endpoint_path = "/v2/profile" get(oauth_endpoint, endpoint_path, headers) end |
#get_quota ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_message_quota instead.
Get the target limit for additional messages
1189 1190 1191 1192 1193 1194 1195 1196 |
# File 'lib/line/bot/v1/client.rb', line 1189 def get_quota warn '[DEPRECATION] `Line::Bot::Client#get_quota` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_message_quota` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/message/quota" get(endpoint, endpoint_path, credentials) end |
#get_quota_consumption ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_message_quota_consumption instead.
Get number of messages sent this month
1205 1206 1207 1208 1209 1210 1211 1212 |
# File 'lib/line/bot/v1/client.rb', line 1205 def get_quota_consumption warn '[DEPRECATION] `Line::Bot::Client#get_quota_consumption` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_message_quota_consumption` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/message/quota/consumption" get(endpoint, endpoint_path, credentials) end |
#get_rich_menu(rich_menu_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_rich_menu instead.
Get a rich menu via a rich menu ID
661 662 663 664 665 666 667 668 |
# File 'lib/line/bot/v1/client.rb', line 661 def () warn '[DEPRECATION] `Line::Bot::Client#get_rich_menu` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_rich_menu` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/richmenu/#{}" get(endpoint, endpoint_path, credentials) end |
#get_rich_menu_image(rich_menu_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiBlobClient#get_rich_menu_image instead.
Download an image associated with a rich menu
1135 1136 1137 1138 1139 1140 1141 1142 |
# File 'lib/line/bot/v1/client.rb', line 1135 def () warn '[DEPRECATION] `Line::Bot::Client#get_rich_menu_image` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiBlobClient#get_rich_menu_image` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/richmenu/#{}/content" get(blob_endpoint, endpoint_path, credentials) end |
#get_rich_menus ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_rich_menu_list instead.
Get a list of all uploaded rich menus
643 644 645 646 647 648 649 650 |
# File 'lib/line/bot/v1/client.rb', line 643 def warn '[DEPRECATION] `Line::Bot::Client#get_rich_menus` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_rich_menu_list` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = '/bot/richmenu/list' get(endpoint, endpoint_path, credentials) end |
#get_rich_menus_alias(rich_menu_alias_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_rich_menu_alias instead.
Get a rich menu alias via a rich menu alias ID
1024 1025 1026 1027 1028 1029 1030 1031 |
# File 'lib/line/bot/v1/client.rb', line 1024 def () warn '[DEPRECATION] `Line::Bot::Client#get_rich_menus_alias` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_rich_menu_alias` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/richmenu/alias/#{}" get(endpoint, endpoint_path, credentials) end |
#get_rich_menus_alias_list ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_rich_menu_alias_list instead.
Get a list of all uploaded rich menus alias
1040 1041 1042 1043 1044 1045 1046 1047 |
# File 'lib/line/bot/v1/client.rb', line 1040 def warn '[DEPRECATION] `Line::Bot::Client#get_rich_menus_alias_list` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_rich_menu_alias_list` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/richmenu/alias/list" get(endpoint, endpoint_path, credentials) end |
#get_room_member_ids(room_id, continuation_token = nil) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_room_members_ids instead.
Get user IDs of a room
572 573 574 575 576 577 578 579 580 |
# File 'lib/line/bot/v1/client.rb', line 572 def get_room_member_ids(room_id, continuation_token = nil) warn '[DEPRECATION] `Line::Bot::Client#get_room_member_ids` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_room_members_ids` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/room/#{room_id}/members/ids" endpoint_path += "?start=#{continuation_token}" if continuation_token get(endpoint, endpoint_path, credentials) end |
#get_room_member_profile(room_id, user_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_room_member_profile instead.
Get an user’s profile of a room.
504 505 506 507 508 509 510 511 |
# File 'lib/line/bot/v1/client.rb', line 504 def get_room_member_profile(room_id, user_id) warn '[DEPRECATION] `Line::Bot::Client#get_room_member_profile` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_room_member_profile` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/room/#{room_id}/member/#{user_id}" get(endpoint, endpoint_path, credentials) end |
#get_room_members_count(room_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_room_member_count instead.
Gets the count of members in a room.
627 628 629 630 631 632 633 634 |
# File 'lib/line/bot/v1/client.rb', line 627 def get_room_members_count(room_id) warn '[DEPRECATION] `Line::Bot::Client#get_room_members_count` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_room_member_count` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/room/#{room_id}/members/count" get(endpoint, endpoint_path, credentials) end |
#get_statistics_per_unit(unit:, from:, to:) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::Insight::ApiClient#get_statistics_per_unit instead.
Get the per-unit statistics of how users interact with push messages and multicast messages.
1627 1628 1629 1630 1631 1632 1633 1634 1635 |
# File 'lib/line/bot/v1/client.rb', line 1627 def get_statistics_per_unit(unit:, from:, to:) warn '[DEPRECATION] `Line::Bot::Client#get_statistics_per_unit` is deprecated. Please use `Line::Bot::V2::Insight::ApiClient#get_statistics_per_unit` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required params = {customAggregationUnit: unit, from: from, to: to} endpoint_path = "/bot/insight/message/event/aggregation?" + URI.encode_www_form(params) get(endpoint, endpoint_path, credentials) end |
#get_user_interaction_statistics(request_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::Insight::ApiClient#get_message_event instead.
Returns statistics about how users interact with narrowcast messages or broadcast messages sent from your LINE Official Account.
1241 1242 1243 1244 1245 1246 1247 1248 |
# File 'lib/line/bot/v1/client.rb', line 1241 def get_user_interaction_statistics(request_id) warn '[DEPRECATION] `Line::Bot::Client#get_user_interaction_statistics` is deprecated. Please use `Line::Bot::V2::Insight::ApiClient#get_message_event` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/insight/message/event?requestId=#{request_id}" get(endpoint, endpoint_path, credentials) end |
#get_user_rich_menu(user_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_rich_menu_id_of_user instead.
Get the ID of the rich menu linked to a user
900 901 902 903 904 905 906 907 |
# File 'lib/line/bot/v1/client.rb', line 900 def (user_id) warn '[DEPRECATION] `Line::Bot::Client#get_user_rich_menu` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_rich_menu_id_of_user` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/user/#{user_id}/richmenu" get(endpoint, endpoint_path, credentials) end |
#get_webhook_endpoint ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#get_webhook_endpoint instead.
Gets information on a webhook endpoint.
1307 1308 1309 1310 1311 1312 1313 1314 |
# File 'lib/line/bot/v1/client.rb', line 1307 def get_webhook_endpoint warn '[DEPRECATION] `Line::Bot::Client#get_webhook_endpoint` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#get_webhook_endpoint` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = '/bot/channel/webhook/endpoint' get(endpoint, endpoint_path, credentials) end |
#issue_channel_access_token_jwt(jwt) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::ChannelAccessToken::ApiClient#issue_channel_token_by_jwt instead.
Issue channel access token v2.1
153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/line/bot/v1/client.rb', line 153 def issue_channel_access_token_jwt(jwt) warn '[DEPRECATION] `Line::Bot::Client#issue_channel_access_token_jwt` is deprecated. Please use `Line::Bot::V2::ChannelAccessToken::ApiClient#issue_channel_token_by_jwt` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] endpoint_path = '/oauth2/v2.1/token' payload = URI.encode_www_form( grant_type: 'client_credentials', client_assertion_type: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer', client_assertion: jwt ) headers = { 'Content-Type' => 'application/x-www-form-urlencoded' } post(oauth_endpoint, endpoint_path, payload, headers) end |
#issue_channel_token(grant_type = 'client_credentials') ⇒ Net::HTTPResponse
This is deprecated. Please use V2::ChannelAccessToken::ApiClient#issue_channel_token instead.
Issue channel access token
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/line/bot/v1/client.rb', line 112 def issue_channel_token(grant_type = 'client_credentials') warn '[DEPRECATION] `Line::Bot::Client#issue_channel_token` is deprecated. Please use `Line::Bot::V2::ChannelAccessToken::ApiClient#issue_channel_token` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_id_required channel_secret_required endpoint_path = '/oauth/accessToken' payload = URI.encode_www_form( grant_type: grant_type, client_id: channel_id, client_secret: channel_secret ) headers = { 'Content-Type' => 'application/x-www-form-urlencoded' } post(endpoint, endpoint_path, payload, headers) end |
#leave_group(group_id) ⇒ Object
This is deprecated. Please use V2::MessagingApi::ApiClient#leave_group instead.
419 420 421 422 423 424 425 426 |
# File 'lib/line/bot/v1/client.rb', line 419 def leave_group(group_id) warn '[DEPRECATION] `Line::Bot::Client#leave_group` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#leave_group` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/group/#{group_id}/leave" post(endpoint, endpoint_path, nil, credentials) end |
#leave_room(room_id) ⇒ Object
This is deprecated. Please use V2::MessagingApi::ApiClient#leave_room instead.
432 433 434 435 436 437 438 439 |
# File 'lib/line/bot/v1/client.rb', line 432 def leave_room(room_id) warn '[DEPRECATION] `Line::Bot::Client#leave_room` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#leave_room` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/room/#{room_id}/leave" post(endpoint, endpoint_path, nil, credentials) end |
#liff_endpoint ⇒ Object
92 93 94 |
# File 'lib/line/bot/v1/client.rb', line 92 def liff_endpoint @liff_endpoint ||= API::DEFAULT_LIFF_ENDPOINT end |
#link_user_rich_menu(user_id, rich_menu_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#link_rich_menu_id_to_user instead.
Link a rich menu to a user
If you want to link a rich menu to multiple users, please consider to use bulk_link_rich_menus.
1062 1063 1064 1065 1066 1067 1068 1069 |
# File 'lib/line/bot/v1/client.rb', line 1062 def (user_id, ) warn '[DEPRECATION] `Line::Bot::Client#link_user_rich_menu` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#link_rich_menu_id_to_user` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/user/#{user_id}/richmenu/#{}" post(endpoint, endpoint_path, nil, credentials) end |
#multicast(to, messages, headers: {}, payload: {}) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#multicast instead.
Send messages to multiple users using userIds.
347 348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/line/bot/v1/client.rb', line 347 def multicast(to, , headers: {}, payload: {}) warn '[DEPRECATION] `Line::Bot::Client#multicast` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#multicast` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required to = [to] if to.is_a?(String) = [] if .is_a?(Hash) endpoint_path = '/bot/message/multicast' payload = payload.merge({ to: to, messages: }).to_json post(endpoint, endpoint_path, payload, credentials.merge(headers)) end |
#multicast_by_phone_numbers(to, messages, headers: {}, payload: {}) ⇒ Net::HTTPResponse
This is obsolete.
Send messages to multiple users using phone numbers.
1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 |
# File 'lib/line/bot/v1/client.rb', line 1702 def multicast_by_phone_numbers(to, , headers: {}, payload: {}) warn '[DEPRECATION] `Line::Bot::Client#get_narrowcast_message_status` is obsolete.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required to = [to] if to.is_a?(String) = [] if .is_a?(Hash) endpoint_path = 'bot/ad/multicast/phone' payload = payload.merge({ to: to, messages: }).to_json post(oauth_endpoint, endpoint_path, payload, credentials.merge(headers)) end |
#narrowcast(messages, recipient: nil, filter: nil, limit: nil, headers: {}) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#narrowcast instead.
Narrowcast messages to users
API Documentation is here. developers.line.biz/en/reference/messaging-api/#send-narrowcast-message
398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 |
# File 'lib/line/bot/v1/client.rb', line 398 def narrowcast(, recipient: nil, filter: nil, limit: nil, headers: {}) warn '[DEPRECATION] `Line::Bot::Client#narrowcast` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#narrowcast` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required = [] if .is_a?(Hash) endpoint_path = '/bot/message/narrowcast' payload = { messages: , recipient: recipient, filter: filter, limit: limit }.to_json post(endpoint, endpoint_path, payload, credentials.merge(headers)) end |
#oauth_endpoint ⇒ Object
77 78 79 |
# File 'lib/line/bot/v1/client.rb', line 77 def oauth_endpoint @oauth_endpoint ||= API::DEFAULT_OAUTH_ENDPOINT end |
#parse_events_from(request_body) ⇒ Array<Line::Bot::Event::Class>
This is deprecated. Please use V2::WebhookParser#parse instead.
Parse events from request.body
1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 |
# File 'lib/line/bot/v1/client.rb', line 1849 def parse_events_from(request_body) warn '[DEPRECATION] `Line::Bot::Client#parse_events_from` is deprecated. Please use `Line::Bot::V2::WebhookParser#parse` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] json = JSON.parse(request_body) json['events'].map do |item| begin klass = Event.const_get(Util.camelize(item['type'])) klass.new(item) rescue NameError Event::Base.new(item) end end end |
#post(endpoint_base, endpoint_path, payload = nil, headers = {}) ⇒ Net::HTTPResponse
This is obsolete. You may use V2::HttpClient#post instead, but it is not recommended.
Post data, get content of specified URL.
1802 1803 1804 1805 |
# File 'lib/line/bot/v1/client.rb', line 1802 def post(endpoint_base, endpoint_path, payload = nil, headers = {}) headers = API::DEFAULT_HEADERS.merge(headers) httpclient.post(endpoint_base + endpoint_path, payload, headers) end |
#push_message(user_id, messages, headers: {}, payload: {}) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#push_message instead.
Push messages to a user using user_id.
288 289 290 291 292 293 294 295 296 297 298 |
# File 'lib/line/bot/v1/client.rb', line 288 def (user_id, , headers: {}, payload: {}) warn '[DEPRECATION] `Line::Bot::Client#push_message` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#push_message` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required = [] if .is_a?(Hash) endpoint_path = '/bot/message/push' payload = payload.merge({ to: user_id, messages: }).to_json post(endpoint, endpoint_path, payload, credentials.merge(headers)) end |
#push_pnp(hashed_phone_number, messages, headers: {}, payload: {}) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#push_messages_by_phone instead.
Send a LINE notification message by specifying the user’s phone number.
1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 |
# File 'lib/line/bot/v1/client.rb', line 1744 def push_pnp(hashed_phone_number, , headers: {}, payload: {}) warn '[DEPRECATION] `Line::Bot::Client#push_pnp` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#push_messages_by_phone` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required = [] if .is_a?(Hash) endpoint_path = '/bot/pnp/push' payload = payload.merge({ to: hashed_phone_number, messages: }).to_json post(oauth_endpoint, endpoint_path, payload, credentials.merge(headers)) end |
#put(endpoint_base, endpoint_path, payload = nil, headers = {}) ⇒ Net::HTTPResponse
This is obsolete. You may use V2::HttpClient#put instead, but it is not recommended.
Put data, get content of specified URL.
1819 1820 1821 1822 |
# File 'lib/line/bot/v1/client.rb', line 1819 def put(endpoint_base, endpoint_path, payload = nil, headers = {}) headers = API::DEFAULT_HEADERS.merge(headers) httpclient.put(endpoint_base + endpoint_path, payload, headers) end |
#rename_audience(audience_group_id, description) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::ManageAudience::ApiClient#update_audience_group_description instead.
Rename an existing audience group
1504 1505 1506 1507 1508 1509 1510 1511 1512 |
# File 'lib/line/bot/v1/client.rb', line 1504 def rename_audience(audience_group_id, description) warn '[DEPRECATION] `Line::Bot::Client#rename_audience` is deprecated. Please use `Line::Bot::V2::ManageAudience::ApiClient#update_audience_group_description` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/audienceGroup/#{audience_group_id}/updateDescription" body = {description: description} put(endpoint, endpoint_path, body.to_json, credentials) end |
#reply_message(token, messages) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#reply_message instead.
Reply messages to a user using replyToken.
324 325 326 327 328 329 330 331 332 333 334 |
# File 'lib/line/bot/v1/client.rb', line 324 def (token, ) warn '[DEPRECATION] `Line::Bot::Client#reply_message` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#reply_message` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required = [] if .is_a?(Hash) endpoint_path = '/bot/message/reply' payload = { replyToken: token, messages: }.to_json post(endpoint, endpoint_path, payload, credentials) end |
#revoke_channel_access_token_jwt(access_token) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::ChannelAccessToken::ApiClient#revoke_channel_token_by_jwt instead.
Revoke channel access token v2.1
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/line/bot/v1/client.rb', line 175 def revoke_channel_access_token_jwt(access_token) warn '[DEPRECATION] `Line::Bot::Client#revoke_channel_access_token_jwt` is deprecated. Please use `Line::Bot::V2::ChannelAccessToken::ApiClient#revoke_channel_token_by_jwt` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_id_required channel_secret_required endpoint_path = '/oauth2/v2.1/revoke' payload = URI.encode_www_form( client_id: channel_id, client_secret: channel_secret, access_token: access_token ) headers = { 'Content-Type' => 'application/x-www-form-urlencoded' } post(oauth_endpoint, endpoint_path, payload, headers) end |
#revoke_channel_token(access_token) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::ChannelAccessToken::ApiClient#revoke_channel_token instead.
Revoke channel access token
135 136 137 138 139 140 141 142 |
# File 'lib/line/bot/v1/client.rb', line 135 def revoke_channel_token(access_token) warn '[DEPRECATION] `Line::Bot::Client#revoke_channel_token` is deprecated. Please use `Line::Bot::V2::ChannelAccessToken::ApiClient#revoke_channel_token` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] endpoint_path = '/oauth/revoke' payload = URI.encode_www_form(access_token: access_token) headers = { 'Content-Type' => 'application/x-www-form-urlencoded' } post(endpoint, endpoint_path, payload, headers) end |
#set_default_rich_menu(rich_menu_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#set_default_rich_menu instead.
Set default rich menu (Link a rich menu to all user)
934 935 936 937 938 939 940 941 |
# File 'lib/line/bot/v1/client.rb', line 934 def () warn '[DEPRECATION] `Line::Bot::Client#set_default_rich_menu` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#set_default_rich_menu` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/user/all/richmenu/#{}" post(endpoint, endpoint_path, nil, credentials) end |
#set_rich_menus_alias(rich_menu_id, rich_menu_alias_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#create_rich_menu_alias instead.
Set rich menu alias
969 970 971 972 973 974 975 976 |
# File 'lib/line/bot/v1/client.rb', line 969 def (, ) warn '[DEPRECATION] `Line::Bot::Client#set_rich_menus_alias` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#create_rich_menu_alias` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = '/bot/richmenu/alias' post(endpoint, endpoint_path, { richMenuId: , richMenuAliasId: }.to_json, credentials) end |
#set_webhook_endpoint(webhook_endpoint) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#set_webhook_endpoint instead.
Sets the webhook endpoint URL.
1325 1326 1327 1328 1329 1330 1331 1332 1333 |
# File 'lib/line/bot/v1/client.rb', line 1325 def set_webhook_endpoint(webhook_endpoint) warn '[DEPRECATION] `Line::Bot::Client#set_webhook_endpoint` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#set_webhook_endpoint` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = '/bot/channel/webhook/endpoint' body = {endpoint: webhook_endpoint} put(endpoint, endpoint_path, body.to_json, credentials) end |
#test_webhook_endpoint(webhook_endpoint = nil) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#test_webhook_endpoint instead.
Checks if the configured webhook endpoint can receive a test webhook event.
1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 |
# File 'lib/line/bot/v1/client.rb', line 1344 def test_webhook_endpoint(webhook_endpoint = nil) warn '[DEPRECATION] `Line::Bot::Client#test_webhook_endpoint` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#test_webhook_endpoint` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = '/bot/channel/webhook/test' body = if webhook_endpoint.nil? {} else {endpoint: webhook_endpoint} end post(endpoint, endpoint_path, body.to_json, credentials) end |
#unlink_user_rich_menu(user_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#unlink_rich_menu_id_from_user instead.
Unlink a rich menu from a user
1080 1081 1082 1083 1084 1085 1086 1087 |
# File 'lib/line/bot/v1/client.rb', line 1080 def (user_id) warn '[DEPRECATION] `Line::Bot::Client#unlink_user_rich_menu` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#unlink_rich_menu_id_from_user` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/user/#{user_id}/richmenu" delete(endpoint, endpoint_path, credentials) end |
#unset_default_rich_menu ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#cancel_default_rich_menu instead.
Unset default rich menu (Unlink a rich menu from all user)
950 951 952 953 954 955 956 957 |
# File 'lib/line/bot/v1/client.rb', line 950 def warn '[DEPRECATION] `Line::Bot::Client#unset_default_rich_menu` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#cancel_default_rich_menu` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/user/all/richmenu" delete(endpoint, endpoint_path, credentials) end |
#unset_rich_menus_alias(rich_menu_alias_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#delete_rich_menu_alias instead.
Unset rich menu alias
987 988 989 990 991 992 993 994 |
# File 'lib/line/bot/v1/client.rb', line 987 def () warn '[DEPRECATION] `Line::Bot::Client#unset_rich_menus_alias` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#delete_rich_menu_alias` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/richmenu/alias/#{}" delete(endpoint, endpoint_path, credentials) end |
#update_audience_authority_level(authority_level) ⇒ Net::HTTPResponse
This is obsolete.
Change the authority level of the audience
Parameters are described here. developers.line.biz/en/reference/messaging-api/#change-authority-level
1606 1607 1608 1609 1610 1611 1612 1613 1614 |
# File 'lib/line/bot/v1/client.rb', line 1606 def () warn '[DEPRECATION] `Line::Bot::Client#update_audience_authority_level` is obsolete.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/audienceGroup/authorityLevel" body = {authorityLevel: } put(endpoint, endpoint_path, body.to_json, credentials) end |
#update_liff_app(liff_id, app) ⇒ Object
This is deprecated. Please use V2::Liff::ApiClient#update_liff_app instead.
1388 1389 1390 1391 1392 1393 1394 1395 |
# File 'lib/line/bot/v1/client.rb', line 1388 def update_liff_app(liff_id, app) warn '[DEPRECATION] `Line::Bot::Client#update_liff_app` is deprecated. Please use `Line::Bot::V2::Liff::ApiClient#update_liff_app` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/apps/#{liff_id}" put(liff_endpoint, endpoint_path, app.to_json, credentials) end |
#update_rich_menus_alias(rich_menu_id, rich_menu_alias_id) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#update_rich_menu_alias instead.
Update rich menu alias
1006 1007 1008 1009 1010 1011 1012 1013 |
# File 'lib/line/bot/v1/client.rb', line 1006 def (, ) warn '[DEPRECATION] `Line::Bot::Client#update_rich_menus_alias` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#update_rich_menu_alias` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = "/bot/richmenu/alias/#{}" post(endpoint, endpoint_path, { richMenuId: }.to_json, credentials) end |
#update_user_id_audience(params) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::ManageAudience::ApiClient#add_audience_to_audience_group instead.
Update an audience group
Parameters are described here. developers.line.biz/en/reference/messaging-api/#update-upload-audience-group
1443 1444 1445 1446 1447 1448 1449 1450 |
# File 'lib/line/bot/v1/client.rb', line 1443 def update_user_id_audience(params) warn '[DEPRECATION] `Line::Bot::Client#update_user_id_audience` is deprecated. Please use `Line::Bot::V2::ManageAudience::ApiClient#add_audience_to_audience_group` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = '/bot/audienceGroup/upload' put(endpoint, endpoint_path, params.to_json, credentials) end |
#validate_broadcast_message_objects(messages) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#validate_broadcast instead.
Validate message objects of a broadcast message
827 828 829 830 831 832 833 834 835 |
# File 'lib/line/bot/v1/client.rb', line 827 def () warn '[DEPRECATION] `Line::Bot::Client#validate_broadcast_message_objects` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#validate_broadcast` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = '/bot/message/validate/broadcast' payload = { messages: }.to_json post(endpoint, endpoint_path, payload, credentials) end |
#validate_multicast_message_objects(messages) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#validate_multicast instead.
Validate message objects of a multicast message
789 790 791 792 793 794 795 796 797 |
# File 'lib/line/bot/v1/client.rb', line 789 def () warn '[DEPRECATION] `Line::Bot::Client#validate_multicast_message_objects` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#validate_multicast` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = '/bot/message/validate/multicast' payload = { messages: }.to_json post(endpoint, endpoint_path, payload, credentials) end |
#validate_narrowcast_message_objects(messages) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#validate_narrowcast instead.
Validate message objects of a narrowcast message
808 809 810 811 812 813 814 815 816 |
# File 'lib/line/bot/v1/client.rb', line 808 def () warn '[DEPRECATION] `Line::Bot::Client#validate_narrowcast_message_objects` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#validate_narrowcast` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = '/bot/message/validate/narrowcast' payload = { messages: }.to_json post(endpoint, endpoint_path, payload, credentials) end |
#validate_push_message_objects(messages) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#validate_push instead.
Validate message objects of a push message
770 771 772 773 774 775 776 777 778 |
# File 'lib/line/bot/v1/client.rb', line 770 def () warn '[DEPRECATION] `Line::Bot::Client#validate_push_message_objects` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#validate_push` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = '/bot/message/validate/push' payload = { messages: }.to_json post(endpoint, endpoint_path, payload, credentials) end |
#validate_reply_message_objects(messages) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#validate_reply instead.
Validate message objects of a reply message
751 752 753 754 755 756 757 758 759 |
# File 'lib/line/bot/v1/client.rb', line 751 def () warn '[DEPRECATION] `Line::Bot::Client#validate_reply_message_objects` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#validate_reply` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = '/bot/message/validate/reply' payload = { messages: }.to_json post(endpoint, endpoint_path, payload, credentials) end |
#validate_rich_menu_object(rich_menu) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::MessagingApi::ApiClient#validate_rich_menu_object instead.
Validate a rich menu object
864 865 866 867 868 869 870 871 |
# File 'lib/line/bot/v1/client.rb', line 864 def () warn '[DEPRECATION] `Line::Bot::Client#validate_rich_menu_object` is deprecated. Please use `Line::Bot::V2::MessagingApi::ApiClient#validate_rich_menu_object` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_token_required endpoint_path = '/bot/richmenu/validate' post(endpoint, endpoint_path, .to_json, credentials) end |
#validate_signature(content, channel_signature) ⇒ Boolean
This is deprecated. Please use V2::WebhookParser#parse instead.
Validate signature of a webhook event.
developers.line.biz/en/reference/messaging-api/#signature-validation
1875 1876 1877 1878 1879 1880 1881 1882 1883 |
# File 'lib/line/bot/v1/client.rb', line 1875 def validate_signature(content, channel_signature) warn '[DEPRECATION] `Line::Bot::Client#validate_signature` is deprecated. Please use `Line::Bot::V2::WebhookParser#parse` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] return false if !channel_signature || !channel_secret hash = OpenSSL::HMAC.digest(OpenSSL::Digest.new('SHA256'), channel_secret, content) signature = Base64.strict_encode64(hash) variable_secure_compare(channel_signature, signature) end |
#verify_access_token(access_token) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::ChannelAccessToken::ApiClient#verify_channel_token instead.
Verify access token v2.1
227 228 229 230 231 232 233 234 235 |
# File 'lib/line/bot/v1/client.rb', line 227 def verify_access_token(access_token) warn '[DEPRECATION] `Line::Bot::Client#verify_access_token` is deprecated. Please use `Line::Bot::V2::ChannelAccessToken::ApiClient#verify_channel_token` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] payload = URI.encode_www_form( access_token: access_token ) endpoint_path = "/oauth2/v2.1/verify?#{payload}" get(oauth_endpoint, endpoint_path) end |
#verify_id_token(id_token, nonce: nil, user_id: nil) ⇒ Net::HTTPResponse
This is deprecated. Please use V2::ChannelAccessToken::ApiClient#verify_channel_token_by_jwt instead.
Verify ID token
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/line/bot/v1/client.rb', line 202 def verify_id_token(id_token, nonce: nil, user_id: nil) warn '[DEPRECATION] `Line::Bot::Client#verify_id_token` is deprecated. Please use `Line::Bot::V2::ChannelAccessToken::ApiClient#verify_channel_token_by_jwt` instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS'] channel_id_required endpoint_path = '/oauth2/v2.1/verify' payload = URI.encode_www_form({ client_id: channel_id, id_token: id_token, nonce: nonce, user_id: user_id }.compact) headers = { 'Content-Type' => 'application/x-www-form-urlencoded' } post(oauth_endpoint, endpoint_path, payload, headers) end |