line-bot-api 1.29.1 → 1.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +38 -8
- data/README.md +1 -1
- data/lib/line/bot/{api → v1/api}/errors.rb +2 -0
- data/lib/line/bot/{api → v1/api}/version.rb +3 -1
- data/lib/line/bot/{api.rb → v1/api.rb} +3 -1
- data/lib/line/bot/{client.rb → v1/client.rb} +563 -3
- data/lib/line/bot/{event → v1/event}/account_link.rb +4 -0
- data/lib/line/bot/{event → v1/event}/base.rb +6 -0
- data/lib/line/bot/{event → v1/event}/beacon.rb +4 -0
- data/lib/line/bot/{event → v1/event}/follow.rb +4 -0
- data/lib/line/bot/{event → v1/event}/join.rb +4 -0
- data/lib/line/bot/{event → v1/event}/leave.rb +4 -0
- data/lib/line/bot/{event → v1/event}/member_joined.rb +4 -0
- data/lib/line/bot/{event → v1/event}/member_left.rb +4 -0
- data/lib/line/bot/{event → v1/event}/message.rb +6 -0
- data/lib/line/bot/{event → v1/event}/postback.rb +4 -0
- data/lib/line/bot/{event → v1/event}/things.rb +6 -0
- data/lib/line/bot/{event → v1/event}/unfollow.rb +4 -0
- data/lib/line/bot/{event → v1/event}/unsend.rb +4 -0
- data/lib/line/bot/{event → v1/event}/video_play_complete.rb +4 -0
- data/lib/line/bot/{event.rb → v1/event.rb} +14 -14
- data/lib/line/bot/{httpclient.rb → v1/httpclient.rb} +22 -0
- data/lib/line/bot/{util.rb → v1/util.rb} +4 -0
- data/lib/line/bot/v2/channel_access_token/api/channel_access_token_client.rb +533 -0
- data/lib/line/bot/v2/channel_access_token/core.rb +20 -0
- data/lib/line/bot/v2/channel_access_token/model/channel_access_token_key_ids_response.rb +68 -0
- data/lib/line/bot/v2/channel_access_token/model/error_response.rb +73 -0
- data/lib/line/bot/v2/channel_access_token/model/issue_channel_access_token_response.rb +86 -0
- data/lib/line/bot/v2/channel_access_token/model/issue_short_lived_channel_access_token_response.rb +80 -0
- data/lib/line/bot/v2/channel_access_token/model/issue_stateless_channel_access_token_response.rb +80 -0
- data/lib/line/bot/v2/channel_access_token/model/verify_channel_access_token_response.rb +79 -0
- data/lib/line/bot/v2/http_client.rb +165 -0
- data/lib/line/bot/v2/insight/api/insight_client.rb +314 -0
- data/lib/line/bot/v2/insight/core.rb +32 -0
- data/lib/line/bot/v2/insight/model/age_tile.rb +72 -0
- data/lib/line/bot/v2/insight/model/app_type_tile.rb +72 -0
- data/lib/line/bot/v2/insight/model/area_tile.rb +72 -0
- data/lib/line/bot/v2/insight/model/error_detail.rb +72 -0
- data/lib/line/bot/v2/insight/model/error_response.rb +79 -0
- data/lib/line/bot/v2/insight/model/gender_tile.rb +72 -0
- data/lib/line/bot/v2/insight/model/get_friends_demographics_response.rb +128 -0
- data/lib/line/bot/v2/insight/model/get_message_event_response.rb +92 -0
- data/lib/line/bot/v2/insight/model/get_message_event_response_click.rb +90 -0
- data/lib/line/bot/v2/insight/model/get_message_event_response_message.rb +132 -0
- data/lib/line/bot/v2/insight/model/get_message_event_response_overview.rb +103 -0
- data/lib/line/bot/v2/insight/model/get_number_of_followers_response.rb +86 -0
- data/lib/line/bot/v2/insight/model/get_number_of_message_deliveries_response.rb +128 -0
- data/lib/line/bot/v2/insight/model/get_statistics_per_unit_response.rb +92 -0
- data/lib/line/bot/v2/insight/model/get_statistics_per_unit_response_click.rb +91 -0
- data/lib/line/bot/v2/insight/model/get_statistics_per_unit_response_message.rb +139 -0
- data/lib/line/bot/v2/insight/model/get_statistics_per_unit_response_overview.rb +86 -0
- data/lib/line/bot/v2/insight/model/subscription_period_tile.rb +72 -0
- data/lib/line/bot/v2/liff/api/liff_client.rb +273 -0
- data/lib/line/bot/v2/liff/core.rb +24 -0
- data/lib/line/bot/v2/liff/model/add_liff_app_request.rb +97 -0
- data/lib/line/bot/v2/liff/model/add_liff_app_response.rb +66 -0
- data/lib/line/bot/v2/liff/model/get_all_liff_apps_response.rb +72 -0
- data/lib/line/bot/v2/liff/model/liff_app.rb +102 -0
- data/lib/line/bot/v2/liff/model/liff_bot_prompt.rb +21 -0
- data/lib/line/bot/v2/liff/model/liff_features.rb +72 -0
- data/lib/line/bot/v2/liff/model/liff_scope.rb +21 -0
- data/lib/line/bot/v2/liff/model/liff_view.rb +79 -0
- data/lib/line/bot/v2/liff/model/update_liff_app_request.rb +97 -0
- data/lib/line/bot/v2/liff/model/update_liff_view.rb +79 -0
- data/lib/line/bot/v2/manage_audience/api/manage_audience_blob_client.rb +182 -0
- data/lib/line/bot/v2/manage_audience/api/manage_audience_client.rb +616 -0
- data/lib/line/bot/v2/manage_audience/core.rb +42 -0
- data/lib/line/bot/v2/manage_audience/model/adaccount.rb +67 -0
- data/lib/line/bot/v2/manage_audience/model/add_audience_to_audience_group_request.rb +86 -0
- data/lib/line/bot/v2/manage_audience/model/audience.rb +67 -0
- data/lib/line/bot/v2/manage_audience/model/audience_group.rb +133 -0
- data/lib/line/bot/v2/manage_audience/model/audience_group_create_route.rb +21 -0
- data/lib/line/bot/v2/manage_audience/model/audience_group_failed_type.rb +21 -0
- data/lib/line/bot/v2/manage_audience/model/audience_group_job.rb +110 -0
- data/lib/line/bot/v2/manage_audience/model/audience_group_job_failed_type.rb +21 -0
- data/lib/line/bot/v2/manage_audience/model/audience_group_job_status.rb +21 -0
- data/lib/line/bot/v2/manage_audience/model/audience_group_job_type.rb +21 -0
- data/lib/line/bot/v2/manage_audience/model/audience_group_permission.rb +21 -0
- data/lib/line/bot/v2/manage_audience/model/audience_group_status.rb +21 -0
- data/lib/line/bot/v2/manage_audience/model/audience_group_type.rb +21 -0
- data/lib/line/bot/v2/manage_audience/model/create_audience_group_request.rb +92 -0
- data/lib/line/bot/v2/manage_audience/model/create_audience_group_response.rb +110 -0
- data/lib/line/bot/v2/manage_audience/model/create_click_based_audience_group_request.rb +80 -0
- data/lib/line/bot/v2/manage_audience/model/create_click_based_audience_group_response.rb +122 -0
- data/lib/line/bot/v2/manage_audience/model/create_imp_based_audience_group_request.rb +74 -0
- data/lib/line/bot/v2/manage_audience/model/create_imp_based_audience_group_response.rb +92 -0
- data/lib/line/bot/v2/manage_audience/model/detailed_owner.rb +79 -0
- data/lib/line/bot/v2/manage_audience/model/error_detail.rb +72 -0
- data/lib/line/bot/v2/manage_audience/model/error_response.rb +79 -0
- data/lib/line/bot/v2/manage_audience/model/get_audience_data_response.rb +86 -0
- data/lib/line/bot/v2/manage_audience/model/get_audience_groups_response.rb +104 -0
- data/lib/line/bot/v2/manage_audience/model/get_shared_audience_data_response.rb +86 -0
- data/lib/line/bot/v2/manage_audience/model/get_shared_audience_groups_response.rb +104 -0
- data/lib/line/bot/v2/manage_audience/model/update_audience_group_description_request.rb +68 -0
- data/lib/line/bot/v2/messaging_api/api/messaging_api_blob_client.rb +282 -0
- data/lib/line/bot/v2/messaging_api/api/messaging_api_client.rb +3354 -0
- data/lib/line/bot/v2/messaging_api/core.rb +173 -0
- data/lib/line/bot/v2/messaging_api/model/action.rb +92 -0
- data/lib/line/bot/v2/messaging_api/model/age_demographic.rb +20 -0
- data/lib/line/bot/v2/messaging_api/model/age_demographic_filter.rb +78 -0
- data/lib/line/bot/v2/messaging_api/model/all_mention_target.rb +67 -0
- data/lib/line/bot/v2/messaging_api/model/alt_uri.rb +66 -0
- data/lib/line/bot/v2/messaging_api/model/app_type_demographic.rb +20 -0
- data/lib/line/bot/v2/messaging_api/model/app_type_demographic_filter.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/area_demographic.rb +21 -0
- data/lib/line/bot/v2/messaging_api/model/area_demographic_filter.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/audience_recipient.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/audio_message.rb +91 -0
- data/lib/line/bot/v2/messaging_api/model/bot_info_response.rb +103 -0
- data/lib/line/bot/v2/messaging_api/model/broadcast_request.rb +79 -0
- data/lib/line/bot/v2/messaging_api/model/buttons_template.rb +120 -0
- data/lib/line/bot/v2/messaging_api/model/camera_action.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/camera_roll_action.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/carousel_column.rb +103 -0
- data/lib/line/bot/v2/messaging_api/model/carousel_template.rb +90 -0
- data/lib/line/bot/v2/messaging_api/model/chat_reference.rb +68 -0
- data/lib/line/bot/v2/messaging_api/model/clipboard_action.rb +79 -0
- data/lib/line/bot/v2/messaging_api/model/clipboard_imagemap_action.rb +85 -0
- data/lib/line/bot/v2/messaging_api/model/confirm_template.rb +84 -0
- data/lib/line/bot/v2/messaging_api/model/create_rich_menu_alias_request.rb +73 -0
- data/lib/line/bot/v2/messaging_api/model/datetime_picker_action.rb +103 -0
- data/lib/line/bot/v2/messaging_api/model/demographic_filter.rb +82 -0
- data/lib/line/bot/v2/messaging_api/model/emoji.rb +78 -0
- data/lib/line/bot/v2/messaging_api/model/emoji_substitution_object.rb +80 -0
- data/lib/line/bot/v2/messaging_api/model/error_detail.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/error_response.rb +91 -0
- data/lib/line/bot/v2/messaging_api/model/filter.rb +67 -0
- data/lib/line/bot/v2/messaging_api/model/flex_block_style.rb +78 -0
- data/lib/line/bot/v2/messaging_api/model/flex_box.rb +234 -0
- data/lib/line/bot/v2/messaging_api/model/flex_box_background.rb +76 -0
- data/lib/line/bot/v2/messaging_api/model/flex_box_border_width.rb +21 -0
- data/lib/line/bot/v2/messaging_api/model/flex_box_corner_radius.rb +21 -0
- data/lib/line/bot/v2/messaging_api/model/flex_box_linear_gradient.rb +96 -0
- data/lib/line/bot/v2/messaging_api/model/flex_box_padding.rb +21 -0
- data/lib/line/bot/v2/messaging_api/model/flex_box_spacing.rb +21 -0
- data/lib/line/bot/v2/messaging_api/model/flex_bubble.rb +114 -0
- data/lib/line/bot/v2/messaging_api/model/flex_bubble_styles.rb +84 -0
- data/lib/line/bot/v2/messaging_api/model/flex_button.rb +150 -0
- data/lib/line/bot/v2/messaging_api/model/flex_carousel.rb +78 -0
- data/lib/line/bot/v2/messaging_api/model/flex_component.rb +84 -0
- data/lib/line/bot/v2/messaging_api/model/flex_container.rb +77 -0
- data/lib/line/bot/v2/messaging_api/model/flex_filler.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/flex_icon.rb +127 -0
- data/lib/line/bot/v2/messaging_api/model/flex_icon_size.rb +21 -0
- data/lib/line/bot/v2/messaging_api/model/flex_image.rb +163 -0
- data/lib/line/bot/v2/messaging_api/model/flex_image_size.rb +21 -0
- data/lib/line/bot/v2/messaging_api/model/flex_margin.rb +21 -0
- data/lib/line/bot/v2/messaging_api/model/flex_message.rb +91 -0
- data/lib/line/bot/v2/messaging_api/model/flex_offset.rb +21 -0
- data/lib/line/bot/v2/messaging_api/model/flex_separator.rb +78 -0
- data/lib/line/bot/v2/messaging_api/model/flex_span.rb +102 -0
- data/lib/line/bot/v2/messaging_api/model/flex_span_size.rb +21 -0
- data/lib/line/bot/v2/messaging_api/model/flex_text.rb +204 -0
- data/lib/line/bot/v2/messaging_api/model/flex_text_font_size.rb +21 -0
- data/lib/line/bot/v2/messaging_api/model/flex_video.rb +96 -0
- data/lib/line/bot/v2/messaging_api/model/gender_demographic.rb +20 -0
- data/lib/line/bot/v2/messaging_api/model/gender_demographic_filter.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/get_aggregation_unit_name_list_response.rb +73 -0
- data/lib/line/bot/v2/messaging_api/model/get_aggregation_unit_usage_response.rb +67 -0
- data/lib/line/bot/v2/messaging_api/model/get_followers_response.rb +73 -0
- data/lib/line/bot/v2/messaging_api/model/get_joined_membership_users_response.rb +74 -0
- data/lib/line/bot/v2/messaging_api/model/get_membership_subscription_response.rb +74 -0
- data/lib/line/bot/v2/messaging_api/model/get_message_content_transcoding_response.rb +68 -0
- data/lib/line/bot/v2/messaging_api/model/get_webhook_endpoint_response.rb +73 -0
- data/lib/line/bot/v2/messaging_api/model/group_member_count_response.rb +67 -0
- data/lib/line/bot/v2/messaging_api/model/group_summary_response.rb +79 -0
- data/lib/line/bot/v2/messaging_api/model/group_user_profile_response.rb +79 -0
- data/lib/line/bot/v2/messaging_api/model/image_carousel_column.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/image_carousel_template.rb +78 -0
- data/lib/line/bot/v2/messaging_api/model/image_message.rb +91 -0
- data/lib/line/bot/v2/messaging_api/model/imagemap_action.rb +85 -0
- data/lib/line/bot/v2/messaging_api/model/imagemap_area.rb +84 -0
- data/lib/line/bot/v2/messaging_api/model/imagemap_base_size.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/imagemap_external_link.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/imagemap_message.rb +115 -0
- data/lib/line/bot/v2/messaging_api/model/imagemap_video.rb +84 -0
- data/lib/line/bot/v2/messaging_api/model/issue_link_token_response.rb +67 -0
- data/lib/line/bot/v2/messaging_api/model/limit.rb +74 -0
- data/lib/line/bot/v2/messaging_api/model/location_action.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/location_message.rb +103 -0
- data/lib/line/bot/v2/messaging_api/model/mark_messages_as_read_request.rb +67 -0
- data/lib/line/bot/v2/messaging_api/model/members_ids_response.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/membership.rb +120 -0
- data/lib/line/bot/v2/messaging_api/model/membership_list_response.rb +73 -0
- data/lib/line/bot/v2/messaging_api/model/mention_substitution_object.rb +74 -0
- data/lib/line/bot/v2/messaging_api/model/mention_target.rb +77 -0
- data/lib/line/bot/v2/messaging_api/model/message.rb +98 -0
- data/lib/line/bot/v2/messaging_api/model/message_action.rb +78 -0
- data/lib/line/bot/v2/messaging_api/model/message_imagemap_action.rb +84 -0
- data/lib/line/bot/v2/messaging_api/model/message_quota_response.rb +73 -0
- data/lib/line/bot/v2/messaging_api/model/multicast_request.rb +91 -0
- data/lib/line/bot/v2/messaging_api/model/narrowcast_progress_response.rb +109 -0
- data/lib/line/bot/v2/messaging_api/model/narrowcast_request.rb +97 -0
- data/lib/line/bot/v2/messaging_api/model/number_of_messages_response.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/operator_demographic_filter.rb +96 -0
- data/lib/line/bot/v2/messaging_api/model/operator_recipient.rb +96 -0
- data/lib/line/bot/v2/messaging_api/model/pnp_messages_request.rb +85 -0
- data/lib/line/bot/v2/messaging_api/model/postback_action.rb +102 -0
- data/lib/line/bot/v2/messaging_api/model/push_message_request.rb +91 -0
- data/lib/line/bot/v2/messaging_api/model/push_message_response.rb +73 -0
- data/lib/line/bot/v2/messaging_api/model/quick_reply.rb +74 -0
- data/lib/line/bot/v2/messaging_api/model/quick_reply_item.rb +79 -0
- data/lib/line/bot/v2/messaging_api/model/quota_consumption_response.rb +67 -0
- data/lib/line/bot/v2/messaging_api/model/quota_type.rb +22 -0
- data/lib/line/bot/v2/messaging_api/model/recipient.rb +79 -0
- data/lib/line/bot/v2/messaging_api/model/redelivery_recipient.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/reply_message_request.rb +85 -0
- data/lib/line/bot/v2/messaging_api/model/reply_message_response.rb +73 -0
- data/lib/line/bot/v2/messaging_api/model/rich_menu_alias_list_response.rb +73 -0
- data/lib/line/bot/v2/messaging_api/model/rich_menu_alias_response.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/rich_menu_area.rb +73 -0
- data/lib/line/bot/v2/messaging_api/model/rich_menu_batch_link_operation.rb +79 -0
- data/lib/line/bot/v2/messaging_api/model/rich_menu_batch_operation.rb +80 -0
- data/lib/line/bot/v2/messaging_api/model/rich_menu_batch_progress_phase.rb +21 -0
- data/lib/line/bot/v2/messaging_api/model/rich_menu_batch_progress_response.rb +79 -0
- data/lib/line/bot/v2/messaging_api/model/rich_menu_batch_request.rb +78 -0
- data/lib/line/bot/v2/messaging_api/model/rich_menu_batch_unlink_all_operation.rb +67 -0
- data/lib/line/bot/v2/messaging_api/model/rich_menu_batch_unlink_operation.rb +73 -0
- data/lib/line/bot/v2/messaging_api/model/rich_menu_bounds.rb +86 -0
- data/lib/line/bot/v2/messaging_api/model/rich_menu_bulk_link_request.rb +73 -0
- data/lib/line/bot/v2/messaging_api/model/rich_menu_bulk_unlink_request.rb +67 -0
- data/lib/line/bot/v2/messaging_api/model/rich_menu_id_response.rb +66 -0
- data/lib/line/bot/v2/messaging_api/model/rich_menu_list_response.rb +73 -0
- data/lib/line/bot/v2/messaging_api/model/rich_menu_request.rb +96 -0
- data/lib/line/bot/v2/messaging_api/model/rich_menu_response.rb +102 -0
- data/lib/line/bot/v2/messaging_api/model/rich_menu_size.rb +73 -0
- data/lib/line/bot/v2/messaging_api/model/rich_menu_switch_action.rb +84 -0
- data/lib/line/bot/v2/messaging_api/model/room_member_count_response.rb +67 -0
- data/lib/line/bot/v2/messaging_api/model/room_user_profile_response.rb +79 -0
- data/lib/line/bot/v2/messaging_api/model/sender.rb +73 -0
- data/lib/line/bot/v2/messaging_api/model/sent_message.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/set_webhook_endpoint_request.rb +67 -0
- data/lib/line/bot/v2/messaging_api/model/show_loading_animation_request.rb +73 -0
- data/lib/line/bot/v2/messaging_api/model/sticker_message.rb +97 -0
- data/lib/line/bot/v2/messaging_api/model/subscribed_membership_plan.rb +97 -0
- data/lib/line/bot/v2/messaging_api/model/subscribed_membership_user.rb +85 -0
- data/lib/line/bot/v2/messaging_api/model/subscription.rb +73 -0
- data/lib/line/bot/v2/messaging_api/model/subscription_period_demographic.rb +20 -0
- data/lib/line/bot/v2/messaging_api/model/subscription_period_demographic_filter.rb +78 -0
- data/lib/line/bot/v2/messaging_api/model/substitution_object.rb +78 -0
- data/lib/line/bot/v2/messaging_api/model/template.rb +79 -0
- data/lib/line/bot/v2/messaging_api/model/template_image_aspect_ratio.rb +21 -0
- data/lib/line/bot/v2/messaging_api/model/template_image_size.rb +21 -0
- data/lib/line/bot/v2/messaging_api/model/template_message.rb +91 -0
- data/lib/line/bot/v2/messaging_api/model/test_webhook_endpoint_request.rb +67 -0
- data/lib/line/bot/v2/messaging_api/model/test_webhook_endpoint_response.rb +91 -0
- data/lib/line/bot/v2/messaging_api/model/text_message.rb +103 -0
- data/lib/line/bot/v2/messaging_api/model/text_message_v2.rb +97 -0
- data/lib/line/bot/v2/messaging_api/model/update_rich_menu_alias_request.rb +67 -0
- data/lib/line/bot/v2/messaging_api/model/uri_action.rb +84 -0
- data/lib/line/bot/v2/messaging_api/model/uri_imagemap_action.rb +84 -0
- data/lib/line/bot/v2/messaging_api/model/user_mention_target.rb +73 -0
- data/lib/line/bot/v2/messaging_api/model/user_profile_response.rb +91 -0
- data/lib/line/bot/v2/messaging_api/model/validate_message_request.rb +72 -0
- data/lib/line/bot/v2/messaging_api/model/video_message.rb +97 -0
- data/lib/line/bot/v2/module/api/line_module_client.rb +247 -0
- data/lib/line/bot/v2/module/core.rb +18 -0
- data/lib/line/bot/v2/module/model/acquire_chat_control_request.rb +74 -0
- data/lib/line/bot/v2/module/model/detach_module_request.rb +68 -0
- data/lib/line/bot/v2/module/model/get_modules_response.rb +80 -0
- data/lib/line/bot/v2/module/model/module_bot.rb +92 -0
- data/lib/line/bot/v2/module_attach/api/line_module_attach_client.rb +160 -0
- data/lib/line/bot/v2/module_attach/core.rb +15 -0
- data/lib/line/bot/v2/module_attach/model/attach_module_response.rb +73 -0
- data/lib/line/bot/v2/reserved_words.rb +50 -0
- data/lib/line/bot/v2/shop/api/shop_client.rb +95 -0
- data/lib/line/bot/v2/shop/core.rb +16 -0
- data/lib/line/bot/v2/shop/model/error_response.rb +67 -0
- data/lib/line/bot/v2/shop/model/mission_sticker_request.rb +86 -0
- data/lib/line/bot/v2/utils.rb +143 -0
- data/lib/line/bot/v2/webhook/core.rb +77 -0
- data/lib/line/bot/v2/webhook/model/account_link_event.rb +109 -0
- data/lib/line/bot/v2/webhook/model/action_result.rb +72 -0
- data/lib/line/bot/v2/webhook/model/activated_event.rb +103 -0
- data/lib/line/bot/v2/webhook/model/all_mentionee.rb +79 -0
- data/lib/line/bot/v2/webhook/model/attached_module_content.rb +78 -0
- data/lib/line/bot/v2/webhook/model/audio_message_content.rb +84 -0
- data/lib/line/bot/v2/webhook/model/beacon_content.rb +78 -0
- data/lib/line/bot/v2/webhook/model/beacon_event.rb +109 -0
- data/lib/line/bot/v2/webhook/model/bot_resumed_event.rb +97 -0
- data/lib/line/bot/v2/webhook/model/bot_suspended_event.rb +97 -0
- data/lib/line/bot/v2/webhook/model/callback_request.rb +80 -0
- data/lib/line/bot/v2/webhook/model/chat_control.rb +66 -0
- data/lib/line/bot/v2/webhook/model/content_provider.rb +79 -0
- data/lib/line/bot/v2/webhook/model/deactivated_event.rb +97 -0
- data/lib/line/bot/v2/webhook/model/delivery_context.rb +67 -0
- data/lib/line/bot/v2/webhook/model/detached_module_content.rb +78 -0
- data/lib/line/bot/v2/webhook/model/emoji.rb +84 -0
- data/lib/line/bot/v2/webhook/model/event.rb +126 -0
- data/lib/line/bot/v2/webhook/model/event_mode.rb +21 -0
- data/lib/line/bot/v2/webhook/model/file_message_content.rb +84 -0
- data/lib/line/bot/v2/webhook/model/follow_detail.rb +66 -0
- data/lib/line/bot/v2/webhook/model/follow_event.rb +109 -0
- data/lib/line/bot/v2/webhook/model/group_source.rb +78 -0
- data/lib/line/bot/v2/webhook/model/image_message_content.rb +90 -0
- data/lib/line/bot/v2/webhook/model/image_set.rb +78 -0
- data/lib/line/bot/v2/webhook/model/join_event.rb +103 -0
- data/lib/line/bot/v2/webhook/model/joined_members.rb +72 -0
- data/lib/line/bot/v2/webhook/model/joined_membership_content.rb +72 -0
- data/lib/line/bot/v2/webhook/model/leave_event.rb +97 -0
- data/lib/line/bot/v2/webhook/model/left_members.rb +72 -0
- data/lib/line/bot/v2/webhook/model/left_membership_content.rb +72 -0
- data/lib/line/bot/v2/webhook/model/link_content.rb +73 -0
- data/lib/line/bot/v2/webhook/model/link_things_content.rb +72 -0
- data/lib/line/bot/v2/webhook/model/location_message_content.rb +96 -0
- data/lib/line/bot/v2/webhook/model/member_joined_event.rb +109 -0
- data/lib/line/bot/v2/webhook/model/member_left_event.rb +103 -0
- data/lib/line/bot/v2/webhook/model/membership_content.rb +79 -0
- data/lib/line/bot/v2/webhook/model/membership_event.rb +109 -0
- data/lib/line/bot/v2/webhook/model/mention.rb +72 -0
- data/lib/line/bot/v2/webhook/model/mentionee.rb +90 -0
- data/lib/line/bot/v2/webhook/model/message_content.rb +89 -0
- data/lib/line/bot/v2/webhook/model/message_event.rb +109 -0
- data/lib/line/bot/v2/webhook/model/module_content.rb +77 -0
- data/lib/line/bot/v2/webhook/model/module_event.rb +103 -0
- data/lib/line/bot/v2/webhook/model/pnp_delivery.rb +67 -0
- data/lib/line/bot/v2/webhook/model/pnp_delivery_completion_event.rb +103 -0
- data/lib/line/bot/v2/webhook/model/postback_content.rb +72 -0
- data/lib/line/bot/v2/webhook/model/postback_event.rb +109 -0
- data/lib/line/bot/v2/webhook/model/renewed_membership_content.rb +72 -0
- data/lib/line/bot/v2/webhook/model/room_source.rb +78 -0
- data/lib/line/bot/v2/webhook/model/scenario_result.rb +115 -0
- data/lib/line/bot/v2/webhook/model/scenario_result_things_content.rb +78 -0
- data/lib/line/bot/v2/webhook/model/source.rb +80 -0
- data/lib/line/bot/v2/webhook/model/sticker_message_content.rb +115 -0
- data/lib/line/bot/v2/webhook/model/text_message_content.rb +108 -0
- data/lib/line/bot/v2/webhook/model/things_content.rb +78 -0
- data/lib/line/bot/v2/webhook/model/things_event.rb +109 -0
- data/lib/line/bot/v2/webhook/model/unfollow_event.rb +97 -0
- data/lib/line/bot/v2/webhook/model/unlink_things_content.rb +72 -0
- data/lib/line/bot/v2/webhook/model/unsend_detail.rb +66 -0
- data/lib/line/bot/v2/webhook/model/unsend_event.rb +103 -0
- data/lib/line/bot/v2/webhook/model/user_mentionee.rb +91 -0
- data/lib/line/bot/v2/webhook/model/user_source.rb +72 -0
- data/lib/line/bot/v2/webhook/model/video_message_content.rb +90 -0
- data/lib/line/bot/v2/webhook/model/video_play_complete.rb +66 -0
- data/lib/line/bot/v2/webhook/model/video_play_complete_event.rb +109 -0
- data/lib/line/bot/v2/webhook_parser.rb +94 -0
- data/lib/line/bot/version.rb +7 -0
- data/lib/line/bot.rb +24 -9
- data/line-bot-api.gemspec +23 -18
- data/sig/line/bot/v2/channel_access_token/api/channel_access_token_client.rbs +327 -0
- data/sig/line/bot/v2/channel_access_token/model/channel_access_token_key_ids_response.rbs +41 -0
- data/sig/line/bot/v2/channel_access_token/model/error_response.rbs +43 -0
- data/sig/line/bot/v2/channel_access_token/model/issue_channel_access_token_response.rbs +50 -0
- data/sig/line/bot/v2/channel_access_token/model/issue_short_lived_channel_access_token_response.rbs +47 -0
- data/sig/line/bot/v2/channel_access_token/model/issue_stateless_channel_access_token_response.rbs +47 -0
- data/sig/line/bot/v2/channel_access_token/model/verify_channel_access_token_response.rbs +46 -0
- data/sig/line/bot/v2/http_client.rbs +111 -0
- data/sig/line/bot/v2/insight/api/insight_client.rbs +196 -0
- data/sig/line/bot/v2/insight/model/age_tile.rbs +42 -0
- data/sig/line/bot/v2/insight/model/app_type_tile.rbs +42 -0
- data/sig/line/bot/v2/insight/model/area_tile.rbs +42 -0
- data/sig/line/bot/v2/insight/model/error_detail.rbs +42 -0
- data/sig/line/bot/v2/insight/model/error_response.rbs +43 -0
- data/sig/line/bot/v2/insight/model/gender_tile.rbs +42 -0
- data/sig/line/bot/v2/insight/model/get_friends_demographics_response.rbs +56 -0
- data/sig/line/bot/v2/insight/model/get_message_event_response.rbs +47 -0
- data/sig/line/bot/v2/insight/model/get_message_event_response_click.rbs +51 -0
- data/sig/line/bot/v2/insight/model/get_message_event_response_message.rbs +72 -0
- data/sig/line/bot/v2/insight/model/get_message_event_response_overview.rbs +58 -0
- data/sig/line/bot/v2/insight/model/get_number_of_followers_response.rbs +50 -0
- data/sig/line/bot/v2/insight/model/get_number_of_message_deliveries_response.rbs +71 -0
- data/sig/line/bot/v2/insight/model/get_statistics_per_unit_response.rbs +47 -0
- data/sig/line/bot/v2/insight/model/get_statistics_per_unit_response_click.rbs +52 -0
- data/sig/line/bot/v2/insight/model/get_statistics_per_unit_response_message.rbs +76 -0
- data/sig/line/bot/v2/insight/model/get_statistics_per_unit_response_overview.rbs +50 -0
- data/sig/line/bot/v2/insight/model/subscription_period_tile.rbs +42 -0
- data/sig/line/bot/v2/liff/api/liff_client.rbs +198 -0
- data/sig/line/bot/v2/liff/model/add_liff_app_request.rbs +55 -0
- data/sig/line/bot/v2/liff/model/add_liff_app_response.rbs +39 -0
- data/sig/line/bot/v2/liff/model/get_all_liff_apps_response.rbs +39 -0
- data/sig/line/bot/v2/liff/model/liff_app.rbs +57 -0
- data/sig/line/bot/v2/liff/model/liff_bot_prompt.rbs +21 -0
- data/sig/line/bot/v2/liff/model/liff_features.rbs +42 -0
- data/sig/line/bot/v2/liff/model/liff_scope.rbs +21 -0
- data/sig/line/bot/v2/liff/model/liff_view.rbs +46 -0
- data/sig/line/bot/v2/liff/model/update_liff_app_request.rbs +55 -0
- data/sig/line/bot/v2/liff/model/update_liff_view.rbs +46 -0
- data/sig/line/bot/v2/manage_audience/api/manage_audience_blob_client.rbs +122 -0
- data/sig/line/bot/v2/manage_audience/api/manage_audience_client.rbs +394 -0
- data/sig/line/bot/v2/manage_audience/model/adaccount.rbs +40 -0
- data/sig/line/bot/v2/manage_audience/model/add_audience_to_audience_group_request.rbs +47 -0
- data/sig/line/bot/v2/manage_audience/model/audience.rbs +40 -0
- data/sig/line/bot/v2/manage_audience/model/audience_group.rbs +73 -0
- data/sig/line/bot/v2/manage_audience/model/audience_group_create_route.rbs +21 -0
- data/sig/line/bot/v2/manage_audience/model/audience_group_failed_type.rbs +21 -0
- data/sig/line/bot/v2/manage_audience/model/audience_group_job.rbs +62 -0
- data/sig/line/bot/v2/manage_audience/model/audience_group_job_failed_type.rbs +21 -0
- data/sig/line/bot/v2/manage_audience/model/audience_group_job_status.rbs +21 -0
- data/sig/line/bot/v2/manage_audience/model/audience_group_job_type.rbs +21 -0
- data/sig/line/bot/v2/manage_audience/model/audience_group_permission.rbs +21 -0
- data/sig/line/bot/v2/manage_audience/model/audience_group_status.rbs +21 -0
- data/sig/line/bot/v2/manage_audience/model/audience_group_type.rbs +21 -0
- data/sig/line/bot/v2/manage_audience/model/create_audience_group_request.rbs +50 -0
- data/sig/line/bot/v2/manage_audience/model/create_audience_group_response.rbs +62 -0
- data/sig/line/bot/v2/manage_audience/model/create_click_based_audience_group_request.rbs +47 -0
- data/sig/line/bot/v2/manage_audience/model/create_click_based_audience_group_response.rbs +68 -0
- data/sig/line/bot/v2/manage_audience/model/create_imp_based_audience_group_request.rbs +44 -0
- data/sig/line/bot/v2/manage_audience/model/create_imp_based_audience_group_response.rbs +53 -0
- data/sig/line/bot/v2/manage_audience/model/detailed_owner.rbs +46 -0
- data/sig/line/bot/v2/manage_audience/model/error_detail.rbs +42 -0
- data/sig/line/bot/v2/manage_audience/model/error_response.rbs +43 -0
- data/sig/line/bot/v2/manage_audience/model/get_audience_data_response.rbs +47 -0
- data/sig/line/bot/v2/manage_audience/model/get_audience_groups_response.rbs +56 -0
- data/sig/line/bot/v2/manage_audience/model/get_shared_audience_data_response.rbs +47 -0
- data/sig/line/bot/v2/manage_audience/model/get_shared_audience_groups_response.rbs +56 -0
- data/sig/line/bot/v2/manage_audience/model/update_audience_group_description_request.rbs +41 -0
- data/sig/line/bot/v2/messaging_api/api/messaging_api_blob_client.rbs +196 -0
- data/sig/line/bot/v2/messaging_api/api/messaging_api_client.rbs +2072 -0
- data/sig/line/bot/v2/messaging_api/model/action.rbs +48 -0
- data/sig/line/bot/v2/messaging_api/model/age_demographic.rbs +20 -0
- data/sig/line/bot/v2/messaging_api/model/age_demographic_filter.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/all_mention_target.rbs +38 -0
- data/sig/line/bot/v2/messaging_api/model/alt_uri.rbs +39 -0
- data/sig/line/bot/v2/messaging_api/model/app_type_demographic.rbs +20 -0
- data/sig/line/bot/v2/messaging_api/model/app_type_demographic_filter.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/area_demographic.rbs +21 -0
- data/sig/line/bot/v2/messaging_api/model/area_demographic_filter.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/audience_recipient.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/audio_message.rbs +50 -0
- data/sig/line/bot/v2/messaging_api/model/bot_info_response.rbs +58 -0
- data/sig/line/bot/v2/messaging_api/model/broadcast_request.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/buttons_template.rbs +61 -0
- data/sig/line/bot/v2/messaging_api/model/camera_action.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/camera_roll_action.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/carousel_column.rbs +55 -0
- data/sig/line/bot/v2/messaging_api/model/carousel_template.rbs +46 -0
- data/sig/line/bot/v2/messaging_api/model/chat_reference.rbs +41 -0
- data/sig/line/bot/v2/messaging_api/model/clipboard_action.rbs +44 -0
- data/sig/line/bot/v2/messaging_api/model/clipboard_imagemap_action.rbs +47 -0
- data/sig/line/bot/v2/messaging_api/model/confirm_template.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/create_rich_menu_alias_request.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/datetime_picker_action.rbs +56 -0
- data/sig/line/bot/v2/messaging_api/model/demographic_filter.rbs +44 -0
- data/sig/line/bot/v2/messaging_api/model/emoji.rbs +45 -0
- data/sig/line/bot/v2/messaging_api/model/emoji_substitution_object.rbs +45 -0
- data/sig/line/bot/v2/messaging_api/model/error_detail.rbs +42 -0
- data/sig/line/bot/v2/messaging_api/model/error_response.rbs +46 -0
- data/sig/line/bot/v2/messaging_api/model/filter.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/flex_block_style.rbs +45 -0
- data/sig/line/bot/v2/messaging_api/model/flex_box.rbs +118 -0
- data/sig/line/bot/v2/messaging_api/model/flex_box_background.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/flex_box_border_width.rbs +21 -0
- data/sig/line/bot/v2/messaging_api/model/flex_box_corner_radius.rbs +21 -0
- data/sig/line/bot/v2/messaging_api/model/flex_box_linear_gradient.rbs +52 -0
- data/sig/line/bot/v2/messaging_api/model/flex_box_padding.rbs +21 -0
- data/sig/line/bot/v2/messaging_api/model/flex_box_spacing.rbs +21 -0
- data/sig/line/bot/v2/messaging_api/model/flex_bubble.rbs +61 -0
- data/sig/line/bot/v2/messaging_api/model/flex_bubble_styles.rbs +48 -0
- data/sig/line/bot/v2/messaging_api/model/flex_button.rbs +79 -0
- data/sig/line/bot/v2/messaging_api/model/flex_carousel.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/flex_component.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/flex_container.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/flex_filler.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/flex_icon.rbs +68 -0
- data/sig/line/bot/v2/messaging_api/model/flex_icon_size.rbs +21 -0
- data/sig/line/bot/v2/messaging_api/model/flex_image.rbs +86 -0
- data/sig/line/bot/v2/messaging_api/model/flex_image_size.rbs +21 -0
- data/sig/line/bot/v2/messaging_api/model/flex_margin.rbs +21 -0
- data/sig/line/bot/v2/messaging_api/model/flex_message.rbs +50 -0
- data/sig/line/bot/v2/messaging_api/model/flex_offset.rbs +21 -0
- data/sig/line/bot/v2/messaging_api/model/flex_separator.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/flex_span.rbs +55 -0
- data/sig/line/bot/v2/messaging_api/model/flex_span_size.rbs +21 -0
- data/sig/line/bot/v2/messaging_api/model/flex_text.rbs +103 -0
- data/sig/line/bot/v2/messaging_api/model/flex_text_font_size.rbs +21 -0
- data/sig/line/bot/v2/messaging_api/model/flex_video.rbs +52 -0
- data/sig/line/bot/v2/messaging_api/model/gender_demographic.rbs +20 -0
- data/sig/line/bot/v2/messaging_api/model/gender_demographic_filter.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/get_aggregation_unit_name_list_response.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/get_aggregation_unit_usage_response.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/get_followers_response.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/get_joined_membership_users_response.rbs +44 -0
- data/sig/line/bot/v2/messaging_api/model/get_membership_subscription_response.rbs +41 -0
- data/sig/line/bot/v2/messaging_api/model/get_message_content_transcoding_response.rbs +41 -0
- data/sig/line/bot/v2/messaging_api/model/get_webhook_endpoint_response.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/group_member_count_response.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/group_summary_response.rbs +46 -0
- data/sig/line/bot/v2/messaging_api/model/group_user_profile_response.rbs +46 -0
- data/sig/line/bot/v2/messaging_api/model/image_carousel_column.rbs +42 -0
- data/sig/line/bot/v2/messaging_api/model/image_carousel_template.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/image_message.rbs +50 -0
- data/sig/line/bot/v2/messaging_api/model/imagemap_action.rbs +47 -0
- data/sig/line/bot/v2/messaging_api/model/imagemap_area.rbs +48 -0
- data/sig/line/bot/v2/messaging_api/model/imagemap_base_size.rbs +42 -0
- data/sig/line/bot/v2/messaging_api/model/imagemap_external_link.rbs +42 -0
- data/sig/line/bot/v2/messaging_api/model/imagemap_message.rbs +59 -0
- data/sig/line/bot/v2/messaging_api/model/imagemap_video.rbs +48 -0
- data/sig/line/bot/v2/messaging_api/model/issue_link_token_response.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/limit.rbs +44 -0
- data/sig/line/bot/v2/messaging_api/model/location_action.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/location_message.rbs +56 -0
- data/sig/line/bot/v2/messaging_api/model/mark_messages_as_read_request.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/members_ids_response.rbs +42 -0
- data/sig/line/bot/v2/messaging_api/model/membership.rbs +66 -0
- data/sig/line/bot/v2/messaging_api/model/membership_list_response.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/mention_substitution_object.rbs +42 -0
- data/sig/line/bot/v2/messaging_api/model/mention_target.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/message.rbs +50 -0
- data/sig/line/bot/v2/messaging_api/model/message_action.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/message_imagemap_action.rbs +46 -0
- data/sig/line/bot/v2/messaging_api/model/message_quota_response.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/multicast_request.rbs +49 -0
- data/sig/line/bot/v2/messaging_api/model/narrowcast_progress_response.rbs +61 -0
- data/sig/line/bot/v2/messaging_api/model/narrowcast_request.rbs +52 -0
- data/sig/line/bot/v2/messaging_api/model/number_of_messages_response.rbs +42 -0
- data/sig/line/bot/v2/messaging_api/model/operator_demographic_filter.rbs +46 -0
- data/sig/line/bot/v2/messaging_api/model/operator_recipient.rbs +46 -0
- data/sig/line/bot/v2/messaging_api/model/pnp_messages_request.rbs +46 -0
- data/sig/line/bot/v2/messaging_api/model/postback_action.rbs +55 -0
- data/sig/line/bot/v2/messaging_api/model/push_message_request.rbs +49 -0
- data/sig/line/bot/v2/messaging_api/model/push_message_response.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/quick_reply.rbs +41 -0
- data/sig/line/bot/v2/messaging_api/model/quick_reply_item.rbs +46 -0
- data/sig/line/bot/v2/messaging_api/model/quota_consumption_response.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/quota_type.rbs +22 -0
- data/sig/line/bot/v2/messaging_api/model/recipient.rbs +44 -0
- data/sig/line/bot/v2/messaging_api/model/redelivery_recipient.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/reply_message_request.rbs +46 -0
- data/sig/line/bot/v2/messaging_api/model/reply_message_response.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/rich_menu_alias_list_response.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/rich_menu_alias_response.rbs +42 -0
- data/sig/line/bot/v2/messaging_api/model/rich_menu_area.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/rich_menu_batch_link_operation.rbs +44 -0
- data/sig/line/bot/v2/messaging_api/model/rich_menu_batch_operation.rbs +45 -0
- data/sig/line/bot/v2/messaging_api/model/rich_menu_batch_progress_phase.rbs +21 -0
- data/sig/line/bot/v2/messaging_api/model/rich_menu_batch_progress_response.rbs +46 -0
- data/sig/line/bot/v2/messaging_api/model/rich_menu_batch_request.rbs +42 -0
- data/sig/line/bot/v2/messaging_api/model/rich_menu_batch_unlink_all_operation.rbs +38 -0
- data/sig/line/bot/v2/messaging_api/model/rich_menu_batch_unlink_operation.rbs +41 -0
- data/sig/line/bot/v2/messaging_api/model/rich_menu_bounds.rbs +50 -0
- data/sig/line/bot/v2/messaging_api/model/rich_menu_bulk_link_request.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/rich_menu_bulk_unlink_request.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/rich_menu_id_response.rbs +39 -0
- data/sig/line/bot/v2/messaging_api/model/rich_menu_list_response.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/rich_menu_request.rbs +51 -0
- data/sig/line/bot/v2/messaging_api/model/rich_menu_response.rbs +54 -0
- data/sig/line/bot/v2/messaging_api/model/rich_menu_size.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/rich_menu_switch_action.rbs +46 -0
- data/sig/line/bot/v2/messaging_api/model/room_member_count_response.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/room_user_profile_response.rbs +46 -0
- data/sig/line/bot/v2/messaging_api/model/sender.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/sent_message.rbs +42 -0
- data/sig/line/bot/v2/messaging_api/model/set_webhook_endpoint_request.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/show_loading_animation_request.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/sticker_message.rbs +53 -0
- data/sig/line/bot/v2/messaging_api/model/subscribed_membership_plan.rbs +55 -0
- data/sig/line/bot/v2/messaging_api/model/subscribed_membership_user.rbs +49 -0
- data/sig/line/bot/v2/messaging_api/model/subscription.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/subscription_period_demographic.rbs +20 -0
- data/sig/line/bot/v2/messaging_api/model/subscription_period_demographic_filter.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/substitution_object.rbs +44 -0
- data/sig/line/bot/v2/messaging_api/model/template.rbs +43 -0
- data/sig/line/bot/v2/messaging_api/model/template_image_aspect_ratio.rbs +21 -0
- data/sig/line/bot/v2/messaging_api/model/template_image_size.rbs +21 -0
- data/sig/line/bot/v2/messaging_api/model/template_message.rbs +50 -0
- data/sig/line/bot/v2/messaging_api/model/test_webhook_endpoint_request.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/test_webhook_endpoint_response.rbs +52 -0
- data/sig/line/bot/v2/messaging_api/model/text_message.rbs +53 -0
- data/sig/line/bot/v2/messaging_api/model/text_message_v2.rbs +53 -0
- data/sig/line/bot/v2/messaging_api/model/update_rich_menu_alias_request.rbs +40 -0
- data/sig/line/bot/v2/messaging_api/model/uri_action.rbs +46 -0
- data/sig/line/bot/v2/messaging_api/model/uri_imagemap_action.rbs +46 -0
- data/sig/line/bot/v2/messaging_api/model/user_mention_target.rbs +41 -0
- data/sig/line/bot/v2/messaging_api/model/user_profile_response.rbs +52 -0
- data/sig/line/bot/v2/messaging_api/model/validate_message_request.rbs +39 -0
- data/sig/line/bot/v2/messaging_api/model/video_message.rbs +53 -0
- data/sig/line/bot/v2/module/api/line_module_client.rbs +170 -0
- data/sig/line/bot/v2/module/model/acquire_chat_control_request.rbs +44 -0
- data/sig/line/bot/v2/module/model/detach_module_request.rbs +41 -0
- data/sig/line/bot/v2/module/model/get_modules_response.rbs +44 -0
- data/sig/line/bot/v2/module/model/module_bot.rbs +53 -0
- data/sig/line/bot/v2/module_attach/api/line_module_attach_client.rbs +111 -0
- data/sig/line/bot/v2/module_attach/model/attach_module_response.rbs +43 -0
- data/sig/line/bot/v2/reserved_words.rbs +7 -0
- data/sig/line/bot/v2/shop/api/shop_client.rbs +72 -0
- data/sig/line/bot/v2/shop/model/error_response.rbs +40 -0
- data/sig/line/bot/v2/shop/model/mission_sticker_request.rbs +50 -0
- data/sig/line/bot/v2/utils.rbs +25 -0
- data/sig/line/bot/v2/webhook/model/account_link_event.rbs +59 -0
- data/sig/line/bot/v2/webhook/model/action_result.rbs +42 -0
- data/sig/line/bot/v2/webhook/model/activated_event.rbs +56 -0
- data/sig/line/bot/v2/webhook/model/all_mentionee.rbs +44 -0
- data/sig/line/bot/v2/webhook/model/attached_module_content.rbs +43 -0
- data/sig/line/bot/v2/webhook/model/audio_message_content.rbs +46 -0
- data/sig/line/bot/v2/webhook/model/beacon_content.rbs +45 -0
- data/sig/line/bot/v2/webhook/model/beacon_event.rbs +59 -0
- data/sig/line/bot/v2/webhook/model/bot_resumed_event.rbs +53 -0
- data/sig/line/bot/v2/webhook/model/bot_suspended_event.rbs +53 -0
- data/sig/line/bot/v2/webhook/model/callback_request.rbs +44 -0
- data/sig/line/bot/v2/webhook/model/chat_control.rbs +39 -0
- data/sig/line/bot/v2/webhook/model/content_provider.rbs +46 -0
- data/sig/line/bot/v2/webhook/model/deactivated_event.rbs +53 -0
- data/sig/line/bot/v2/webhook/model/delivery_context.rbs +40 -0
- data/sig/line/bot/v2/webhook/model/detached_module_content.rbs +43 -0
- data/sig/line/bot/v2/webhook/model/emoji.rbs +48 -0
- data/sig/line/bot/v2/webhook/model/event.rbs +59 -0
- data/sig/line/bot/v2/webhook/model/event_mode.rbs +21 -0
- data/sig/line/bot/v2/webhook/model/file_message_content.rbs +46 -0
- data/sig/line/bot/v2/webhook/model/follow_detail.rbs +39 -0
- data/sig/line/bot/v2/webhook/model/follow_event.rbs +59 -0
- data/sig/line/bot/v2/webhook/model/group_source.rbs +43 -0
- data/sig/line/bot/v2/webhook/model/image_message_content.rbs +49 -0
- data/sig/line/bot/v2/webhook/model/image_set.rbs +45 -0
- data/sig/line/bot/v2/webhook/model/join_event.rbs +56 -0
- data/sig/line/bot/v2/webhook/model/joined_members.rbs +39 -0
- data/sig/line/bot/v2/webhook/model/joined_membership_content.rbs +40 -0
- data/sig/line/bot/v2/webhook/model/leave_event.rbs +53 -0
- data/sig/line/bot/v2/webhook/model/left_members.rbs +39 -0
- data/sig/line/bot/v2/webhook/model/left_membership_content.rbs +40 -0
- data/sig/line/bot/v2/webhook/model/link_content.rbs +43 -0
- data/sig/line/bot/v2/webhook/model/link_things_content.rbs +40 -0
- data/sig/line/bot/v2/webhook/model/location_message_content.rbs +52 -0
- data/sig/line/bot/v2/webhook/model/member_joined_event.rbs +59 -0
- data/sig/line/bot/v2/webhook/model/member_left_event.rbs +56 -0
- data/sig/line/bot/v2/webhook/model/membership_content.rbs +44 -0
- data/sig/line/bot/v2/webhook/model/membership_event.rbs +59 -0
- data/sig/line/bot/v2/webhook/model/mention.rbs +39 -0
- data/sig/line/bot/v2/webhook/model/mentionee.rbs +50 -0
- data/sig/line/bot/v2/webhook/model/message_content.rbs +47 -0
- data/sig/line/bot/v2/webhook/model/message_event.rbs +59 -0
- data/sig/line/bot/v2/webhook/model/module_content.rbs +43 -0
- data/sig/line/bot/v2/webhook/model/module_event.rbs +56 -0
- data/sig/line/bot/v2/webhook/model/pnp_delivery.rbs +40 -0
- data/sig/line/bot/v2/webhook/model/pnp_delivery_completion_event.rbs +56 -0
- data/sig/line/bot/v2/webhook/model/postback_content.rbs +42 -0
- data/sig/line/bot/v2/webhook/model/postback_event.rbs +59 -0
- data/sig/line/bot/v2/webhook/model/renewed_membership_content.rbs +40 -0
- data/sig/line/bot/v2/webhook/model/room_source.rbs +43 -0
- data/sig/line/bot/v2/webhook/model/scenario_result.rbs +61 -0
- data/sig/line/bot/v2/webhook/model/scenario_result_things_content.rbs +43 -0
- data/sig/line/bot/v2/webhook/model/source.rbs +45 -0
- data/sig/line/bot/v2/webhook/model/sticker_message_content.rbs +62 -0
- data/sig/line/bot/v2/webhook/model/text_message_content.rbs +55 -0
- data/sig/line/bot/v2/webhook/model/things_content.rbs +43 -0
- data/sig/line/bot/v2/webhook/model/things_event.rbs +59 -0
- data/sig/line/bot/v2/webhook/model/unfollow_event.rbs +53 -0
- data/sig/line/bot/v2/webhook/model/unlink_things_content.rbs +40 -0
- data/sig/line/bot/v2/webhook/model/unsend_detail.rbs +39 -0
- data/sig/line/bot/v2/webhook/model/unsend_event.rbs +56 -0
- data/sig/line/bot/v2/webhook/model/user_mentionee.rbs +50 -0
- data/sig/line/bot/v2/webhook/model/user_source.rbs +40 -0
- data/sig/line/bot/v2/webhook/model/video_message_content.rbs +49 -0
- data/sig/line/bot/v2/webhook/model/video_play_complete.rbs +39 -0
- data/sig/line/bot/v2/webhook/model/video_play_complete_event.rbs +59 -0
- data/sig/line/bot/v2/webhook_parser.rbs +26 -0
- data/sig/line/bot/version.rbs +5 -0
- metadata +666 -69
@@ -0,0 +1,3354 @@
|
|
1
|
+
# LINE Messaging API
|
2
|
+
# This document describes LINE Messaging API.
|
3
|
+
#
|
4
|
+
# The version of the OpenAPI document: 0.0.1
|
5
|
+
#
|
6
|
+
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
7
|
+
# https://openapi-generator.tech
|
8
|
+
# Do not edit the class manually.
|
9
|
+
|
10
|
+
require 'json'
|
11
|
+
|
12
|
+
require 'line/bot/v2/http_client'
|
13
|
+
require 'line/bot/v2/reserved_words'
|
14
|
+
require 'line/bot/v2/utils'
|
15
|
+
|
16
|
+
module Line
|
17
|
+
module Bot
|
18
|
+
module V2
|
19
|
+
module MessagingApi
|
20
|
+
class ApiClient
|
21
|
+
# Initializes a new {Line::Bot::V2::MessagingApi::ApiClient} instance.
|
22
|
+
#
|
23
|
+
# @param base_url [String] The base URL for requests (optional).
|
24
|
+
# Defaults to 'https://api.line.me' if none is provided.
|
25
|
+
# You can override this for testing or to use a mock server.
|
26
|
+
# @param channel_access_token [String] The channel access token for authorization.
|
27
|
+
# @param http_options [Hash] HTTP options (same as Net::HTTP options).
|
28
|
+
# See: https://docs.ruby-lang.org/en/3.4/Net/HTTP.html to understand the options.
|
29
|
+
#
|
30
|
+
# @example
|
31
|
+
# @client ||= Line::Bot::V2::MessagingApi::ApiClient.new(
|
32
|
+
# channel_access_token: "YOUR_CHANNEL_ACCESS_TOKEN",
|
33
|
+
# http_options: {
|
34
|
+
# open_timeout: 5,
|
35
|
+
# read_timeout: 5,
|
36
|
+
# }
|
37
|
+
# )
|
38
|
+
def initialize(base_url: nil, channel_access_token:, http_options: {})
|
39
|
+
@http_client = HttpClient.new(
|
40
|
+
base_url: base_url || 'https://api.line.me',
|
41
|
+
http_headers: {
|
42
|
+
Authorization: "Bearer #{channel_access_token}"
|
43
|
+
},
|
44
|
+
http_options: http_options
|
45
|
+
)
|
46
|
+
end
|
47
|
+
|
48
|
+
# Sends a message to multiple users at any time.
|
49
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/broadcast</code>
|
50
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
51
|
+
#
|
52
|
+
# @param broadcast_request [BroadcastRequest]
|
53
|
+
# @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.
|
54
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#send-broadcast-message
|
55
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
56
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 400
|
57
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 403
|
58
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 409
|
59
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 429
|
60
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
61
|
+
def broadcast_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
62
|
+
broadcast_request:,
|
63
|
+
x_line_retry_key: nil
|
64
|
+
)
|
65
|
+
path = "/v2/bot/message/broadcast"
|
66
|
+
header_params = {
|
67
|
+
"X-Line-Retry-Key": x_line_retry_key
|
68
|
+
}.compact
|
69
|
+
|
70
|
+
response = @http_client.post(
|
71
|
+
path: path,
|
72
|
+
body_params: broadcast_request,
|
73
|
+
headers: header_params
|
74
|
+
)
|
75
|
+
|
76
|
+
case response.code.to_i
|
77
|
+
when 200
|
78
|
+
[response.body, 200, response.each_header.to_h]
|
79
|
+
when 400
|
80
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
81
|
+
json.transform_keys! do |key|
|
82
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
83
|
+
end
|
84
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
85
|
+
[response_body, 400, response.each_header.to_h]
|
86
|
+
when 403
|
87
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
88
|
+
json.transform_keys! do |key|
|
89
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
90
|
+
end
|
91
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
92
|
+
[response_body, 403, response.each_header.to_h]
|
93
|
+
when 409
|
94
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
95
|
+
json.transform_keys! do |key|
|
96
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
97
|
+
end
|
98
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
99
|
+
[response_body, 409, response.each_header.to_h]
|
100
|
+
when 429
|
101
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
102
|
+
json.transform_keys! do |key|
|
103
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
104
|
+
end
|
105
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
106
|
+
[response_body, 429, response.each_header.to_h]
|
107
|
+
else
|
108
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
# Sends a message to multiple users at any time.
|
113
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/broadcast</code>
|
114
|
+
# When you want to get HTTP status code or response headers, use {#broadcast_with_http_info} instead of this.
|
115
|
+
#
|
116
|
+
# @param broadcast_request [BroadcastRequest]
|
117
|
+
# @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.
|
118
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#send-broadcast-message
|
119
|
+
# @return [String, nil] when HTTP status code is 200
|
120
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400
|
121
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 403
|
122
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 409
|
123
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 429
|
124
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
125
|
+
def broadcast(
|
126
|
+
broadcast_request:,
|
127
|
+
x_line_retry_key: nil
|
128
|
+
)
|
129
|
+
response_body, _status_code, _headers = broadcast_with_http_info(
|
130
|
+
broadcast_request: broadcast_request,
|
131
|
+
x_line_retry_key: x_line_retry_key
|
132
|
+
)
|
133
|
+
|
134
|
+
response_body
|
135
|
+
end
|
136
|
+
|
137
|
+
# Cancel default rich menu
|
138
|
+
# This requests to <code>DELETE https://api.line.me/v2/bot/user/all/richmenu</code>
|
139
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
140
|
+
#
|
141
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#cancel-default-rich-menu
|
142
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
143
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
144
|
+
def cancel_default_rich_menu_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
145
|
+
)
|
146
|
+
path = "/v2/bot/user/all/richmenu"
|
147
|
+
|
148
|
+
response = @http_client.delete(
|
149
|
+
path: path,
|
150
|
+
)
|
151
|
+
|
152
|
+
case response.code.to_i
|
153
|
+
when 200
|
154
|
+
[response.body, 200, response.each_header.to_h]
|
155
|
+
else
|
156
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
# Cancel default rich menu
|
161
|
+
# This requests to <code>DELETE https://api.line.me/v2/bot/user/all/richmenu</code>
|
162
|
+
# When you want to get HTTP status code or response headers, use {#cancel_default_rich_menu_with_http_info} instead of this.
|
163
|
+
#
|
164
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#cancel-default-rich-menu
|
165
|
+
# @return [String, nil] when HTTP status code is 200
|
166
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
167
|
+
def cancel_default_rich_menu(
|
168
|
+
)
|
169
|
+
response_body, _status_code, _headers = cancel_default_rich_menu_with_http_info(
|
170
|
+
)
|
171
|
+
|
172
|
+
response_body
|
173
|
+
end
|
174
|
+
|
175
|
+
# Create rich menu
|
176
|
+
# This requests to <code>POST https://api.line.me/v2/bot/richmenu</code>
|
177
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
178
|
+
#
|
179
|
+
# @param rich_menu_request [RichMenuRequest]
|
180
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#create-rich-menu
|
181
|
+
# @return [Array(Line::Bot::V2::MessagingApi::RichMenuIdResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
182
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
183
|
+
def create_rich_menu_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
184
|
+
rich_menu_request:
|
185
|
+
)
|
186
|
+
path = "/v2/bot/richmenu"
|
187
|
+
|
188
|
+
response = @http_client.post(
|
189
|
+
path: path,
|
190
|
+
body_params: rich_menu_request,
|
191
|
+
)
|
192
|
+
|
193
|
+
case response.code.to_i
|
194
|
+
when 200
|
195
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
196
|
+
json.transform_keys! do |key|
|
197
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
198
|
+
end
|
199
|
+
response_body = Line::Bot::V2::MessagingApi::RichMenuIdResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
200
|
+
[response_body, 200, response.each_header.to_h]
|
201
|
+
else
|
202
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
# Create rich menu
|
207
|
+
# This requests to <code>POST https://api.line.me/v2/bot/richmenu</code>
|
208
|
+
# When you want to get HTTP status code or response headers, use {#create_rich_menu_with_http_info} instead of this.
|
209
|
+
#
|
210
|
+
# @param rich_menu_request [RichMenuRequest]
|
211
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#create-rich-menu
|
212
|
+
# @return [Line::Bot::V2::MessagingApi::RichMenuIdResponse] when HTTP status code is 200
|
213
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
214
|
+
def create_rich_menu(
|
215
|
+
rich_menu_request:
|
216
|
+
)
|
217
|
+
response_body, _status_code, _headers = create_rich_menu_with_http_info(
|
218
|
+
rich_menu_request: rich_menu_request
|
219
|
+
)
|
220
|
+
|
221
|
+
response_body
|
222
|
+
end
|
223
|
+
|
224
|
+
# Create rich menu alias
|
225
|
+
# This requests to <code>POST https://api.line.me/v2/bot/richmenu/alias</code>
|
226
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
227
|
+
#
|
228
|
+
# @param create_rich_menu_alias_request [CreateRichMenuAliasRequest]
|
229
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#create-rich-menu-alias
|
230
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
231
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 400
|
232
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
233
|
+
def create_rich_menu_alias_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
234
|
+
create_rich_menu_alias_request:
|
235
|
+
)
|
236
|
+
path = "/v2/bot/richmenu/alias"
|
237
|
+
|
238
|
+
response = @http_client.post(
|
239
|
+
path: path,
|
240
|
+
body_params: create_rich_menu_alias_request,
|
241
|
+
)
|
242
|
+
|
243
|
+
case response.code.to_i
|
244
|
+
when 200
|
245
|
+
[response.body, 200, response.each_header.to_h]
|
246
|
+
when 400
|
247
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
248
|
+
json.transform_keys! do |key|
|
249
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
250
|
+
end
|
251
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
252
|
+
[response_body, 400, response.each_header.to_h]
|
253
|
+
else
|
254
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
258
|
+
# Create rich menu alias
|
259
|
+
# This requests to <code>POST https://api.line.me/v2/bot/richmenu/alias</code>
|
260
|
+
# When you want to get HTTP status code or response headers, use {#create_rich_menu_alias_with_http_info} instead of this.
|
261
|
+
#
|
262
|
+
# @param create_rich_menu_alias_request [CreateRichMenuAliasRequest]
|
263
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#create-rich-menu-alias
|
264
|
+
# @return [String, nil] when HTTP status code is 200
|
265
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400
|
266
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
267
|
+
def create_rich_menu_alias(
|
268
|
+
create_rich_menu_alias_request:
|
269
|
+
)
|
270
|
+
response_body, _status_code, _headers = create_rich_menu_alias_with_http_info(
|
271
|
+
create_rich_menu_alias_request: create_rich_menu_alias_request
|
272
|
+
)
|
273
|
+
|
274
|
+
response_body
|
275
|
+
end
|
276
|
+
|
277
|
+
# Deletes a rich menu.
|
278
|
+
# This requests to <code>DELETE https://api.line.me/v2/bot/richmenu/{richMenuId}</code>
|
279
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
280
|
+
#
|
281
|
+
# @param rich_menu_id [String] ID of a rich menu
|
282
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#delete-rich-menu
|
283
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
284
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
285
|
+
def delete_rich_menu_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
286
|
+
rich_menu_id:
|
287
|
+
)
|
288
|
+
path = "/v2/bot/richmenu/{richMenuId}"
|
289
|
+
.gsub(/{richMenuId}/, rich_menu_id.to_s)
|
290
|
+
|
291
|
+
response = @http_client.delete(
|
292
|
+
path: path,
|
293
|
+
)
|
294
|
+
|
295
|
+
case response.code.to_i
|
296
|
+
when 200
|
297
|
+
[response.body, 200, response.each_header.to_h]
|
298
|
+
else
|
299
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
300
|
+
end
|
301
|
+
end
|
302
|
+
|
303
|
+
# Deletes a rich menu.
|
304
|
+
# This requests to <code>DELETE https://api.line.me/v2/bot/richmenu/{richMenuId}</code>
|
305
|
+
# When you want to get HTTP status code or response headers, use {#delete_rich_menu_with_http_info} instead of this.
|
306
|
+
#
|
307
|
+
# @param rich_menu_id [String] ID of a rich menu
|
308
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#delete-rich-menu
|
309
|
+
# @return [String, nil] when HTTP status code is 200
|
310
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
311
|
+
def delete_rich_menu(
|
312
|
+
rich_menu_id:
|
313
|
+
)
|
314
|
+
response_body, _status_code, _headers = delete_rich_menu_with_http_info(
|
315
|
+
rich_menu_id: rich_menu_id
|
316
|
+
)
|
317
|
+
|
318
|
+
response_body
|
319
|
+
end
|
320
|
+
|
321
|
+
# Delete rich menu alias
|
322
|
+
# This requests to <code>DELETE https://api.line.me/v2/bot/richmenu/alias/{richMenuAliasId}</code>
|
323
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
324
|
+
#
|
325
|
+
# @param rich_menu_alias_id [String] Rich menu alias ID that you want to delete.
|
326
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#delete-rich-menu-alias
|
327
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
328
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 400
|
329
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
330
|
+
def delete_rich_menu_alias_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
331
|
+
rich_menu_alias_id:
|
332
|
+
)
|
333
|
+
path = "/v2/bot/richmenu/alias/{richMenuAliasId}"
|
334
|
+
.gsub(/{richMenuAliasId}/, rich_menu_alias_id.to_s)
|
335
|
+
|
336
|
+
response = @http_client.delete(
|
337
|
+
path: path,
|
338
|
+
)
|
339
|
+
|
340
|
+
case response.code.to_i
|
341
|
+
when 200
|
342
|
+
[response.body, 200, response.each_header.to_h]
|
343
|
+
when 400
|
344
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
345
|
+
json.transform_keys! do |key|
|
346
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
347
|
+
end
|
348
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
349
|
+
[response_body, 400, response.each_header.to_h]
|
350
|
+
else
|
351
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
352
|
+
end
|
353
|
+
end
|
354
|
+
|
355
|
+
# Delete rich menu alias
|
356
|
+
# This requests to <code>DELETE https://api.line.me/v2/bot/richmenu/alias/{richMenuAliasId}</code>
|
357
|
+
# When you want to get HTTP status code or response headers, use {#delete_rich_menu_alias_with_http_info} instead of this.
|
358
|
+
#
|
359
|
+
# @param rich_menu_alias_id [String] Rich menu alias ID that you want to delete.
|
360
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#delete-rich-menu-alias
|
361
|
+
# @return [String, nil] when HTTP status code is 200
|
362
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400
|
363
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
364
|
+
def delete_rich_menu_alias(
|
365
|
+
rich_menu_alias_id:
|
366
|
+
)
|
367
|
+
response_body, _status_code, _headers = delete_rich_menu_alias_with_http_info(
|
368
|
+
rich_menu_alias_id: rich_menu_alias_id
|
369
|
+
)
|
370
|
+
|
371
|
+
response_body
|
372
|
+
end
|
373
|
+
|
374
|
+
# Get name list of units used this month
|
375
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/aggregation/list</code>
|
376
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
377
|
+
#
|
378
|
+
# @param limit [String, nil] The maximum number of aggregation units you can get per request.
|
379
|
+
# @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.
|
380
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-name-list-of-units-used-this-month
|
381
|
+
# @return [Array(Line::Bot::V2::MessagingApi::GetAggregationUnitNameListResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
382
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
383
|
+
def get_aggregation_unit_name_list_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
384
|
+
limit: nil,
|
385
|
+
start: nil
|
386
|
+
)
|
387
|
+
path = "/v2/bot/message/aggregation/list"
|
388
|
+
query_params = {
|
389
|
+
"limit": limit,
|
390
|
+
"start": start
|
391
|
+
}.compact
|
392
|
+
|
393
|
+
response = @http_client.get(
|
394
|
+
path: path,
|
395
|
+
query_params: query_params,
|
396
|
+
)
|
397
|
+
|
398
|
+
case response.code.to_i
|
399
|
+
when 200
|
400
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
401
|
+
json.transform_keys! do |key|
|
402
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
403
|
+
end
|
404
|
+
response_body = Line::Bot::V2::MessagingApi::GetAggregationUnitNameListResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
405
|
+
[response_body, 200, response.each_header.to_h]
|
406
|
+
else
|
407
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
408
|
+
end
|
409
|
+
end
|
410
|
+
|
411
|
+
# Get name list of units used this month
|
412
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/aggregation/list</code>
|
413
|
+
# When you want to get HTTP status code or response headers, use {#get_aggregation_unit_name_list_with_http_info} instead of this.
|
414
|
+
#
|
415
|
+
# @param limit [String, nil] The maximum number of aggregation units you can get per request.
|
416
|
+
# @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.
|
417
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-name-list-of-units-used-this-month
|
418
|
+
# @return [Line::Bot::V2::MessagingApi::GetAggregationUnitNameListResponse] when HTTP status code is 200
|
419
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
420
|
+
def get_aggregation_unit_name_list(
|
421
|
+
limit: nil,
|
422
|
+
start: nil
|
423
|
+
)
|
424
|
+
response_body, _status_code, _headers = get_aggregation_unit_name_list_with_http_info(
|
425
|
+
limit: limit,
|
426
|
+
start: start
|
427
|
+
)
|
428
|
+
|
429
|
+
response_body
|
430
|
+
end
|
431
|
+
|
432
|
+
# Get number of units used this month
|
433
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/aggregation/info</code>
|
434
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
435
|
+
#
|
436
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-number-of-units-used-this-month
|
437
|
+
# @return [Array(Line::Bot::V2::MessagingApi::GetAggregationUnitUsageResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
438
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
439
|
+
def get_aggregation_unit_usage_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
440
|
+
)
|
441
|
+
path = "/v2/bot/message/aggregation/info"
|
442
|
+
|
443
|
+
response = @http_client.get(
|
444
|
+
path: path,
|
445
|
+
)
|
446
|
+
|
447
|
+
case response.code.to_i
|
448
|
+
when 200
|
449
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
450
|
+
json.transform_keys! do |key|
|
451
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
452
|
+
end
|
453
|
+
response_body = Line::Bot::V2::MessagingApi::GetAggregationUnitUsageResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
454
|
+
[response_body, 200, response.each_header.to_h]
|
455
|
+
else
|
456
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
457
|
+
end
|
458
|
+
end
|
459
|
+
|
460
|
+
# Get number of units used this month
|
461
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/aggregation/info</code>
|
462
|
+
# When you want to get HTTP status code or response headers, use {#get_aggregation_unit_usage_with_http_info} instead of this.
|
463
|
+
#
|
464
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-number-of-units-used-this-month
|
465
|
+
# @return [Line::Bot::V2::MessagingApi::GetAggregationUnitUsageResponse] when HTTP status code is 200
|
466
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
467
|
+
def get_aggregation_unit_usage(
|
468
|
+
)
|
469
|
+
response_body, _status_code, _headers = get_aggregation_unit_usage_with_http_info(
|
470
|
+
)
|
471
|
+
|
472
|
+
response_body
|
473
|
+
end
|
474
|
+
|
475
|
+
# Get bot info
|
476
|
+
# This requests to <code>GET https://api.line.me/v2/bot/info</code>
|
477
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
478
|
+
#
|
479
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-bot-info
|
480
|
+
# @return [Array(Line::Bot::V2::MessagingApi::BotInfoResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
481
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
482
|
+
def get_bot_info_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
483
|
+
)
|
484
|
+
path = "/v2/bot/info"
|
485
|
+
|
486
|
+
response = @http_client.get(
|
487
|
+
path: path,
|
488
|
+
)
|
489
|
+
|
490
|
+
case response.code.to_i
|
491
|
+
when 200
|
492
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
493
|
+
json.transform_keys! do |key|
|
494
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
495
|
+
end
|
496
|
+
response_body = Line::Bot::V2::MessagingApi::BotInfoResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
497
|
+
[response_body, 200, response.each_header.to_h]
|
498
|
+
else
|
499
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
500
|
+
end
|
501
|
+
end
|
502
|
+
|
503
|
+
# Get bot info
|
504
|
+
# This requests to <code>GET https://api.line.me/v2/bot/info</code>
|
505
|
+
# When you want to get HTTP status code or response headers, use {#get_bot_info_with_http_info} instead of this.
|
506
|
+
#
|
507
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-bot-info
|
508
|
+
# @return [Line::Bot::V2::MessagingApi::BotInfoResponse] when HTTP status code is 200
|
509
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
510
|
+
def get_bot_info(
|
511
|
+
)
|
512
|
+
response_body, _status_code, _headers = get_bot_info_with_http_info(
|
513
|
+
)
|
514
|
+
|
515
|
+
response_body
|
516
|
+
end
|
517
|
+
|
518
|
+
# Gets the ID of the default rich menu set with the Messaging API.
|
519
|
+
# This requests to <code>GET https://api.line.me/v2/bot/user/all/richmenu</code>
|
520
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
521
|
+
#
|
522
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-default-rich-menu-id
|
523
|
+
# @return [Array(Line::Bot::V2::MessagingApi::RichMenuIdResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
524
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
525
|
+
def get_default_rich_menu_id_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
526
|
+
)
|
527
|
+
path = "/v2/bot/user/all/richmenu"
|
528
|
+
|
529
|
+
response = @http_client.get(
|
530
|
+
path: path,
|
531
|
+
)
|
532
|
+
|
533
|
+
case response.code.to_i
|
534
|
+
when 200
|
535
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
536
|
+
json.transform_keys! do |key|
|
537
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
538
|
+
end
|
539
|
+
response_body = Line::Bot::V2::MessagingApi::RichMenuIdResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
540
|
+
[response_body, 200, response.each_header.to_h]
|
541
|
+
else
|
542
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
543
|
+
end
|
544
|
+
end
|
545
|
+
|
546
|
+
# Gets the ID of the default rich menu set with the Messaging API.
|
547
|
+
# This requests to <code>GET https://api.line.me/v2/bot/user/all/richmenu</code>
|
548
|
+
# When you want to get HTTP status code or response headers, use {#get_default_rich_menu_id_with_http_info} instead of this.
|
549
|
+
#
|
550
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-default-rich-menu-id
|
551
|
+
# @return [Line::Bot::V2::MessagingApi::RichMenuIdResponse] when HTTP status code is 200
|
552
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
553
|
+
def get_default_rich_menu_id(
|
554
|
+
)
|
555
|
+
response_body, _status_code, _headers = get_default_rich_menu_id_with_http_info(
|
556
|
+
)
|
557
|
+
|
558
|
+
response_body
|
559
|
+
end
|
560
|
+
|
561
|
+
# Get a list of users who added your LINE Official Account as a friend
|
562
|
+
# This requests to <code>GET https://api.line.me/v2/bot/followers/ids</code>
|
563
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
564
|
+
#
|
565
|
+
# @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.
|
566
|
+
# @param limit [Integer, nil] The maximum number of user IDs to retrieve in a single request.
|
567
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-follower-ids
|
568
|
+
# @return [Array(Line::Bot::V2::MessagingApi::GetFollowersResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
569
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
570
|
+
def get_followers_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
571
|
+
start: nil,
|
572
|
+
limit: nil
|
573
|
+
)
|
574
|
+
path = "/v2/bot/followers/ids"
|
575
|
+
query_params = {
|
576
|
+
"start": start,
|
577
|
+
"limit": limit
|
578
|
+
}.compact
|
579
|
+
|
580
|
+
response = @http_client.get(
|
581
|
+
path: path,
|
582
|
+
query_params: query_params,
|
583
|
+
)
|
584
|
+
|
585
|
+
case response.code.to_i
|
586
|
+
when 200
|
587
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
588
|
+
json.transform_keys! do |key|
|
589
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
590
|
+
end
|
591
|
+
response_body = Line::Bot::V2::MessagingApi::GetFollowersResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
592
|
+
[response_body, 200, response.each_header.to_h]
|
593
|
+
else
|
594
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
595
|
+
end
|
596
|
+
end
|
597
|
+
|
598
|
+
# Get a list of users who added your LINE Official Account as a friend
|
599
|
+
# This requests to <code>GET https://api.line.me/v2/bot/followers/ids</code>
|
600
|
+
# When you want to get HTTP status code or response headers, use {#get_followers_with_http_info} instead of this.
|
601
|
+
#
|
602
|
+
# @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.
|
603
|
+
# @param limit [Integer, nil] The maximum number of user IDs to retrieve in a single request.
|
604
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-follower-ids
|
605
|
+
# @return [Line::Bot::V2::MessagingApi::GetFollowersResponse] when HTTP status code is 200
|
606
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
607
|
+
def get_followers(
|
608
|
+
start: nil,
|
609
|
+
limit: nil
|
610
|
+
)
|
611
|
+
response_body, _status_code, _headers = get_followers_with_http_info(
|
612
|
+
start: start,
|
613
|
+
limit: limit
|
614
|
+
)
|
615
|
+
|
616
|
+
response_body
|
617
|
+
end
|
618
|
+
|
619
|
+
# Get number of users in a group chat
|
620
|
+
# This requests to <code>GET https://api.line.me/v2/bot/group/{groupId}/members/count</code>
|
621
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
622
|
+
#
|
623
|
+
# @param group_id [String] Group ID
|
624
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-members-group-count
|
625
|
+
# @return [Array(Line::Bot::V2::MessagingApi::GroupMemberCountResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
626
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
627
|
+
def get_group_member_count_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
628
|
+
group_id:
|
629
|
+
)
|
630
|
+
path = "/v2/bot/group/{groupId}/members/count"
|
631
|
+
.gsub(/{groupId}/, group_id.to_s)
|
632
|
+
|
633
|
+
response = @http_client.get(
|
634
|
+
path: path,
|
635
|
+
)
|
636
|
+
|
637
|
+
case response.code.to_i
|
638
|
+
when 200
|
639
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
640
|
+
json.transform_keys! do |key|
|
641
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
642
|
+
end
|
643
|
+
response_body = Line::Bot::V2::MessagingApi::GroupMemberCountResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
644
|
+
[response_body, 200, response.each_header.to_h]
|
645
|
+
else
|
646
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
647
|
+
end
|
648
|
+
end
|
649
|
+
|
650
|
+
# Get number of users in a group chat
|
651
|
+
# This requests to <code>GET https://api.line.me/v2/bot/group/{groupId}/members/count</code>
|
652
|
+
# When you want to get HTTP status code or response headers, use {#get_group_member_count_with_http_info} instead of this.
|
653
|
+
#
|
654
|
+
# @param group_id [String] Group ID
|
655
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-members-group-count
|
656
|
+
# @return [Line::Bot::V2::MessagingApi::GroupMemberCountResponse] when HTTP status code is 200
|
657
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
658
|
+
def get_group_member_count(
|
659
|
+
group_id:
|
660
|
+
)
|
661
|
+
response_body, _status_code, _headers = get_group_member_count_with_http_info(
|
662
|
+
group_id: group_id
|
663
|
+
)
|
664
|
+
|
665
|
+
response_body
|
666
|
+
end
|
667
|
+
|
668
|
+
# Get group chat member profile
|
669
|
+
# This requests to <code>GET https://api.line.me/v2/bot/group/{groupId}/member/{userId}</code>
|
670
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
671
|
+
#
|
672
|
+
# @param group_id [String] Group ID
|
673
|
+
# @param user_id [String] User ID
|
674
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-group-member-profile
|
675
|
+
# @return [Array(Line::Bot::V2::MessagingApi::GroupUserProfileResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
676
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
677
|
+
def get_group_member_profile_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
678
|
+
group_id:,
|
679
|
+
user_id:
|
680
|
+
)
|
681
|
+
path = "/v2/bot/group/{groupId}/member/{userId}"
|
682
|
+
.gsub(/{groupId}/, group_id.to_s)
|
683
|
+
.gsub(/{userId}/, user_id.to_s)
|
684
|
+
|
685
|
+
response = @http_client.get(
|
686
|
+
path: path,
|
687
|
+
)
|
688
|
+
|
689
|
+
case response.code.to_i
|
690
|
+
when 200
|
691
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
692
|
+
json.transform_keys! do |key|
|
693
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
694
|
+
end
|
695
|
+
response_body = Line::Bot::V2::MessagingApi::GroupUserProfileResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
696
|
+
[response_body, 200, response.each_header.to_h]
|
697
|
+
else
|
698
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
699
|
+
end
|
700
|
+
end
|
701
|
+
|
702
|
+
# Get group chat member profile
|
703
|
+
# This requests to <code>GET https://api.line.me/v2/bot/group/{groupId}/member/{userId}</code>
|
704
|
+
# When you want to get HTTP status code or response headers, use {#get_group_member_profile_with_http_info} instead of this.
|
705
|
+
#
|
706
|
+
# @param group_id [String] Group ID
|
707
|
+
# @param user_id [String] User ID
|
708
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-group-member-profile
|
709
|
+
# @return [Line::Bot::V2::MessagingApi::GroupUserProfileResponse] when HTTP status code is 200
|
710
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
711
|
+
def get_group_member_profile(
|
712
|
+
group_id:,
|
713
|
+
user_id:
|
714
|
+
)
|
715
|
+
response_body, _status_code, _headers = get_group_member_profile_with_http_info(
|
716
|
+
group_id: group_id,
|
717
|
+
user_id: user_id
|
718
|
+
)
|
719
|
+
|
720
|
+
response_body
|
721
|
+
end
|
722
|
+
|
723
|
+
# Get group chat member user IDs
|
724
|
+
# This requests to <code>GET https://api.line.me/v2/bot/group/{groupId}/members/ids</code>
|
725
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
726
|
+
#
|
727
|
+
# @param group_id [String] Group ID
|
728
|
+
# @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.
|
729
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-group-member-user-ids
|
730
|
+
# @return [Array(Line::Bot::V2::MessagingApi::MembersIdsResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
731
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
732
|
+
def get_group_members_ids_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
733
|
+
group_id:,
|
734
|
+
start: nil
|
735
|
+
)
|
736
|
+
path = "/v2/bot/group/{groupId}/members/ids"
|
737
|
+
.gsub(/{groupId}/, group_id.to_s)
|
738
|
+
query_params = {
|
739
|
+
"start": start
|
740
|
+
}.compact
|
741
|
+
|
742
|
+
response = @http_client.get(
|
743
|
+
path: path,
|
744
|
+
query_params: query_params,
|
745
|
+
)
|
746
|
+
|
747
|
+
case response.code.to_i
|
748
|
+
when 200
|
749
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
750
|
+
json.transform_keys! do |key|
|
751
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
752
|
+
end
|
753
|
+
response_body = Line::Bot::V2::MessagingApi::MembersIdsResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
754
|
+
[response_body, 200, response.each_header.to_h]
|
755
|
+
else
|
756
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
757
|
+
end
|
758
|
+
end
|
759
|
+
|
760
|
+
# Get group chat member user IDs
|
761
|
+
# This requests to <code>GET https://api.line.me/v2/bot/group/{groupId}/members/ids</code>
|
762
|
+
# When you want to get HTTP status code or response headers, use {#get_group_members_ids_with_http_info} instead of this.
|
763
|
+
#
|
764
|
+
# @param group_id [String] Group ID
|
765
|
+
# @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.
|
766
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-group-member-user-ids
|
767
|
+
# @return [Line::Bot::V2::MessagingApi::MembersIdsResponse] when HTTP status code is 200
|
768
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
769
|
+
def get_group_members_ids(
|
770
|
+
group_id:,
|
771
|
+
start: nil
|
772
|
+
)
|
773
|
+
response_body, _status_code, _headers = get_group_members_ids_with_http_info(
|
774
|
+
group_id: group_id,
|
775
|
+
start: start
|
776
|
+
)
|
777
|
+
|
778
|
+
response_body
|
779
|
+
end
|
780
|
+
|
781
|
+
# Get group chat summary
|
782
|
+
# This requests to <code>GET https://api.line.me/v2/bot/group/{groupId}/summary</code>
|
783
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
784
|
+
#
|
785
|
+
# @param group_id [String] Group ID
|
786
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-group-summary
|
787
|
+
# @return [Array(Line::Bot::V2::MessagingApi::GroupSummaryResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
788
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
789
|
+
def get_group_summary_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
790
|
+
group_id:
|
791
|
+
)
|
792
|
+
path = "/v2/bot/group/{groupId}/summary"
|
793
|
+
.gsub(/{groupId}/, group_id.to_s)
|
794
|
+
|
795
|
+
response = @http_client.get(
|
796
|
+
path: path,
|
797
|
+
)
|
798
|
+
|
799
|
+
case response.code.to_i
|
800
|
+
when 200
|
801
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
802
|
+
json.transform_keys! do |key|
|
803
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
804
|
+
end
|
805
|
+
response_body = Line::Bot::V2::MessagingApi::GroupSummaryResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
806
|
+
[response_body, 200, response.each_header.to_h]
|
807
|
+
else
|
808
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
809
|
+
end
|
810
|
+
end
|
811
|
+
|
812
|
+
# Get group chat summary
|
813
|
+
# This requests to <code>GET https://api.line.me/v2/bot/group/{groupId}/summary</code>
|
814
|
+
# When you want to get HTTP status code or response headers, use {#get_group_summary_with_http_info} instead of this.
|
815
|
+
#
|
816
|
+
# @param group_id [String] Group ID
|
817
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-group-summary
|
818
|
+
# @return [Line::Bot::V2::MessagingApi::GroupSummaryResponse] when HTTP status code is 200
|
819
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
820
|
+
def get_group_summary(
|
821
|
+
group_id:
|
822
|
+
)
|
823
|
+
response_body, _status_code, _headers = get_group_summary_with_http_info(
|
824
|
+
group_id: group_id
|
825
|
+
)
|
826
|
+
|
827
|
+
response_body
|
828
|
+
end
|
829
|
+
|
830
|
+
# Get a list of user IDs who joined the membership.
|
831
|
+
# This requests to <code>GET https://api.line.me/v2/bot/membership/{membershipId}/users/ids</code>
|
832
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
833
|
+
#
|
834
|
+
# @param membership_id [Integer] Membership plan ID.
|
835
|
+
# @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).
|
836
|
+
# @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.
|
837
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-membership-user-ids
|
838
|
+
# @return [Array(Line::Bot::V2::MessagingApi::GetJoinedMembershipUsersResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
839
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 400
|
840
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 404
|
841
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
842
|
+
def get_joined_membership_users_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
843
|
+
membership_id:,
|
844
|
+
start: nil,
|
845
|
+
limit: nil
|
846
|
+
)
|
847
|
+
path = "/v2/bot/membership/{membershipId}/users/ids"
|
848
|
+
.gsub(/{membershipId}/, membership_id.to_s)
|
849
|
+
query_params = {
|
850
|
+
"start": start,
|
851
|
+
"limit": limit
|
852
|
+
}.compact
|
853
|
+
|
854
|
+
response = @http_client.get(
|
855
|
+
path: path,
|
856
|
+
query_params: query_params,
|
857
|
+
)
|
858
|
+
|
859
|
+
case response.code.to_i
|
860
|
+
when 200
|
861
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
862
|
+
json.transform_keys! do |key|
|
863
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
864
|
+
end
|
865
|
+
response_body = Line::Bot::V2::MessagingApi::GetJoinedMembershipUsersResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
866
|
+
[response_body, 200, response.each_header.to_h]
|
867
|
+
when 400
|
868
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
869
|
+
json.transform_keys! do |key|
|
870
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
871
|
+
end
|
872
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
873
|
+
[response_body, 400, response.each_header.to_h]
|
874
|
+
when 404
|
875
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
876
|
+
json.transform_keys! do |key|
|
877
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
878
|
+
end
|
879
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
880
|
+
[response_body, 404, response.each_header.to_h]
|
881
|
+
else
|
882
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
883
|
+
end
|
884
|
+
end
|
885
|
+
|
886
|
+
# Get a list of user IDs who joined the membership.
|
887
|
+
# This requests to <code>GET https://api.line.me/v2/bot/membership/{membershipId}/users/ids</code>
|
888
|
+
# When you want to get HTTP status code or response headers, use {#get_joined_membership_users_with_http_info} instead of this.
|
889
|
+
#
|
890
|
+
# @param membership_id [Integer] Membership plan ID.
|
891
|
+
# @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).
|
892
|
+
# @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.
|
893
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-membership-user-ids
|
894
|
+
# @return [Line::Bot::V2::MessagingApi::GetJoinedMembershipUsersResponse] when HTTP status code is 200
|
895
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400
|
896
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 404
|
897
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
898
|
+
def get_joined_membership_users(
|
899
|
+
membership_id:,
|
900
|
+
start: nil,
|
901
|
+
limit: nil
|
902
|
+
)
|
903
|
+
response_body, _status_code, _headers = get_joined_membership_users_with_http_info(
|
904
|
+
membership_id: membership_id,
|
905
|
+
start: start,
|
906
|
+
limit: limit
|
907
|
+
)
|
908
|
+
|
909
|
+
response_body
|
910
|
+
end
|
911
|
+
|
912
|
+
# Get a list of memberships.
|
913
|
+
# This requests to <code>GET https://api.line.me/v2/bot/membership/list</code>
|
914
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
915
|
+
#
|
916
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-membership-plans
|
917
|
+
# @return [Array(Line::Bot::V2::MessagingApi::MembershipListResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
918
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 404
|
919
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
920
|
+
def get_membership_list_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
921
|
+
)
|
922
|
+
path = "/v2/bot/membership/list"
|
923
|
+
|
924
|
+
response = @http_client.get(
|
925
|
+
path: path,
|
926
|
+
)
|
927
|
+
|
928
|
+
case response.code.to_i
|
929
|
+
when 200
|
930
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
931
|
+
json.transform_keys! do |key|
|
932
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
933
|
+
end
|
934
|
+
response_body = Line::Bot::V2::MessagingApi::MembershipListResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
935
|
+
[response_body, 200, response.each_header.to_h]
|
936
|
+
when 404
|
937
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
938
|
+
json.transform_keys! do |key|
|
939
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
940
|
+
end
|
941
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
942
|
+
[response_body, 404, response.each_header.to_h]
|
943
|
+
else
|
944
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
945
|
+
end
|
946
|
+
end
|
947
|
+
|
948
|
+
# Get a list of memberships.
|
949
|
+
# This requests to <code>GET https://api.line.me/v2/bot/membership/list</code>
|
950
|
+
# When you want to get HTTP status code or response headers, use {#get_membership_list_with_http_info} instead of this.
|
951
|
+
#
|
952
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-membership-plans
|
953
|
+
# @return [Line::Bot::V2::MessagingApi::MembershipListResponse] when HTTP status code is 200
|
954
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 404
|
955
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
956
|
+
def get_membership_list(
|
957
|
+
)
|
958
|
+
response_body, _status_code, _headers = get_membership_list_with_http_info(
|
959
|
+
)
|
960
|
+
|
961
|
+
response_body
|
962
|
+
end
|
963
|
+
|
964
|
+
# Get a user's membership subscription.
|
965
|
+
# This requests to <code>GET https://api.line.me/v2/bot/membership/subscription/{userId}</code>
|
966
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
967
|
+
#
|
968
|
+
# @param user_id [String] User ID
|
969
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-a-users-membership-subscription-status
|
970
|
+
# @return [Array(Line::Bot::V2::MessagingApi::GetMembershipSubscriptionResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
971
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 400
|
972
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 404
|
973
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
974
|
+
def get_membership_subscription_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
975
|
+
user_id:
|
976
|
+
)
|
977
|
+
path = "/v2/bot/membership/subscription/{userId}"
|
978
|
+
.gsub(/{userId}/, user_id.to_s)
|
979
|
+
|
980
|
+
response = @http_client.get(
|
981
|
+
path: path,
|
982
|
+
)
|
983
|
+
|
984
|
+
case response.code.to_i
|
985
|
+
when 200
|
986
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
987
|
+
json.transform_keys! do |key|
|
988
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
989
|
+
end
|
990
|
+
response_body = Line::Bot::V2::MessagingApi::GetMembershipSubscriptionResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
991
|
+
[response_body, 200, response.each_header.to_h]
|
992
|
+
when 400
|
993
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
994
|
+
json.transform_keys! do |key|
|
995
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
996
|
+
end
|
997
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
998
|
+
[response_body, 400, response.each_header.to_h]
|
999
|
+
when 404
|
1000
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
1001
|
+
json.transform_keys! do |key|
|
1002
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
1003
|
+
end
|
1004
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
1005
|
+
[response_body, 404, response.each_header.to_h]
|
1006
|
+
else
|
1007
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
1008
|
+
end
|
1009
|
+
end
|
1010
|
+
|
1011
|
+
# Get a user's membership subscription.
|
1012
|
+
# This requests to <code>GET https://api.line.me/v2/bot/membership/subscription/{userId}</code>
|
1013
|
+
# When you want to get HTTP status code or response headers, use {#get_membership_subscription_with_http_info} instead of this.
|
1014
|
+
#
|
1015
|
+
# @param user_id [String] User ID
|
1016
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-a-users-membership-subscription-status
|
1017
|
+
# @return [Line::Bot::V2::MessagingApi::GetMembershipSubscriptionResponse] when HTTP status code is 200
|
1018
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400
|
1019
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 404
|
1020
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
1021
|
+
def get_membership_subscription(
|
1022
|
+
user_id:
|
1023
|
+
)
|
1024
|
+
response_body, _status_code, _headers = get_membership_subscription_with_http_info(
|
1025
|
+
user_id: user_id
|
1026
|
+
)
|
1027
|
+
|
1028
|
+
response_body
|
1029
|
+
end
|
1030
|
+
|
1031
|
+
# Gets the target limit for sending messages in the current month. The total number of the free messages and the additional messages is returned.
|
1032
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/quota</code>
|
1033
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
1034
|
+
#
|
1035
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-quota
|
1036
|
+
# @return [Array(Line::Bot::V2::MessagingApi::MessageQuotaResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
1037
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
1038
|
+
def get_message_quota_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
1039
|
+
)
|
1040
|
+
path = "/v2/bot/message/quota"
|
1041
|
+
|
1042
|
+
response = @http_client.get(
|
1043
|
+
path: path,
|
1044
|
+
)
|
1045
|
+
|
1046
|
+
case response.code.to_i
|
1047
|
+
when 200
|
1048
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
1049
|
+
json.transform_keys! do |key|
|
1050
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
1051
|
+
end
|
1052
|
+
response_body = Line::Bot::V2::MessagingApi::MessageQuotaResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
1053
|
+
[response_body, 200, response.each_header.to_h]
|
1054
|
+
else
|
1055
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
1056
|
+
end
|
1057
|
+
end
|
1058
|
+
|
1059
|
+
# Gets the target limit for sending messages in the current month. The total number of the free messages and the additional messages is returned.
|
1060
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/quota</code>
|
1061
|
+
# When you want to get HTTP status code or response headers, use {#get_message_quota_with_http_info} instead of this.
|
1062
|
+
#
|
1063
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-quota
|
1064
|
+
# @return [Line::Bot::V2::MessagingApi::MessageQuotaResponse] when HTTP status code is 200
|
1065
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
1066
|
+
def get_message_quota(
|
1067
|
+
)
|
1068
|
+
response_body, _status_code, _headers = get_message_quota_with_http_info(
|
1069
|
+
)
|
1070
|
+
|
1071
|
+
response_body
|
1072
|
+
end
|
1073
|
+
|
1074
|
+
# Gets the number of messages sent in the current month.
|
1075
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/quota/consumption</code>
|
1076
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
1077
|
+
#
|
1078
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-consumption
|
1079
|
+
# @return [Array(Line::Bot::V2::MessagingApi::QuotaConsumptionResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
1080
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
1081
|
+
def get_message_quota_consumption_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
1082
|
+
)
|
1083
|
+
path = "/v2/bot/message/quota/consumption"
|
1084
|
+
|
1085
|
+
response = @http_client.get(
|
1086
|
+
path: path,
|
1087
|
+
)
|
1088
|
+
|
1089
|
+
case response.code.to_i
|
1090
|
+
when 200
|
1091
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
1092
|
+
json.transform_keys! do |key|
|
1093
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
1094
|
+
end
|
1095
|
+
response_body = Line::Bot::V2::MessagingApi::QuotaConsumptionResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
1096
|
+
[response_body, 200, response.each_header.to_h]
|
1097
|
+
else
|
1098
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
1099
|
+
end
|
1100
|
+
end
|
1101
|
+
|
1102
|
+
# Gets the number of messages sent in the current month.
|
1103
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/quota/consumption</code>
|
1104
|
+
# When you want to get HTTP status code or response headers, use {#get_message_quota_consumption_with_http_info} instead of this.
|
1105
|
+
#
|
1106
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-consumption
|
1107
|
+
# @return [Line::Bot::V2::MessagingApi::QuotaConsumptionResponse] when HTTP status code is 200
|
1108
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
1109
|
+
def get_message_quota_consumption(
|
1110
|
+
)
|
1111
|
+
response_body, _status_code, _headers = get_message_quota_consumption_with_http_info(
|
1112
|
+
)
|
1113
|
+
|
1114
|
+
response_body
|
1115
|
+
end
|
1116
|
+
|
1117
|
+
# Gets the status of a narrowcast message.
|
1118
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/progress/narrowcast</code>
|
1119
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
1120
|
+
#
|
1121
|
+
# @param request_id [String] The narrowcast message's request ID. Each Messaging API request has a request ID.
|
1122
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-narrowcast-progress-status
|
1123
|
+
# @return [Array(Line::Bot::V2::MessagingApi::NarrowcastProgressResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
1124
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
1125
|
+
def get_narrowcast_progress_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
1126
|
+
request_id:
|
1127
|
+
)
|
1128
|
+
path = "/v2/bot/message/progress/narrowcast"
|
1129
|
+
query_params = {
|
1130
|
+
"requestId": request_id
|
1131
|
+
}.compact
|
1132
|
+
|
1133
|
+
response = @http_client.get(
|
1134
|
+
path: path,
|
1135
|
+
query_params: query_params,
|
1136
|
+
)
|
1137
|
+
|
1138
|
+
case response.code.to_i
|
1139
|
+
when 200
|
1140
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
1141
|
+
json.transform_keys! do |key|
|
1142
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
1143
|
+
end
|
1144
|
+
response_body = Line::Bot::V2::MessagingApi::NarrowcastProgressResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
1145
|
+
[response_body, 200, response.each_header.to_h]
|
1146
|
+
else
|
1147
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
1148
|
+
end
|
1149
|
+
end
|
1150
|
+
|
1151
|
+
# Gets the status of a narrowcast message.
|
1152
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/progress/narrowcast</code>
|
1153
|
+
# When you want to get HTTP status code or response headers, use {#get_narrowcast_progress_with_http_info} instead of this.
|
1154
|
+
#
|
1155
|
+
# @param request_id [String] The narrowcast message's request ID. Each Messaging API request has a request ID.
|
1156
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-narrowcast-progress-status
|
1157
|
+
# @return [Line::Bot::V2::MessagingApi::NarrowcastProgressResponse] when HTTP status code is 200
|
1158
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
1159
|
+
def get_narrowcast_progress(
|
1160
|
+
request_id:
|
1161
|
+
)
|
1162
|
+
response_body, _status_code, _headers = get_narrowcast_progress_with_http_info(
|
1163
|
+
request_id: request_id
|
1164
|
+
)
|
1165
|
+
|
1166
|
+
response_body
|
1167
|
+
end
|
1168
|
+
|
1169
|
+
# Get number of sent broadcast messages
|
1170
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/delivery/broadcast</code>
|
1171
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
1172
|
+
#
|
1173
|
+
# @param date [String] Date the messages were sent Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9
|
1174
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-number-of-broadcast-messages
|
1175
|
+
# @return [Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
1176
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
1177
|
+
def get_number_of_sent_broadcast_messages_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
1178
|
+
date:
|
1179
|
+
)
|
1180
|
+
path = "/v2/bot/message/delivery/broadcast"
|
1181
|
+
query_params = {
|
1182
|
+
"date": date
|
1183
|
+
}.compact
|
1184
|
+
|
1185
|
+
response = @http_client.get(
|
1186
|
+
path: path,
|
1187
|
+
query_params: query_params,
|
1188
|
+
)
|
1189
|
+
|
1190
|
+
case response.code.to_i
|
1191
|
+
when 200
|
1192
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
1193
|
+
json.transform_keys! do |key|
|
1194
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
1195
|
+
end
|
1196
|
+
response_body = Line::Bot::V2::MessagingApi::NumberOfMessagesResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
1197
|
+
[response_body, 200, response.each_header.to_h]
|
1198
|
+
else
|
1199
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
1200
|
+
end
|
1201
|
+
end
|
1202
|
+
|
1203
|
+
# Get number of sent broadcast messages
|
1204
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/delivery/broadcast</code>
|
1205
|
+
# When you want to get HTTP status code or response headers, use {#get_number_of_sent_broadcast_messages_with_http_info} instead of this.
|
1206
|
+
#
|
1207
|
+
# @param date [String] Date the messages were sent Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9
|
1208
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-number-of-broadcast-messages
|
1209
|
+
# @return [Line::Bot::V2::MessagingApi::NumberOfMessagesResponse] when HTTP status code is 200
|
1210
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
1211
|
+
def get_number_of_sent_broadcast_messages(
|
1212
|
+
date:
|
1213
|
+
)
|
1214
|
+
response_body, _status_code, _headers = get_number_of_sent_broadcast_messages_with_http_info(
|
1215
|
+
date: date
|
1216
|
+
)
|
1217
|
+
|
1218
|
+
response_body
|
1219
|
+
end
|
1220
|
+
|
1221
|
+
# Get number of sent multicast messages
|
1222
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/delivery/multicast</code>
|
1223
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
1224
|
+
#
|
1225
|
+
# @param date [String] Date the messages were sent Format: `yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9
|
1226
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-number-of-multicast-messages
|
1227
|
+
# @return [Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
1228
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
1229
|
+
def get_number_of_sent_multicast_messages_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
1230
|
+
date:
|
1231
|
+
)
|
1232
|
+
path = "/v2/bot/message/delivery/multicast"
|
1233
|
+
query_params = {
|
1234
|
+
"date": date
|
1235
|
+
}.compact
|
1236
|
+
|
1237
|
+
response = @http_client.get(
|
1238
|
+
path: path,
|
1239
|
+
query_params: query_params,
|
1240
|
+
)
|
1241
|
+
|
1242
|
+
case response.code.to_i
|
1243
|
+
when 200
|
1244
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
1245
|
+
json.transform_keys! do |key|
|
1246
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
1247
|
+
end
|
1248
|
+
response_body = Line::Bot::V2::MessagingApi::NumberOfMessagesResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
1249
|
+
[response_body, 200, response.each_header.to_h]
|
1250
|
+
else
|
1251
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
1252
|
+
end
|
1253
|
+
end
|
1254
|
+
|
1255
|
+
# Get number of sent multicast messages
|
1256
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/delivery/multicast</code>
|
1257
|
+
# When you want to get HTTP status code or response headers, use {#get_number_of_sent_multicast_messages_with_http_info} instead of this.
|
1258
|
+
#
|
1259
|
+
# @param date [String] Date the messages were sent Format: `yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9
|
1260
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-number-of-multicast-messages
|
1261
|
+
# @return [Line::Bot::V2::MessagingApi::NumberOfMessagesResponse] when HTTP status code is 200
|
1262
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
1263
|
+
def get_number_of_sent_multicast_messages(
|
1264
|
+
date:
|
1265
|
+
)
|
1266
|
+
response_body, _status_code, _headers = get_number_of_sent_multicast_messages_with_http_info(
|
1267
|
+
date: date
|
1268
|
+
)
|
1269
|
+
|
1270
|
+
response_body
|
1271
|
+
end
|
1272
|
+
|
1273
|
+
# Get number of sent push messages
|
1274
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/delivery/push</code>
|
1275
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
1276
|
+
#
|
1277
|
+
# @param date [String] Date the messages were sent Format: `yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9
|
1278
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-number-of-push-messages
|
1279
|
+
# @return [Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
1280
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
1281
|
+
def get_number_of_sent_push_messages_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
1282
|
+
date:
|
1283
|
+
)
|
1284
|
+
path = "/v2/bot/message/delivery/push"
|
1285
|
+
query_params = {
|
1286
|
+
"date": date
|
1287
|
+
}.compact
|
1288
|
+
|
1289
|
+
response = @http_client.get(
|
1290
|
+
path: path,
|
1291
|
+
query_params: query_params,
|
1292
|
+
)
|
1293
|
+
|
1294
|
+
case response.code.to_i
|
1295
|
+
when 200
|
1296
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
1297
|
+
json.transform_keys! do |key|
|
1298
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
1299
|
+
end
|
1300
|
+
response_body = Line::Bot::V2::MessagingApi::NumberOfMessagesResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
1301
|
+
[response_body, 200, response.each_header.to_h]
|
1302
|
+
else
|
1303
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
1304
|
+
end
|
1305
|
+
end
|
1306
|
+
|
1307
|
+
# Get number of sent push messages
|
1308
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/delivery/push</code>
|
1309
|
+
# When you want to get HTTP status code or response headers, use {#get_number_of_sent_push_messages_with_http_info} instead of this.
|
1310
|
+
#
|
1311
|
+
# @param date [String] Date the messages were sent Format: `yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9
|
1312
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-number-of-push-messages
|
1313
|
+
# @return [Line::Bot::V2::MessagingApi::NumberOfMessagesResponse] when HTTP status code is 200
|
1314
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
1315
|
+
def get_number_of_sent_push_messages(
|
1316
|
+
date:
|
1317
|
+
)
|
1318
|
+
response_body, _status_code, _headers = get_number_of_sent_push_messages_with_http_info(
|
1319
|
+
date: date
|
1320
|
+
)
|
1321
|
+
|
1322
|
+
response_body
|
1323
|
+
end
|
1324
|
+
|
1325
|
+
# Get number of sent reply messages
|
1326
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/delivery/reply</code>
|
1327
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
1328
|
+
#
|
1329
|
+
# @param date [String] Date the messages were sent Format: `yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9
|
1330
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-number-of-reply-messages
|
1331
|
+
# @return [Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
1332
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
1333
|
+
def get_number_of_sent_reply_messages_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
1334
|
+
date:
|
1335
|
+
)
|
1336
|
+
path = "/v2/bot/message/delivery/reply"
|
1337
|
+
query_params = {
|
1338
|
+
"date": date
|
1339
|
+
}.compact
|
1340
|
+
|
1341
|
+
response = @http_client.get(
|
1342
|
+
path: path,
|
1343
|
+
query_params: query_params,
|
1344
|
+
)
|
1345
|
+
|
1346
|
+
case response.code.to_i
|
1347
|
+
when 200
|
1348
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
1349
|
+
json.transform_keys! do |key|
|
1350
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
1351
|
+
end
|
1352
|
+
response_body = Line::Bot::V2::MessagingApi::NumberOfMessagesResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
1353
|
+
[response_body, 200, response.each_header.to_h]
|
1354
|
+
else
|
1355
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
1356
|
+
end
|
1357
|
+
end
|
1358
|
+
|
1359
|
+
# Get number of sent reply messages
|
1360
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/delivery/reply</code>
|
1361
|
+
# When you want to get HTTP status code or response headers, use {#get_number_of_sent_reply_messages_with_http_info} instead of this.
|
1362
|
+
#
|
1363
|
+
# @param date [String] Date the messages were sent Format: `yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9
|
1364
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-number-of-reply-messages
|
1365
|
+
# @return [Line::Bot::V2::MessagingApi::NumberOfMessagesResponse] when HTTP status code is 200
|
1366
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
1367
|
+
def get_number_of_sent_reply_messages(
|
1368
|
+
date:
|
1369
|
+
)
|
1370
|
+
response_body, _status_code, _headers = get_number_of_sent_reply_messages_with_http_info(
|
1371
|
+
date: date
|
1372
|
+
)
|
1373
|
+
|
1374
|
+
response_body
|
1375
|
+
end
|
1376
|
+
|
1377
|
+
# Get number of sent LINE notification messages
|
1378
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/delivery/pnp</code>
|
1379
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
1380
|
+
#
|
1381
|
+
# @param date [String] Date the message was sent Format: `yyyyMMdd` (Example:`20211231`) Time zone: UTC+9
|
1382
|
+
# @see https://developers.line.biz/en/reference/partner-docs/#get-number-of-sent-line-notification-messages
|
1383
|
+
# @return [Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
1384
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
1385
|
+
def get_pnp_message_statistics_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
1386
|
+
date:
|
1387
|
+
)
|
1388
|
+
path = "/v2/bot/message/delivery/pnp"
|
1389
|
+
query_params = {
|
1390
|
+
"date": date
|
1391
|
+
}.compact
|
1392
|
+
|
1393
|
+
response = @http_client.get(
|
1394
|
+
path: path,
|
1395
|
+
query_params: query_params,
|
1396
|
+
)
|
1397
|
+
|
1398
|
+
case response.code.to_i
|
1399
|
+
when 200
|
1400
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
1401
|
+
json.transform_keys! do |key|
|
1402
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
1403
|
+
end
|
1404
|
+
response_body = Line::Bot::V2::MessagingApi::NumberOfMessagesResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
1405
|
+
[response_body, 200, response.each_header.to_h]
|
1406
|
+
else
|
1407
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
1408
|
+
end
|
1409
|
+
end
|
1410
|
+
|
1411
|
+
# Get number of sent LINE notification messages
|
1412
|
+
# This requests to <code>GET https://api.line.me/v2/bot/message/delivery/pnp</code>
|
1413
|
+
# When you want to get HTTP status code or response headers, use {#get_pnp_message_statistics_with_http_info} instead of this.
|
1414
|
+
#
|
1415
|
+
# @param date [String] Date the message was sent Format: `yyyyMMdd` (Example:`20211231`) Time zone: UTC+9
|
1416
|
+
# @see https://developers.line.biz/en/reference/partner-docs/#get-number-of-sent-line-notification-messages
|
1417
|
+
# @return [Line::Bot::V2::MessagingApi::NumberOfMessagesResponse] when HTTP status code is 200
|
1418
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
1419
|
+
def get_pnp_message_statistics(
|
1420
|
+
date:
|
1421
|
+
)
|
1422
|
+
response_body, _status_code, _headers = get_pnp_message_statistics_with_http_info(
|
1423
|
+
date: date
|
1424
|
+
)
|
1425
|
+
|
1426
|
+
response_body
|
1427
|
+
end
|
1428
|
+
|
1429
|
+
# Get profile
|
1430
|
+
# This requests to <code>GET https://api.line.me/v2/bot/profile/{userId}</code>
|
1431
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
1432
|
+
#
|
1433
|
+
# @param user_id [String] User ID
|
1434
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-profile
|
1435
|
+
# @return [Array(Line::Bot::V2::MessagingApi::UserProfileResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
1436
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
1437
|
+
def get_profile_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
1438
|
+
user_id:
|
1439
|
+
)
|
1440
|
+
path = "/v2/bot/profile/{userId}"
|
1441
|
+
.gsub(/{userId}/, user_id.to_s)
|
1442
|
+
|
1443
|
+
response = @http_client.get(
|
1444
|
+
path: path,
|
1445
|
+
)
|
1446
|
+
|
1447
|
+
case response.code.to_i
|
1448
|
+
when 200
|
1449
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
1450
|
+
json.transform_keys! do |key|
|
1451
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
1452
|
+
end
|
1453
|
+
response_body = Line::Bot::V2::MessagingApi::UserProfileResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
1454
|
+
[response_body, 200, response.each_header.to_h]
|
1455
|
+
else
|
1456
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
1457
|
+
end
|
1458
|
+
end
|
1459
|
+
|
1460
|
+
# Get profile
|
1461
|
+
# This requests to <code>GET https://api.line.me/v2/bot/profile/{userId}</code>
|
1462
|
+
# When you want to get HTTP status code or response headers, use {#get_profile_with_http_info} instead of this.
|
1463
|
+
#
|
1464
|
+
# @param user_id [String] User ID
|
1465
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-profile
|
1466
|
+
# @return [Line::Bot::V2::MessagingApi::UserProfileResponse] when HTTP status code is 200
|
1467
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
1468
|
+
def get_profile(
|
1469
|
+
user_id:
|
1470
|
+
)
|
1471
|
+
response_body, _status_code, _headers = get_profile_with_http_info(
|
1472
|
+
user_id: user_id
|
1473
|
+
)
|
1474
|
+
|
1475
|
+
response_body
|
1476
|
+
end
|
1477
|
+
|
1478
|
+
# Gets a rich menu via a rich menu ID.
|
1479
|
+
# This requests to <code>GET https://api.line.me/v2/bot/richmenu/{richMenuId}</code>
|
1480
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
1481
|
+
#
|
1482
|
+
# @param rich_menu_id [String] ID of a rich menu
|
1483
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-rich-menu
|
1484
|
+
# @return [Array(Line::Bot::V2::MessagingApi::RichMenuResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
1485
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
1486
|
+
def get_rich_menu_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
1487
|
+
rich_menu_id:
|
1488
|
+
)
|
1489
|
+
path = "/v2/bot/richmenu/{richMenuId}"
|
1490
|
+
.gsub(/{richMenuId}/, rich_menu_id.to_s)
|
1491
|
+
|
1492
|
+
response = @http_client.get(
|
1493
|
+
path: path,
|
1494
|
+
)
|
1495
|
+
|
1496
|
+
case response.code.to_i
|
1497
|
+
when 200
|
1498
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
1499
|
+
json.transform_keys! do |key|
|
1500
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
1501
|
+
end
|
1502
|
+
response_body = Line::Bot::V2::MessagingApi::RichMenuResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
1503
|
+
[response_body, 200, response.each_header.to_h]
|
1504
|
+
else
|
1505
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
1506
|
+
end
|
1507
|
+
end
|
1508
|
+
|
1509
|
+
# Gets a rich menu via a rich menu ID.
|
1510
|
+
# This requests to <code>GET https://api.line.me/v2/bot/richmenu/{richMenuId}</code>
|
1511
|
+
# When you want to get HTTP status code or response headers, use {#get_rich_menu_with_http_info} instead of this.
|
1512
|
+
#
|
1513
|
+
# @param rich_menu_id [String] ID of a rich menu
|
1514
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-rich-menu
|
1515
|
+
# @return [Line::Bot::V2::MessagingApi::RichMenuResponse] when HTTP status code is 200
|
1516
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
1517
|
+
def get_rich_menu(
|
1518
|
+
rich_menu_id:
|
1519
|
+
)
|
1520
|
+
response_body, _status_code, _headers = get_rich_menu_with_http_info(
|
1521
|
+
rich_menu_id: rich_menu_id
|
1522
|
+
)
|
1523
|
+
|
1524
|
+
response_body
|
1525
|
+
end
|
1526
|
+
|
1527
|
+
# Get rich menu alias information
|
1528
|
+
# This requests to <code>GET https://api.line.me/v2/bot/richmenu/alias/{richMenuAliasId}</code>
|
1529
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
1530
|
+
#
|
1531
|
+
# @param rich_menu_alias_id [String] The rich menu alias ID whose information you want to obtain.
|
1532
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-alias-by-id
|
1533
|
+
# @return [Array(Line::Bot::V2::MessagingApi::RichMenuAliasResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
1534
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
1535
|
+
def get_rich_menu_alias_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
1536
|
+
rich_menu_alias_id:
|
1537
|
+
)
|
1538
|
+
path = "/v2/bot/richmenu/alias/{richMenuAliasId}"
|
1539
|
+
.gsub(/{richMenuAliasId}/, rich_menu_alias_id.to_s)
|
1540
|
+
|
1541
|
+
response = @http_client.get(
|
1542
|
+
path: path,
|
1543
|
+
)
|
1544
|
+
|
1545
|
+
case response.code.to_i
|
1546
|
+
when 200
|
1547
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
1548
|
+
json.transform_keys! do |key|
|
1549
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
1550
|
+
end
|
1551
|
+
response_body = Line::Bot::V2::MessagingApi::RichMenuAliasResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
1552
|
+
[response_body, 200, response.each_header.to_h]
|
1553
|
+
else
|
1554
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
1555
|
+
end
|
1556
|
+
end
|
1557
|
+
|
1558
|
+
# Get rich menu alias information
|
1559
|
+
# This requests to <code>GET https://api.line.me/v2/bot/richmenu/alias/{richMenuAliasId}</code>
|
1560
|
+
# When you want to get HTTP status code or response headers, use {#get_rich_menu_alias_with_http_info} instead of this.
|
1561
|
+
#
|
1562
|
+
# @param rich_menu_alias_id [String] The rich menu alias ID whose information you want to obtain.
|
1563
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-alias-by-id
|
1564
|
+
# @return [Line::Bot::V2::MessagingApi::RichMenuAliasResponse] when HTTP status code is 200
|
1565
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
1566
|
+
def get_rich_menu_alias(
|
1567
|
+
rich_menu_alias_id:
|
1568
|
+
)
|
1569
|
+
response_body, _status_code, _headers = get_rich_menu_alias_with_http_info(
|
1570
|
+
rich_menu_alias_id: rich_menu_alias_id
|
1571
|
+
)
|
1572
|
+
|
1573
|
+
response_body
|
1574
|
+
end
|
1575
|
+
|
1576
|
+
# Get list of rich menu alias
|
1577
|
+
# This requests to <code>GET https://api.line.me/v2/bot/richmenu/alias/list</code>
|
1578
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
1579
|
+
#
|
1580
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-alias-list
|
1581
|
+
# @return [Array(Line::Bot::V2::MessagingApi::RichMenuAliasListResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
1582
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
1583
|
+
def get_rich_menu_alias_list_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
1584
|
+
)
|
1585
|
+
path = "/v2/bot/richmenu/alias/list"
|
1586
|
+
|
1587
|
+
response = @http_client.get(
|
1588
|
+
path: path,
|
1589
|
+
)
|
1590
|
+
|
1591
|
+
case response.code.to_i
|
1592
|
+
when 200
|
1593
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
1594
|
+
json.transform_keys! do |key|
|
1595
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
1596
|
+
end
|
1597
|
+
response_body = Line::Bot::V2::MessagingApi::RichMenuAliasListResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
1598
|
+
[response_body, 200, response.each_header.to_h]
|
1599
|
+
else
|
1600
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
1601
|
+
end
|
1602
|
+
end
|
1603
|
+
|
1604
|
+
# Get list of rich menu alias
|
1605
|
+
# This requests to <code>GET https://api.line.me/v2/bot/richmenu/alias/list</code>
|
1606
|
+
# When you want to get HTTP status code or response headers, use {#get_rich_menu_alias_list_with_http_info} instead of this.
|
1607
|
+
#
|
1608
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-alias-list
|
1609
|
+
# @return [Line::Bot::V2::MessagingApi::RichMenuAliasListResponse] when HTTP status code is 200
|
1610
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
1611
|
+
def get_rich_menu_alias_list(
|
1612
|
+
)
|
1613
|
+
response_body, _status_code, _headers = get_rich_menu_alias_list_with_http_info(
|
1614
|
+
)
|
1615
|
+
|
1616
|
+
response_body
|
1617
|
+
end
|
1618
|
+
|
1619
|
+
# Get the status of Replace or unlink a linked rich menus in batches.
|
1620
|
+
# This requests to <code>GET https://api.line.me/v2/bot/richmenu/progress/batch</code>
|
1621
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
1622
|
+
#
|
1623
|
+
# @param request_id [String] A request ID used to batch control the rich menu linked to the user. Each Messaging API request has a request ID.
|
1624
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-batch-control-rich-menus-progress-status
|
1625
|
+
# @return [Array(Line::Bot::V2::MessagingApi::RichMenuBatchProgressResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
1626
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
1627
|
+
def get_rich_menu_batch_progress_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
1628
|
+
request_id:
|
1629
|
+
)
|
1630
|
+
path = "/v2/bot/richmenu/progress/batch"
|
1631
|
+
query_params = {
|
1632
|
+
"requestId": request_id
|
1633
|
+
}.compact
|
1634
|
+
|
1635
|
+
response = @http_client.get(
|
1636
|
+
path: path,
|
1637
|
+
query_params: query_params,
|
1638
|
+
)
|
1639
|
+
|
1640
|
+
case response.code.to_i
|
1641
|
+
when 200
|
1642
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
1643
|
+
json.transform_keys! do |key|
|
1644
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
1645
|
+
end
|
1646
|
+
response_body = Line::Bot::V2::MessagingApi::RichMenuBatchProgressResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
1647
|
+
[response_body, 200, response.each_header.to_h]
|
1648
|
+
else
|
1649
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
1650
|
+
end
|
1651
|
+
end
|
1652
|
+
|
1653
|
+
# Get the status of Replace or unlink a linked rich menus in batches.
|
1654
|
+
# This requests to <code>GET https://api.line.me/v2/bot/richmenu/progress/batch</code>
|
1655
|
+
# When you want to get HTTP status code or response headers, use {#get_rich_menu_batch_progress_with_http_info} instead of this.
|
1656
|
+
#
|
1657
|
+
# @param request_id [String] A request ID used to batch control the rich menu linked to the user. Each Messaging API request has a request ID.
|
1658
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-batch-control-rich-menus-progress-status
|
1659
|
+
# @return [Line::Bot::V2::MessagingApi::RichMenuBatchProgressResponse] when HTTP status code is 200
|
1660
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
1661
|
+
def get_rich_menu_batch_progress(
|
1662
|
+
request_id:
|
1663
|
+
)
|
1664
|
+
response_body, _status_code, _headers = get_rich_menu_batch_progress_with_http_info(
|
1665
|
+
request_id: request_id
|
1666
|
+
)
|
1667
|
+
|
1668
|
+
response_body
|
1669
|
+
end
|
1670
|
+
|
1671
|
+
# Get rich menu ID of user
|
1672
|
+
# This requests to <code>GET https://api.line.me/v2/bot/user/{userId}/richmenu</code>
|
1673
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
1674
|
+
#
|
1675
|
+
# @param user_id [String] User ID. Found in the `source` object of webhook event objects. Do not use the LINE ID used in LINE.
|
1676
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-id-of-user
|
1677
|
+
# @return [Array(Line::Bot::V2::MessagingApi::RichMenuIdResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
1678
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
1679
|
+
def get_rich_menu_id_of_user_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
1680
|
+
user_id:
|
1681
|
+
)
|
1682
|
+
path = "/v2/bot/user/{userId}/richmenu"
|
1683
|
+
.gsub(/{userId}/, user_id.to_s)
|
1684
|
+
|
1685
|
+
response = @http_client.get(
|
1686
|
+
path: path,
|
1687
|
+
)
|
1688
|
+
|
1689
|
+
case response.code.to_i
|
1690
|
+
when 200
|
1691
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
1692
|
+
json.transform_keys! do |key|
|
1693
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
1694
|
+
end
|
1695
|
+
response_body = Line::Bot::V2::MessagingApi::RichMenuIdResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
1696
|
+
[response_body, 200, response.each_header.to_h]
|
1697
|
+
else
|
1698
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
1699
|
+
end
|
1700
|
+
end
|
1701
|
+
|
1702
|
+
# Get rich menu ID of user
|
1703
|
+
# This requests to <code>GET https://api.line.me/v2/bot/user/{userId}/richmenu</code>
|
1704
|
+
# When you want to get HTTP status code or response headers, use {#get_rich_menu_id_of_user_with_http_info} instead of this.
|
1705
|
+
#
|
1706
|
+
# @param user_id [String] User ID. Found in the `source` object of webhook event objects. Do not use the LINE ID used in LINE.
|
1707
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-id-of-user
|
1708
|
+
# @return [Line::Bot::V2::MessagingApi::RichMenuIdResponse] when HTTP status code is 200
|
1709
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
1710
|
+
def get_rich_menu_id_of_user(
|
1711
|
+
user_id:
|
1712
|
+
)
|
1713
|
+
response_body, _status_code, _headers = get_rich_menu_id_of_user_with_http_info(
|
1714
|
+
user_id: user_id
|
1715
|
+
)
|
1716
|
+
|
1717
|
+
response_body
|
1718
|
+
end
|
1719
|
+
|
1720
|
+
# Get rich menu list
|
1721
|
+
# This requests to <code>GET https://api.line.me/v2/bot/richmenu/list</code>
|
1722
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
1723
|
+
#
|
1724
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-list
|
1725
|
+
# @return [Array(Line::Bot::V2::MessagingApi::RichMenuListResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
1726
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
1727
|
+
def get_rich_menu_list_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
1728
|
+
)
|
1729
|
+
path = "/v2/bot/richmenu/list"
|
1730
|
+
|
1731
|
+
response = @http_client.get(
|
1732
|
+
path: path,
|
1733
|
+
)
|
1734
|
+
|
1735
|
+
case response.code.to_i
|
1736
|
+
when 200
|
1737
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
1738
|
+
json.transform_keys! do |key|
|
1739
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
1740
|
+
end
|
1741
|
+
response_body = Line::Bot::V2::MessagingApi::RichMenuListResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
1742
|
+
[response_body, 200, response.each_header.to_h]
|
1743
|
+
else
|
1744
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
1745
|
+
end
|
1746
|
+
end
|
1747
|
+
|
1748
|
+
# Get rich menu list
|
1749
|
+
# This requests to <code>GET https://api.line.me/v2/bot/richmenu/list</code>
|
1750
|
+
# When you want to get HTTP status code or response headers, use {#get_rich_menu_list_with_http_info} instead of this.
|
1751
|
+
#
|
1752
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-list
|
1753
|
+
# @return [Line::Bot::V2::MessagingApi::RichMenuListResponse] when HTTP status code is 200
|
1754
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
1755
|
+
def get_rich_menu_list(
|
1756
|
+
)
|
1757
|
+
response_body, _status_code, _headers = get_rich_menu_list_with_http_info(
|
1758
|
+
)
|
1759
|
+
|
1760
|
+
response_body
|
1761
|
+
end
|
1762
|
+
|
1763
|
+
# Get number of users in a multi-person chat
|
1764
|
+
# This requests to <code>GET https://api.line.me/v2/bot/room/{roomId}/members/count</code>
|
1765
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
1766
|
+
#
|
1767
|
+
# @param room_id [String] Room ID
|
1768
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-members-room-count
|
1769
|
+
# @return [Array(Line::Bot::V2::MessagingApi::RoomMemberCountResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
1770
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
1771
|
+
def get_room_member_count_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
1772
|
+
room_id:
|
1773
|
+
)
|
1774
|
+
path = "/v2/bot/room/{roomId}/members/count"
|
1775
|
+
.gsub(/{roomId}/, room_id.to_s)
|
1776
|
+
|
1777
|
+
response = @http_client.get(
|
1778
|
+
path: path,
|
1779
|
+
)
|
1780
|
+
|
1781
|
+
case response.code.to_i
|
1782
|
+
when 200
|
1783
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
1784
|
+
json.transform_keys! do |key|
|
1785
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
1786
|
+
end
|
1787
|
+
response_body = Line::Bot::V2::MessagingApi::RoomMemberCountResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
1788
|
+
[response_body, 200, response.each_header.to_h]
|
1789
|
+
else
|
1790
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
1791
|
+
end
|
1792
|
+
end
|
1793
|
+
|
1794
|
+
# Get number of users in a multi-person chat
|
1795
|
+
# This requests to <code>GET https://api.line.me/v2/bot/room/{roomId}/members/count</code>
|
1796
|
+
# When you want to get HTTP status code or response headers, use {#get_room_member_count_with_http_info} instead of this.
|
1797
|
+
#
|
1798
|
+
# @param room_id [String] Room ID
|
1799
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-members-room-count
|
1800
|
+
# @return [Line::Bot::V2::MessagingApi::RoomMemberCountResponse] when HTTP status code is 200
|
1801
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
1802
|
+
def get_room_member_count(
|
1803
|
+
room_id:
|
1804
|
+
)
|
1805
|
+
response_body, _status_code, _headers = get_room_member_count_with_http_info(
|
1806
|
+
room_id: room_id
|
1807
|
+
)
|
1808
|
+
|
1809
|
+
response_body
|
1810
|
+
end
|
1811
|
+
|
1812
|
+
# Get multi-person chat member profile
|
1813
|
+
# This requests to <code>GET https://api.line.me/v2/bot/room/{roomId}/member/{userId}</code>
|
1814
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
1815
|
+
#
|
1816
|
+
# @param room_id [String] Room ID
|
1817
|
+
# @param user_id [String] User ID
|
1818
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-room-member-profile
|
1819
|
+
# @return [Array(Line::Bot::V2::MessagingApi::RoomUserProfileResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
1820
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
1821
|
+
def get_room_member_profile_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
1822
|
+
room_id:,
|
1823
|
+
user_id:
|
1824
|
+
)
|
1825
|
+
path = "/v2/bot/room/{roomId}/member/{userId}"
|
1826
|
+
.gsub(/{roomId}/, room_id.to_s)
|
1827
|
+
.gsub(/{userId}/, user_id.to_s)
|
1828
|
+
|
1829
|
+
response = @http_client.get(
|
1830
|
+
path: path,
|
1831
|
+
)
|
1832
|
+
|
1833
|
+
case response.code.to_i
|
1834
|
+
when 200
|
1835
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
1836
|
+
json.transform_keys! do |key|
|
1837
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
1838
|
+
end
|
1839
|
+
response_body = Line::Bot::V2::MessagingApi::RoomUserProfileResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
1840
|
+
[response_body, 200, response.each_header.to_h]
|
1841
|
+
else
|
1842
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
1843
|
+
end
|
1844
|
+
end
|
1845
|
+
|
1846
|
+
# Get multi-person chat member profile
|
1847
|
+
# This requests to <code>GET https://api.line.me/v2/bot/room/{roomId}/member/{userId}</code>
|
1848
|
+
# When you want to get HTTP status code or response headers, use {#get_room_member_profile_with_http_info} instead of this.
|
1849
|
+
#
|
1850
|
+
# @param room_id [String] Room ID
|
1851
|
+
# @param user_id [String] User ID
|
1852
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-room-member-profile
|
1853
|
+
# @return [Line::Bot::V2::MessagingApi::RoomUserProfileResponse] when HTTP status code is 200
|
1854
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
1855
|
+
def get_room_member_profile(
|
1856
|
+
room_id:,
|
1857
|
+
user_id:
|
1858
|
+
)
|
1859
|
+
response_body, _status_code, _headers = get_room_member_profile_with_http_info(
|
1860
|
+
room_id: room_id,
|
1861
|
+
user_id: user_id
|
1862
|
+
)
|
1863
|
+
|
1864
|
+
response_body
|
1865
|
+
end
|
1866
|
+
|
1867
|
+
# Get multi-person chat member user IDs
|
1868
|
+
# This requests to <code>GET https://api.line.me/v2/bot/room/{roomId}/members/ids</code>
|
1869
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
1870
|
+
#
|
1871
|
+
# @param room_id [String] Room ID
|
1872
|
+
# @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.
|
1873
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-room-member-user-ids
|
1874
|
+
# @return [Array(Line::Bot::V2::MessagingApi::MembersIdsResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
1875
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
1876
|
+
def get_room_members_ids_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
1877
|
+
room_id:,
|
1878
|
+
start: nil
|
1879
|
+
)
|
1880
|
+
path = "/v2/bot/room/{roomId}/members/ids"
|
1881
|
+
.gsub(/{roomId}/, room_id.to_s)
|
1882
|
+
query_params = {
|
1883
|
+
"start": start
|
1884
|
+
}.compact
|
1885
|
+
|
1886
|
+
response = @http_client.get(
|
1887
|
+
path: path,
|
1888
|
+
query_params: query_params,
|
1889
|
+
)
|
1890
|
+
|
1891
|
+
case response.code.to_i
|
1892
|
+
when 200
|
1893
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
1894
|
+
json.transform_keys! do |key|
|
1895
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
1896
|
+
end
|
1897
|
+
response_body = Line::Bot::V2::MessagingApi::MembersIdsResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
1898
|
+
[response_body, 200, response.each_header.to_h]
|
1899
|
+
else
|
1900
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
1901
|
+
end
|
1902
|
+
end
|
1903
|
+
|
1904
|
+
# Get multi-person chat member user IDs
|
1905
|
+
# This requests to <code>GET https://api.line.me/v2/bot/room/{roomId}/members/ids</code>
|
1906
|
+
# When you want to get HTTP status code or response headers, use {#get_room_members_ids_with_http_info} instead of this.
|
1907
|
+
#
|
1908
|
+
# @param room_id [String] Room ID
|
1909
|
+
# @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.
|
1910
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-room-member-user-ids
|
1911
|
+
# @return [Line::Bot::V2::MessagingApi::MembersIdsResponse] when HTTP status code is 200
|
1912
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
1913
|
+
def get_room_members_ids(
|
1914
|
+
room_id:,
|
1915
|
+
start: nil
|
1916
|
+
)
|
1917
|
+
response_body, _status_code, _headers = get_room_members_ids_with_http_info(
|
1918
|
+
room_id: room_id,
|
1919
|
+
start: start
|
1920
|
+
)
|
1921
|
+
|
1922
|
+
response_body
|
1923
|
+
end
|
1924
|
+
|
1925
|
+
# Get webhook endpoint information
|
1926
|
+
# This requests to <code>GET https://api.line.me/v2/bot/channel/webhook/endpoint</code>
|
1927
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
1928
|
+
#
|
1929
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-webhook-endpoint-information
|
1930
|
+
# @return [Array(Line::Bot::V2::MessagingApi::GetWebhookEndpointResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
1931
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
1932
|
+
def get_webhook_endpoint_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
1933
|
+
)
|
1934
|
+
path = "/v2/bot/channel/webhook/endpoint"
|
1935
|
+
|
1936
|
+
response = @http_client.get(
|
1937
|
+
path: path,
|
1938
|
+
)
|
1939
|
+
|
1940
|
+
case response.code.to_i
|
1941
|
+
when 200
|
1942
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
1943
|
+
json.transform_keys! do |key|
|
1944
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
1945
|
+
end
|
1946
|
+
response_body = Line::Bot::V2::MessagingApi::GetWebhookEndpointResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
1947
|
+
[response_body, 200, response.each_header.to_h]
|
1948
|
+
else
|
1949
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
1950
|
+
end
|
1951
|
+
end
|
1952
|
+
|
1953
|
+
# Get webhook endpoint information
|
1954
|
+
# This requests to <code>GET https://api.line.me/v2/bot/channel/webhook/endpoint</code>
|
1955
|
+
# When you want to get HTTP status code or response headers, use {#get_webhook_endpoint_with_http_info} instead of this.
|
1956
|
+
#
|
1957
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-webhook-endpoint-information
|
1958
|
+
# @return [Line::Bot::V2::MessagingApi::GetWebhookEndpointResponse] when HTTP status code is 200
|
1959
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
1960
|
+
def get_webhook_endpoint(
|
1961
|
+
)
|
1962
|
+
response_body, _status_code, _headers = get_webhook_endpoint_with_http_info(
|
1963
|
+
)
|
1964
|
+
|
1965
|
+
response_body
|
1966
|
+
end
|
1967
|
+
|
1968
|
+
# Issue link token
|
1969
|
+
# This requests to <code>POST https://api.line.me/v2/bot/user/{userId}/linkToken</code>
|
1970
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
1971
|
+
#
|
1972
|
+
# @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.
|
1973
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#issue-link-token
|
1974
|
+
# @return [Array(Line::Bot::V2::MessagingApi::IssueLinkTokenResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
1975
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
1976
|
+
def issue_link_token_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
1977
|
+
user_id:
|
1978
|
+
)
|
1979
|
+
path = "/v2/bot/user/{userId}/linkToken"
|
1980
|
+
.gsub(/{userId}/, user_id.to_s)
|
1981
|
+
|
1982
|
+
response = @http_client.post(
|
1983
|
+
path: path,
|
1984
|
+
)
|
1985
|
+
|
1986
|
+
case response.code.to_i
|
1987
|
+
when 200
|
1988
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
1989
|
+
json.transform_keys! do |key|
|
1990
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
1991
|
+
end
|
1992
|
+
response_body = Line::Bot::V2::MessagingApi::IssueLinkTokenResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
1993
|
+
[response_body, 200, response.each_header.to_h]
|
1994
|
+
else
|
1995
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
1996
|
+
end
|
1997
|
+
end
|
1998
|
+
|
1999
|
+
# Issue link token
|
2000
|
+
# This requests to <code>POST https://api.line.me/v2/bot/user/{userId}/linkToken</code>
|
2001
|
+
# When you want to get HTTP status code or response headers, use {#issue_link_token_with_http_info} instead of this.
|
2002
|
+
#
|
2003
|
+
# @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.
|
2004
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#issue-link-token
|
2005
|
+
# @return [Line::Bot::V2::MessagingApi::IssueLinkTokenResponse] when HTTP status code is 200
|
2006
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
2007
|
+
def issue_link_token(
|
2008
|
+
user_id:
|
2009
|
+
)
|
2010
|
+
response_body, _status_code, _headers = issue_link_token_with_http_info(
|
2011
|
+
user_id: user_id
|
2012
|
+
)
|
2013
|
+
|
2014
|
+
response_body
|
2015
|
+
end
|
2016
|
+
|
2017
|
+
# Leave group chat
|
2018
|
+
# This requests to <code>POST https://api.line.me/v2/bot/group/{groupId}/leave</code>
|
2019
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
2020
|
+
#
|
2021
|
+
# @param group_id [String] Group ID
|
2022
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#leave-group
|
2023
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
2024
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 400
|
2025
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 404
|
2026
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
2027
|
+
def leave_group_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
2028
|
+
group_id:
|
2029
|
+
)
|
2030
|
+
path = "/v2/bot/group/{groupId}/leave"
|
2031
|
+
.gsub(/{groupId}/, group_id.to_s)
|
2032
|
+
|
2033
|
+
response = @http_client.post(
|
2034
|
+
path: path,
|
2035
|
+
)
|
2036
|
+
|
2037
|
+
case response.code.to_i
|
2038
|
+
when 200
|
2039
|
+
[response.body, 200, response.each_header.to_h]
|
2040
|
+
when 400
|
2041
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
2042
|
+
json.transform_keys! do |key|
|
2043
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
2044
|
+
end
|
2045
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
2046
|
+
[response_body, 400, response.each_header.to_h]
|
2047
|
+
when 404
|
2048
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
2049
|
+
json.transform_keys! do |key|
|
2050
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
2051
|
+
end
|
2052
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
2053
|
+
[response_body, 404, response.each_header.to_h]
|
2054
|
+
else
|
2055
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
2056
|
+
end
|
2057
|
+
end
|
2058
|
+
|
2059
|
+
# Leave group chat
|
2060
|
+
# This requests to <code>POST https://api.line.me/v2/bot/group/{groupId}/leave</code>
|
2061
|
+
# When you want to get HTTP status code or response headers, use {#leave_group_with_http_info} instead of this.
|
2062
|
+
#
|
2063
|
+
# @param group_id [String] Group ID
|
2064
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#leave-group
|
2065
|
+
# @return [String, nil] when HTTP status code is 200
|
2066
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400
|
2067
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 404
|
2068
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
2069
|
+
def leave_group(
|
2070
|
+
group_id:
|
2071
|
+
)
|
2072
|
+
response_body, _status_code, _headers = leave_group_with_http_info(
|
2073
|
+
group_id: group_id
|
2074
|
+
)
|
2075
|
+
|
2076
|
+
response_body
|
2077
|
+
end
|
2078
|
+
|
2079
|
+
# Leave multi-person chat
|
2080
|
+
# This requests to <code>POST https://api.line.me/v2/bot/room/{roomId}/leave</code>
|
2081
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
2082
|
+
#
|
2083
|
+
# @param room_id [String] Room ID
|
2084
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#leave-room
|
2085
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
2086
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
2087
|
+
def leave_room_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
2088
|
+
room_id:
|
2089
|
+
)
|
2090
|
+
path = "/v2/bot/room/{roomId}/leave"
|
2091
|
+
.gsub(/{roomId}/, room_id.to_s)
|
2092
|
+
|
2093
|
+
response = @http_client.post(
|
2094
|
+
path: path,
|
2095
|
+
)
|
2096
|
+
|
2097
|
+
case response.code.to_i
|
2098
|
+
when 200
|
2099
|
+
[response.body, 200, response.each_header.to_h]
|
2100
|
+
else
|
2101
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
2102
|
+
end
|
2103
|
+
end
|
2104
|
+
|
2105
|
+
# Leave multi-person chat
|
2106
|
+
# This requests to <code>POST https://api.line.me/v2/bot/room/{roomId}/leave</code>
|
2107
|
+
# When you want to get HTTP status code or response headers, use {#leave_room_with_http_info} instead of this.
|
2108
|
+
#
|
2109
|
+
# @param room_id [String] Room ID
|
2110
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#leave-room
|
2111
|
+
# @return [String, nil] when HTTP status code is 200
|
2112
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
2113
|
+
def leave_room(
|
2114
|
+
room_id:
|
2115
|
+
)
|
2116
|
+
response_body, _status_code, _headers = leave_room_with_http_info(
|
2117
|
+
room_id: room_id
|
2118
|
+
)
|
2119
|
+
|
2120
|
+
response_body
|
2121
|
+
end
|
2122
|
+
|
2123
|
+
# Link rich menu to user.
|
2124
|
+
# This requests to <code>POST https://api.line.me/v2/bot/user/{userId}/richmenu/{richMenuId}</code>
|
2125
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
2126
|
+
#
|
2127
|
+
# @param user_id [String] User ID. Found in the `source` object of webhook event objects. Do not use the LINE ID used in LINE.
|
2128
|
+
# @param rich_menu_id [String] ID of a rich menu
|
2129
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#link-rich-menu-to-user
|
2130
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
2131
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
2132
|
+
def link_rich_menu_id_to_user_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
2133
|
+
user_id:,
|
2134
|
+
rich_menu_id:
|
2135
|
+
)
|
2136
|
+
path = "/v2/bot/user/{userId}/richmenu/{richMenuId}"
|
2137
|
+
.gsub(/{userId}/, user_id.to_s)
|
2138
|
+
.gsub(/{richMenuId}/, rich_menu_id.to_s)
|
2139
|
+
|
2140
|
+
response = @http_client.post(
|
2141
|
+
path: path,
|
2142
|
+
)
|
2143
|
+
|
2144
|
+
case response.code.to_i
|
2145
|
+
when 200
|
2146
|
+
[response.body, 200, response.each_header.to_h]
|
2147
|
+
else
|
2148
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
2149
|
+
end
|
2150
|
+
end
|
2151
|
+
|
2152
|
+
# Link rich menu to user.
|
2153
|
+
# This requests to <code>POST https://api.line.me/v2/bot/user/{userId}/richmenu/{richMenuId}</code>
|
2154
|
+
# When you want to get HTTP status code or response headers, use {#link_rich_menu_id_to_user_with_http_info} instead of this.
|
2155
|
+
#
|
2156
|
+
# @param user_id [String] User ID. Found in the `source` object of webhook event objects. Do not use the LINE ID used in LINE.
|
2157
|
+
# @param rich_menu_id [String] ID of a rich menu
|
2158
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#link-rich-menu-to-user
|
2159
|
+
# @return [String, nil] when HTTP status code is 200
|
2160
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
2161
|
+
def link_rich_menu_id_to_user(
|
2162
|
+
user_id:,
|
2163
|
+
rich_menu_id:
|
2164
|
+
)
|
2165
|
+
response_body, _status_code, _headers = link_rich_menu_id_to_user_with_http_info(
|
2166
|
+
user_id: user_id,
|
2167
|
+
rich_menu_id: rich_menu_id
|
2168
|
+
)
|
2169
|
+
|
2170
|
+
response_body
|
2171
|
+
end
|
2172
|
+
|
2173
|
+
# Link rich menu to multiple users
|
2174
|
+
# This requests to <code>POST https://api.line.me/v2/bot/richmenu/bulk/link</code>
|
2175
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
2176
|
+
#
|
2177
|
+
# @param rich_menu_bulk_link_request [RichMenuBulkLinkRequest]
|
2178
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#link-rich-menu-to-users
|
2179
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 202
|
2180
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
2181
|
+
def link_rich_menu_id_to_users_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
2182
|
+
rich_menu_bulk_link_request:
|
2183
|
+
)
|
2184
|
+
path = "/v2/bot/richmenu/bulk/link"
|
2185
|
+
|
2186
|
+
response = @http_client.post(
|
2187
|
+
path: path,
|
2188
|
+
body_params: rich_menu_bulk_link_request,
|
2189
|
+
)
|
2190
|
+
|
2191
|
+
case response.code.to_i
|
2192
|
+
when 202
|
2193
|
+
[response.body, 202, response.each_header.to_h]
|
2194
|
+
else
|
2195
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
2196
|
+
end
|
2197
|
+
end
|
2198
|
+
|
2199
|
+
# Link rich menu to multiple users
|
2200
|
+
# This requests to <code>POST https://api.line.me/v2/bot/richmenu/bulk/link</code>
|
2201
|
+
# When you want to get HTTP status code or response headers, use {#link_rich_menu_id_to_users_with_http_info} instead of this.
|
2202
|
+
#
|
2203
|
+
# @param rich_menu_bulk_link_request [RichMenuBulkLinkRequest]
|
2204
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#link-rich-menu-to-users
|
2205
|
+
# @return [String, nil] when HTTP status code is 202
|
2206
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
2207
|
+
def link_rich_menu_id_to_users(
|
2208
|
+
rich_menu_bulk_link_request:
|
2209
|
+
)
|
2210
|
+
response_body, _status_code, _headers = link_rich_menu_id_to_users_with_http_info(
|
2211
|
+
rich_menu_bulk_link_request: rich_menu_bulk_link_request
|
2212
|
+
)
|
2213
|
+
|
2214
|
+
response_body
|
2215
|
+
end
|
2216
|
+
|
2217
|
+
# Mark messages from users as read
|
2218
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/markAsRead</code>
|
2219
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
2220
|
+
#
|
2221
|
+
# @param mark_messages_as_read_request [MarkMessagesAsReadRequest]
|
2222
|
+
# @see https://developers.line.biz/en/reference/partner-docs/#mark-messages-from-users-as-read
|
2223
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
2224
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
2225
|
+
def mark_messages_as_read_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
2226
|
+
mark_messages_as_read_request:
|
2227
|
+
)
|
2228
|
+
path = "/v2/bot/message/markAsRead"
|
2229
|
+
|
2230
|
+
response = @http_client.post(
|
2231
|
+
path: path,
|
2232
|
+
body_params: mark_messages_as_read_request,
|
2233
|
+
)
|
2234
|
+
|
2235
|
+
case response.code.to_i
|
2236
|
+
when 200
|
2237
|
+
[response.body, 200, response.each_header.to_h]
|
2238
|
+
else
|
2239
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
2240
|
+
end
|
2241
|
+
end
|
2242
|
+
|
2243
|
+
# Mark messages from users as read
|
2244
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/markAsRead</code>
|
2245
|
+
# When you want to get HTTP status code or response headers, use {#mark_messages_as_read_with_http_info} instead of this.
|
2246
|
+
#
|
2247
|
+
# @param mark_messages_as_read_request [MarkMessagesAsReadRequest]
|
2248
|
+
# @see https://developers.line.biz/en/reference/partner-docs/#mark-messages-from-users-as-read
|
2249
|
+
# @return [String, nil] when HTTP status code is 200
|
2250
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
2251
|
+
def mark_messages_as_read(
|
2252
|
+
mark_messages_as_read_request:
|
2253
|
+
)
|
2254
|
+
response_body, _status_code, _headers = mark_messages_as_read_with_http_info(
|
2255
|
+
mark_messages_as_read_request: mark_messages_as_read_request
|
2256
|
+
)
|
2257
|
+
|
2258
|
+
response_body
|
2259
|
+
end
|
2260
|
+
|
2261
|
+
# An API that efficiently sends the same message to multiple user IDs. You can't send messages to group chats or multi-person chats.
|
2262
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/multicast</code>
|
2263
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
2264
|
+
#
|
2265
|
+
# @param multicast_request [MulticastRequest]
|
2266
|
+
# @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.
|
2267
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#send-multicast-message
|
2268
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
2269
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 400
|
2270
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 403
|
2271
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 409
|
2272
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 429
|
2273
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
2274
|
+
def multicast_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
2275
|
+
multicast_request:,
|
2276
|
+
x_line_retry_key: nil
|
2277
|
+
)
|
2278
|
+
path = "/v2/bot/message/multicast"
|
2279
|
+
header_params = {
|
2280
|
+
"X-Line-Retry-Key": x_line_retry_key
|
2281
|
+
}.compact
|
2282
|
+
|
2283
|
+
response = @http_client.post(
|
2284
|
+
path: path,
|
2285
|
+
body_params: multicast_request,
|
2286
|
+
headers: header_params
|
2287
|
+
)
|
2288
|
+
|
2289
|
+
case response.code.to_i
|
2290
|
+
when 200
|
2291
|
+
[response.body, 200, response.each_header.to_h]
|
2292
|
+
when 400
|
2293
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
2294
|
+
json.transform_keys! do |key|
|
2295
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
2296
|
+
end
|
2297
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
2298
|
+
[response_body, 400, response.each_header.to_h]
|
2299
|
+
when 403
|
2300
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
2301
|
+
json.transform_keys! do |key|
|
2302
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
2303
|
+
end
|
2304
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
2305
|
+
[response_body, 403, response.each_header.to_h]
|
2306
|
+
when 409
|
2307
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
2308
|
+
json.transform_keys! do |key|
|
2309
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
2310
|
+
end
|
2311
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
2312
|
+
[response_body, 409, response.each_header.to_h]
|
2313
|
+
when 429
|
2314
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
2315
|
+
json.transform_keys! do |key|
|
2316
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
2317
|
+
end
|
2318
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
2319
|
+
[response_body, 429, response.each_header.to_h]
|
2320
|
+
else
|
2321
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
2322
|
+
end
|
2323
|
+
end
|
2324
|
+
|
2325
|
+
# An API that efficiently sends the same message to multiple user IDs. You can't send messages to group chats or multi-person chats.
|
2326
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/multicast</code>
|
2327
|
+
# When you want to get HTTP status code or response headers, use {#multicast_with_http_info} instead of this.
|
2328
|
+
#
|
2329
|
+
# @param multicast_request [MulticastRequest]
|
2330
|
+
# @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.
|
2331
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#send-multicast-message
|
2332
|
+
# @return [String, nil] when HTTP status code is 200
|
2333
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400
|
2334
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 403
|
2335
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 409
|
2336
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 429
|
2337
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
2338
|
+
def multicast(
|
2339
|
+
multicast_request:,
|
2340
|
+
x_line_retry_key: nil
|
2341
|
+
)
|
2342
|
+
response_body, _status_code, _headers = multicast_with_http_info(
|
2343
|
+
multicast_request: multicast_request,
|
2344
|
+
x_line_retry_key: x_line_retry_key
|
2345
|
+
)
|
2346
|
+
|
2347
|
+
response_body
|
2348
|
+
end
|
2349
|
+
|
2350
|
+
# Send narrowcast message
|
2351
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/narrowcast</code>
|
2352
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
2353
|
+
#
|
2354
|
+
# @param narrowcast_request [NarrowcastRequest]
|
2355
|
+
# @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.
|
2356
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#send-narrowcast-message
|
2357
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 202
|
2358
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 400
|
2359
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 403
|
2360
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 409
|
2361
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 429
|
2362
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
2363
|
+
def narrowcast_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
2364
|
+
narrowcast_request:,
|
2365
|
+
x_line_retry_key: nil
|
2366
|
+
)
|
2367
|
+
path = "/v2/bot/message/narrowcast"
|
2368
|
+
header_params = {
|
2369
|
+
"X-Line-Retry-Key": x_line_retry_key
|
2370
|
+
}.compact
|
2371
|
+
|
2372
|
+
response = @http_client.post(
|
2373
|
+
path: path,
|
2374
|
+
body_params: narrowcast_request,
|
2375
|
+
headers: header_params
|
2376
|
+
)
|
2377
|
+
|
2378
|
+
case response.code.to_i
|
2379
|
+
when 202
|
2380
|
+
[response.body, 202, response.each_header.to_h]
|
2381
|
+
when 400
|
2382
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
2383
|
+
json.transform_keys! do |key|
|
2384
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
2385
|
+
end
|
2386
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
2387
|
+
[response_body, 400, response.each_header.to_h]
|
2388
|
+
when 403
|
2389
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
2390
|
+
json.transform_keys! do |key|
|
2391
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
2392
|
+
end
|
2393
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
2394
|
+
[response_body, 403, response.each_header.to_h]
|
2395
|
+
when 409
|
2396
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
2397
|
+
json.transform_keys! do |key|
|
2398
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
2399
|
+
end
|
2400
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
2401
|
+
[response_body, 409, response.each_header.to_h]
|
2402
|
+
when 429
|
2403
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
2404
|
+
json.transform_keys! do |key|
|
2405
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
2406
|
+
end
|
2407
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
2408
|
+
[response_body, 429, response.each_header.to_h]
|
2409
|
+
else
|
2410
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
2411
|
+
end
|
2412
|
+
end
|
2413
|
+
|
2414
|
+
# Send narrowcast message
|
2415
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/narrowcast</code>
|
2416
|
+
# When you want to get HTTP status code or response headers, use {#narrowcast_with_http_info} instead of this.
|
2417
|
+
#
|
2418
|
+
# @param narrowcast_request [NarrowcastRequest]
|
2419
|
+
# @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.
|
2420
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#send-narrowcast-message
|
2421
|
+
# @return [String, nil] when HTTP status code is 202
|
2422
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400
|
2423
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 403
|
2424
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 409
|
2425
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 429
|
2426
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
2427
|
+
def narrowcast(
|
2428
|
+
narrowcast_request:,
|
2429
|
+
x_line_retry_key: nil
|
2430
|
+
)
|
2431
|
+
response_body, _status_code, _headers = narrowcast_with_http_info(
|
2432
|
+
narrowcast_request: narrowcast_request,
|
2433
|
+
x_line_retry_key: x_line_retry_key
|
2434
|
+
)
|
2435
|
+
|
2436
|
+
response_body
|
2437
|
+
end
|
2438
|
+
|
2439
|
+
# Sends a message to a user, group chat, or multi-person chat at any time.
|
2440
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/push</code>
|
2441
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
2442
|
+
#
|
2443
|
+
# @param push_message_request [PushMessageRequest]
|
2444
|
+
# @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.
|
2445
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#send-push-message
|
2446
|
+
# @return [Array(Line::Bot::V2::MessagingApi::PushMessageResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
2447
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 400
|
2448
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 403
|
2449
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 409
|
2450
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 429
|
2451
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
2452
|
+
def push_message_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
2453
|
+
push_message_request:,
|
2454
|
+
x_line_retry_key: nil
|
2455
|
+
)
|
2456
|
+
path = "/v2/bot/message/push"
|
2457
|
+
header_params = {
|
2458
|
+
"X-Line-Retry-Key": x_line_retry_key
|
2459
|
+
}.compact
|
2460
|
+
|
2461
|
+
response = @http_client.post(
|
2462
|
+
path: path,
|
2463
|
+
body_params: push_message_request,
|
2464
|
+
headers: header_params
|
2465
|
+
)
|
2466
|
+
|
2467
|
+
case response.code.to_i
|
2468
|
+
when 200
|
2469
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
2470
|
+
json.transform_keys! do |key|
|
2471
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
2472
|
+
end
|
2473
|
+
response_body = Line::Bot::V2::MessagingApi::PushMessageResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
2474
|
+
[response_body, 200, response.each_header.to_h]
|
2475
|
+
when 400
|
2476
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
2477
|
+
json.transform_keys! do |key|
|
2478
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
2479
|
+
end
|
2480
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
2481
|
+
[response_body, 400, response.each_header.to_h]
|
2482
|
+
when 403
|
2483
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
2484
|
+
json.transform_keys! do |key|
|
2485
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
2486
|
+
end
|
2487
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
2488
|
+
[response_body, 403, response.each_header.to_h]
|
2489
|
+
when 409
|
2490
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
2491
|
+
json.transform_keys! do |key|
|
2492
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
2493
|
+
end
|
2494
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
2495
|
+
[response_body, 409, response.each_header.to_h]
|
2496
|
+
when 429
|
2497
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
2498
|
+
json.transform_keys! do |key|
|
2499
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
2500
|
+
end
|
2501
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
2502
|
+
[response_body, 429, response.each_header.to_h]
|
2503
|
+
else
|
2504
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
2505
|
+
end
|
2506
|
+
end
|
2507
|
+
|
2508
|
+
# Sends a message to a user, group chat, or multi-person chat at any time.
|
2509
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/push</code>
|
2510
|
+
# When you want to get HTTP status code or response headers, use {#push_message_with_http_info} instead of this.
|
2511
|
+
#
|
2512
|
+
# @param push_message_request [PushMessageRequest]
|
2513
|
+
# @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.
|
2514
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#send-push-message
|
2515
|
+
# @return [Line::Bot::V2::MessagingApi::PushMessageResponse] when HTTP status code is 200
|
2516
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400
|
2517
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 403
|
2518
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 409
|
2519
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 429
|
2520
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
2521
|
+
def push_message(
|
2522
|
+
push_message_request:,
|
2523
|
+
x_line_retry_key: nil
|
2524
|
+
)
|
2525
|
+
response_body, _status_code, _headers = push_message_with_http_info(
|
2526
|
+
push_message_request: push_message_request,
|
2527
|
+
x_line_retry_key: x_line_retry_key
|
2528
|
+
)
|
2529
|
+
|
2530
|
+
response_body
|
2531
|
+
end
|
2532
|
+
|
2533
|
+
# Send LINE notification message
|
2534
|
+
# This requests to <code>POST https://api.line.me/bot/pnp/push</code>
|
2535
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
2536
|
+
#
|
2537
|
+
# @param pnp_messages_request [PnpMessagesRequest]
|
2538
|
+
# @param x_line_delivery_tag [String, nil] String returned in the delivery.data property of the delivery completion event via Webhook.
|
2539
|
+
# @see https://developers.line.biz/en/reference/partner-docs/#send-line-notification-message
|
2540
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
2541
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 422
|
2542
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
2543
|
+
def push_messages_by_phone_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
2544
|
+
pnp_messages_request:,
|
2545
|
+
x_line_delivery_tag: nil
|
2546
|
+
)
|
2547
|
+
path = "/bot/pnp/push"
|
2548
|
+
header_params = {
|
2549
|
+
"X-Line-Delivery-Tag": x_line_delivery_tag
|
2550
|
+
}.compact
|
2551
|
+
|
2552
|
+
response = @http_client.post(
|
2553
|
+
path: path,
|
2554
|
+
body_params: pnp_messages_request,
|
2555
|
+
headers: header_params
|
2556
|
+
)
|
2557
|
+
|
2558
|
+
case response.code.to_i
|
2559
|
+
when 200
|
2560
|
+
[response.body, 200, response.each_header.to_h]
|
2561
|
+
when 422
|
2562
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
2563
|
+
json.transform_keys! do |key|
|
2564
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
2565
|
+
end
|
2566
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
2567
|
+
[response_body, 422, response.each_header.to_h]
|
2568
|
+
else
|
2569
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
2570
|
+
end
|
2571
|
+
end
|
2572
|
+
|
2573
|
+
# Send LINE notification message
|
2574
|
+
# This requests to <code>POST https://api.line.me/bot/pnp/push</code>
|
2575
|
+
# When you want to get HTTP status code or response headers, use {#push_messages_by_phone_with_http_info} instead of this.
|
2576
|
+
#
|
2577
|
+
# @param pnp_messages_request [PnpMessagesRequest]
|
2578
|
+
# @param x_line_delivery_tag [String, nil] String returned in the delivery.data property of the delivery completion event via Webhook.
|
2579
|
+
# @see https://developers.line.biz/en/reference/partner-docs/#send-line-notification-message
|
2580
|
+
# @return [String, nil] when HTTP status code is 200
|
2581
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 422
|
2582
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
2583
|
+
def push_messages_by_phone(
|
2584
|
+
pnp_messages_request:,
|
2585
|
+
x_line_delivery_tag: nil
|
2586
|
+
)
|
2587
|
+
response_body, _status_code, _headers = push_messages_by_phone_with_http_info(
|
2588
|
+
pnp_messages_request: pnp_messages_request,
|
2589
|
+
x_line_delivery_tag: x_line_delivery_tag
|
2590
|
+
)
|
2591
|
+
|
2592
|
+
response_body
|
2593
|
+
end
|
2594
|
+
|
2595
|
+
# Send reply message
|
2596
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/reply</code>
|
2597
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
2598
|
+
#
|
2599
|
+
# @param reply_message_request [ReplyMessageRequest]
|
2600
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#send-reply-message
|
2601
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ReplyMessageResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
2602
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 400
|
2603
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 429
|
2604
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
2605
|
+
def reply_message_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
2606
|
+
reply_message_request:
|
2607
|
+
)
|
2608
|
+
path = "/v2/bot/message/reply"
|
2609
|
+
|
2610
|
+
response = @http_client.post(
|
2611
|
+
path: path,
|
2612
|
+
body_params: reply_message_request,
|
2613
|
+
)
|
2614
|
+
|
2615
|
+
case response.code.to_i
|
2616
|
+
when 200
|
2617
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
2618
|
+
json.transform_keys! do |key|
|
2619
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
2620
|
+
end
|
2621
|
+
response_body = Line::Bot::V2::MessagingApi::ReplyMessageResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
2622
|
+
[response_body, 200, response.each_header.to_h]
|
2623
|
+
when 400
|
2624
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
2625
|
+
json.transform_keys! do |key|
|
2626
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
2627
|
+
end
|
2628
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
2629
|
+
[response_body, 400, response.each_header.to_h]
|
2630
|
+
when 429
|
2631
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
2632
|
+
json.transform_keys! do |key|
|
2633
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
2634
|
+
end
|
2635
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
2636
|
+
[response_body, 429, response.each_header.to_h]
|
2637
|
+
else
|
2638
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
2639
|
+
end
|
2640
|
+
end
|
2641
|
+
|
2642
|
+
# Send reply message
|
2643
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/reply</code>
|
2644
|
+
# When you want to get HTTP status code or response headers, use {#reply_message_with_http_info} instead of this.
|
2645
|
+
#
|
2646
|
+
# @param reply_message_request [ReplyMessageRequest]
|
2647
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#send-reply-message
|
2648
|
+
# @return [Line::Bot::V2::MessagingApi::ReplyMessageResponse] when HTTP status code is 200
|
2649
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400
|
2650
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 429
|
2651
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
2652
|
+
def reply_message(
|
2653
|
+
reply_message_request:
|
2654
|
+
)
|
2655
|
+
response_body, _status_code, _headers = reply_message_with_http_info(
|
2656
|
+
reply_message_request: reply_message_request
|
2657
|
+
)
|
2658
|
+
|
2659
|
+
response_body
|
2660
|
+
end
|
2661
|
+
|
2662
|
+
# You can use this endpoint to batch control the rich menu linked to the users using the endpoint such as Link rich menu to user. The following operations are available: 1. Replace a rich menu with another rich menu for all users linked to a specific rich menu 2. Unlink a rich menu for all users linked to a specific rich menu 3. Unlink a rich menu for all users linked the rich menu
|
2663
|
+
# This requests to <code>POST https://api.line.me/v2/bot/richmenu/batch</code>
|
2664
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
2665
|
+
#
|
2666
|
+
# @param rich_menu_batch_request [RichMenuBatchRequest]
|
2667
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#batch-control-rich-menus-of-users
|
2668
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 202
|
2669
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
2670
|
+
def rich_menu_batch_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
2671
|
+
rich_menu_batch_request:
|
2672
|
+
)
|
2673
|
+
path = "/v2/bot/richmenu/batch"
|
2674
|
+
|
2675
|
+
response = @http_client.post(
|
2676
|
+
path: path,
|
2677
|
+
body_params: rich_menu_batch_request,
|
2678
|
+
)
|
2679
|
+
|
2680
|
+
case response.code.to_i
|
2681
|
+
when 202
|
2682
|
+
[response.body, 202, response.each_header.to_h]
|
2683
|
+
else
|
2684
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
2685
|
+
end
|
2686
|
+
end
|
2687
|
+
|
2688
|
+
# You can use this endpoint to batch control the rich menu linked to the users using the endpoint such as Link rich menu to user. The following operations are available: 1. Replace a rich menu with another rich menu for all users linked to a specific rich menu 2. Unlink a rich menu for all users linked to a specific rich menu 3. Unlink a rich menu for all users linked the rich menu
|
2689
|
+
# This requests to <code>POST https://api.line.me/v2/bot/richmenu/batch</code>
|
2690
|
+
# When you want to get HTTP status code or response headers, use {#rich_menu_batch_with_http_info} instead of this.
|
2691
|
+
#
|
2692
|
+
# @param rich_menu_batch_request [RichMenuBatchRequest]
|
2693
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#batch-control-rich-menus-of-users
|
2694
|
+
# @return [String, nil] when HTTP status code is 202
|
2695
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
2696
|
+
def rich_menu_batch(
|
2697
|
+
rich_menu_batch_request:
|
2698
|
+
)
|
2699
|
+
response_body, _status_code, _headers = rich_menu_batch_with_http_info(
|
2700
|
+
rich_menu_batch_request: rich_menu_batch_request
|
2701
|
+
)
|
2702
|
+
|
2703
|
+
response_body
|
2704
|
+
end
|
2705
|
+
|
2706
|
+
# Set default rich menu
|
2707
|
+
# This requests to <code>POST https://api.line.me/v2/bot/user/all/richmenu/{richMenuId}</code>
|
2708
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
2709
|
+
#
|
2710
|
+
# @param rich_menu_id [String] ID of a rich menu
|
2711
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#set-default-rich-menu
|
2712
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
2713
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
2714
|
+
def set_default_rich_menu_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
2715
|
+
rich_menu_id:
|
2716
|
+
)
|
2717
|
+
path = "/v2/bot/user/all/richmenu/{richMenuId}"
|
2718
|
+
.gsub(/{richMenuId}/, rich_menu_id.to_s)
|
2719
|
+
|
2720
|
+
response = @http_client.post(
|
2721
|
+
path: path,
|
2722
|
+
)
|
2723
|
+
|
2724
|
+
case response.code.to_i
|
2725
|
+
when 200
|
2726
|
+
[response.body, 200, response.each_header.to_h]
|
2727
|
+
else
|
2728
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
2729
|
+
end
|
2730
|
+
end
|
2731
|
+
|
2732
|
+
# Set default rich menu
|
2733
|
+
# This requests to <code>POST https://api.line.me/v2/bot/user/all/richmenu/{richMenuId}</code>
|
2734
|
+
# When you want to get HTTP status code or response headers, use {#set_default_rich_menu_with_http_info} instead of this.
|
2735
|
+
#
|
2736
|
+
# @param rich_menu_id [String] ID of a rich menu
|
2737
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#set-default-rich-menu
|
2738
|
+
# @return [String, nil] when HTTP status code is 200
|
2739
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
2740
|
+
def set_default_rich_menu(
|
2741
|
+
rich_menu_id:
|
2742
|
+
)
|
2743
|
+
response_body, _status_code, _headers = set_default_rich_menu_with_http_info(
|
2744
|
+
rich_menu_id: rich_menu_id
|
2745
|
+
)
|
2746
|
+
|
2747
|
+
response_body
|
2748
|
+
end
|
2749
|
+
|
2750
|
+
# Set webhook endpoint URL
|
2751
|
+
# This requests to <code>PUT https://api.line.me/v2/bot/channel/webhook/endpoint</code>
|
2752
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
2753
|
+
#
|
2754
|
+
# @param set_webhook_endpoint_request [SetWebhookEndpointRequest]
|
2755
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#set-webhook-endpoint-url
|
2756
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
2757
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
2758
|
+
def set_webhook_endpoint_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
2759
|
+
set_webhook_endpoint_request:
|
2760
|
+
)
|
2761
|
+
path = "/v2/bot/channel/webhook/endpoint"
|
2762
|
+
|
2763
|
+
response = @http_client.put(
|
2764
|
+
path: path,
|
2765
|
+
body_params: set_webhook_endpoint_request,
|
2766
|
+
)
|
2767
|
+
|
2768
|
+
case response.code.to_i
|
2769
|
+
when 200
|
2770
|
+
[response.body, 200, response.each_header.to_h]
|
2771
|
+
else
|
2772
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
2773
|
+
end
|
2774
|
+
end
|
2775
|
+
|
2776
|
+
# Set webhook endpoint URL
|
2777
|
+
# This requests to <code>PUT https://api.line.me/v2/bot/channel/webhook/endpoint</code>
|
2778
|
+
# When you want to get HTTP status code or response headers, use {#set_webhook_endpoint_with_http_info} instead of this.
|
2779
|
+
#
|
2780
|
+
# @param set_webhook_endpoint_request [SetWebhookEndpointRequest]
|
2781
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#set-webhook-endpoint-url
|
2782
|
+
# @return [String, nil] when HTTP status code is 200
|
2783
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
2784
|
+
def set_webhook_endpoint(
|
2785
|
+
set_webhook_endpoint_request:
|
2786
|
+
)
|
2787
|
+
response_body, _status_code, _headers = set_webhook_endpoint_with_http_info(
|
2788
|
+
set_webhook_endpoint_request: set_webhook_endpoint_request
|
2789
|
+
)
|
2790
|
+
|
2791
|
+
response_body
|
2792
|
+
end
|
2793
|
+
|
2794
|
+
# Display a loading animation in one-on-one chats between users and LINE Official Accounts.
|
2795
|
+
# This requests to <code>POST https://api.line.me/v2/bot/chat/loading/start</code>
|
2796
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
2797
|
+
#
|
2798
|
+
# @param show_loading_animation_request [ShowLoadingAnimationRequest]
|
2799
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#display-a-loading-indicator
|
2800
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 202
|
2801
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 400
|
2802
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
2803
|
+
def show_loading_animation_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
2804
|
+
show_loading_animation_request:
|
2805
|
+
)
|
2806
|
+
path = "/v2/bot/chat/loading/start"
|
2807
|
+
|
2808
|
+
response = @http_client.post(
|
2809
|
+
path: path,
|
2810
|
+
body_params: show_loading_animation_request,
|
2811
|
+
)
|
2812
|
+
|
2813
|
+
case response.code.to_i
|
2814
|
+
when 202
|
2815
|
+
[response.body, 202, response.each_header.to_h]
|
2816
|
+
when 400
|
2817
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
2818
|
+
json.transform_keys! do |key|
|
2819
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
2820
|
+
end
|
2821
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
2822
|
+
[response_body, 400, response.each_header.to_h]
|
2823
|
+
else
|
2824
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
2825
|
+
end
|
2826
|
+
end
|
2827
|
+
|
2828
|
+
# Display a loading animation in one-on-one chats between users and LINE Official Accounts.
|
2829
|
+
# This requests to <code>POST https://api.line.me/v2/bot/chat/loading/start</code>
|
2830
|
+
# When you want to get HTTP status code or response headers, use {#show_loading_animation_with_http_info} instead of this.
|
2831
|
+
#
|
2832
|
+
# @param show_loading_animation_request [ShowLoadingAnimationRequest]
|
2833
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#display-a-loading-indicator
|
2834
|
+
# @return [String, nil] when HTTP status code is 202
|
2835
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400
|
2836
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
2837
|
+
def show_loading_animation(
|
2838
|
+
show_loading_animation_request:
|
2839
|
+
)
|
2840
|
+
response_body, _status_code, _headers = show_loading_animation_with_http_info(
|
2841
|
+
show_loading_animation_request: show_loading_animation_request
|
2842
|
+
)
|
2843
|
+
|
2844
|
+
response_body
|
2845
|
+
end
|
2846
|
+
|
2847
|
+
# Test webhook endpoint
|
2848
|
+
# This requests to <code>POST https://api.line.me/v2/bot/channel/webhook/test</code>
|
2849
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
2850
|
+
#
|
2851
|
+
# @param test_webhook_endpoint_request [TestWebhookEndpointRequest, nil]
|
2852
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#test-webhook-endpoint
|
2853
|
+
# @return [Array(Line::Bot::V2::MessagingApi::TestWebhookEndpointResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
2854
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
2855
|
+
def test_webhook_endpoint_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
2856
|
+
test_webhook_endpoint_request: nil
|
2857
|
+
)
|
2858
|
+
path = "/v2/bot/channel/webhook/test"
|
2859
|
+
|
2860
|
+
response = @http_client.post(
|
2861
|
+
path: path,
|
2862
|
+
body_params: test_webhook_endpoint_request,
|
2863
|
+
)
|
2864
|
+
|
2865
|
+
case response.code.to_i
|
2866
|
+
when 200
|
2867
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
2868
|
+
json.transform_keys! do |key|
|
2869
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
2870
|
+
end
|
2871
|
+
response_body = Line::Bot::V2::MessagingApi::TestWebhookEndpointResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
2872
|
+
[response_body, 200, response.each_header.to_h]
|
2873
|
+
else
|
2874
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
2875
|
+
end
|
2876
|
+
end
|
2877
|
+
|
2878
|
+
# Test webhook endpoint
|
2879
|
+
# This requests to <code>POST https://api.line.me/v2/bot/channel/webhook/test</code>
|
2880
|
+
# When you want to get HTTP status code or response headers, use {#test_webhook_endpoint_with_http_info} instead of this.
|
2881
|
+
#
|
2882
|
+
# @param test_webhook_endpoint_request [TestWebhookEndpointRequest, nil]
|
2883
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#test-webhook-endpoint
|
2884
|
+
# @return [Line::Bot::V2::MessagingApi::TestWebhookEndpointResponse] when HTTP status code is 200
|
2885
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
2886
|
+
def test_webhook_endpoint(
|
2887
|
+
test_webhook_endpoint_request: nil
|
2888
|
+
)
|
2889
|
+
response_body, _status_code, _headers = test_webhook_endpoint_with_http_info(
|
2890
|
+
test_webhook_endpoint_request: test_webhook_endpoint_request
|
2891
|
+
)
|
2892
|
+
|
2893
|
+
response_body
|
2894
|
+
end
|
2895
|
+
|
2896
|
+
# Unlink rich menu from user
|
2897
|
+
# This requests to <code>DELETE https://api.line.me/v2/bot/user/{userId}/richmenu</code>
|
2898
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
2899
|
+
#
|
2900
|
+
# @param user_id [String] User ID. Found in the `source` object of webhook event objects. Do not use the LINE ID used in LINE.
|
2901
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#unlink-rich-menu-from-user
|
2902
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
2903
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
2904
|
+
def unlink_rich_menu_id_from_user_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
2905
|
+
user_id:
|
2906
|
+
)
|
2907
|
+
path = "/v2/bot/user/{userId}/richmenu"
|
2908
|
+
.gsub(/{userId}/, user_id.to_s)
|
2909
|
+
|
2910
|
+
response = @http_client.delete(
|
2911
|
+
path: path,
|
2912
|
+
)
|
2913
|
+
|
2914
|
+
case response.code.to_i
|
2915
|
+
when 200
|
2916
|
+
[response.body, 200, response.each_header.to_h]
|
2917
|
+
else
|
2918
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
2919
|
+
end
|
2920
|
+
end
|
2921
|
+
|
2922
|
+
# Unlink rich menu from user
|
2923
|
+
# This requests to <code>DELETE https://api.line.me/v2/bot/user/{userId}/richmenu</code>
|
2924
|
+
# When you want to get HTTP status code or response headers, use {#unlink_rich_menu_id_from_user_with_http_info} instead of this.
|
2925
|
+
#
|
2926
|
+
# @param user_id [String] User ID. Found in the `source` object of webhook event objects. Do not use the LINE ID used in LINE.
|
2927
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#unlink-rich-menu-from-user
|
2928
|
+
# @return [String, nil] when HTTP status code is 200
|
2929
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
2930
|
+
def unlink_rich_menu_id_from_user(
|
2931
|
+
user_id:
|
2932
|
+
)
|
2933
|
+
response_body, _status_code, _headers = unlink_rich_menu_id_from_user_with_http_info(
|
2934
|
+
user_id: user_id
|
2935
|
+
)
|
2936
|
+
|
2937
|
+
response_body
|
2938
|
+
end
|
2939
|
+
|
2940
|
+
# Unlink rich menus from multiple users
|
2941
|
+
# This requests to <code>POST https://api.line.me/v2/bot/richmenu/bulk/unlink</code>
|
2942
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
2943
|
+
#
|
2944
|
+
# @param rich_menu_bulk_unlink_request [RichMenuBulkUnlinkRequest]
|
2945
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#unlink-rich-menu-from-users
|
2946
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 202
|
2947
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
2948
|
+
def unlink_rich_menu_id_from_users_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
2949
|
+
rich_menu_bulk_unlink_request:
|
2950
|
+
)
|
2951
|
+
path = "/v2/bot/richmenu/bulk/unlink"
|
2952
|
+
|
2953
|
+
response = @http_client.post(
|
2954
|
+
path: path,
|
2955
|
+
body_params: rich_menu_bulk_unlink_request,
|
2956
|
+
)
|
2957
|
+
|
2958
|
+
case response.code.to_i
|
2959
|
+
when 202
|
2960
|
+
[response.body, 202, response.each_header.to_h]
|
2961
|
+
else
|
2962
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
2963
|
+
end
|
2964
|
+
end
|
2965
|
+
|
2966
|
+
# Unlink rich menus from multiple users
|
2967
|
+
# This requests to <code>POST https://api.line.me/v2/bot/richmenu/bulk/unlink</code>
|
2968
|
+
# When you want to get HTTP status code or response headers, use {#unlink_rich_menu_id_from_users_with_http_info} instead of this.
|
2969
|
+
#
|
2970
|
+
# @param rich_menu_bulk_unlink_request [RichMenuBulkUnlinkRequest]
|
2971
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#unlink-rich-menu-from-users
|
2972
|
+
# @return [String, nil] when HTTP status code is 202
|
2973
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
2974
|
+
def unlink_rich_menu_id_from_users(
|
2975
|
+
rich_menu_bulk_unlink_request:
|
2976
|
+
)
|
2977
|
+
response_body, _status_code, _headers = unlink_rich_menu_id_from_users_with_http_info(
|
2978
|
+
rich_menu_bulk_unlink_request: rich_menu_bulk_unlink_request
|
2979
|
+
)
|
2980
|
+
|
2981
|
+
response_body
|
2982
|
+
end
|
2983
|
+
|
2984
|
+
# Update rich menu alias
|
2985
|
+
# This requests to <code>POST https://api.line.me/v2/bot/richmenu/alias/{richMenuAliasId}</code>
|
2986
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
2987
|
+
#
|
2988
|
+
# @param rich_menu_alias_id [String] The rich menu alias ID you want to update.
|
2989
|
+
# @param update_rich_menu_alias_request [UpdateRichMenuAliasRequest]
|
2990
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#update-rich-menu-alias
|
2991
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
2992
|
+
# @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 400
|
2993
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
2994
|
+
def update_rich_menu_alias_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
2995
|
+
rich_menu_alias_id:,
|
2996
|
+
update_rich_menu_alias_request:
|
2997
|
+
)
|
2998
|
+
path = "/v2/bot/richmenu/alias/{richMenuAliasId}"
|
2999
|
+
.gsub(/{richMenuAliasId}/, rich_menu_alias_id.to_s)
|
3000
|
+
|
3001
|
+
response = @http_client.post(
|
3002
|
+
path: path,
|
3003
|
+
body_params: update_rich_menu_alias_request,
|
3004
|
+
)
|
3005
|
+
|
3006
|
+
case response.code.to_i
|
3007
|
+
when 200
|
3008
|
+
[response.body, 200, response.each_header.to_h]
|
3009
|
+
when 400
|
3010
|
+
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
|
3011
|
+
json.transform_keys! do |key|
|
3012
|
+
Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
|
3013
|
+
end
|
3014
|
+
response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json) # steep:ignore InsufficientKeywordArguments
|
3015
|
+
[response_body, 400, response.each_header.to_h]
|
3016
|
+
else
|
3017
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
3018
|
+
end
|
3019
|
+
end
|
3020
|
+
|
3021
|
+
# Update rich menu alias
|
3022
|
+
# This requests to <code>POST https://api.line.me/v2/bot/richmenu/alias/{richMenuAliasId}</code>
|
3023
|
+
# When you want to get HTTP status code or response headers, use {#update_rich_menu_alias_with_http_info} instead of this.
|
3024
|
+
#
|
3025
|
+
# @param rich_menu_alias_id [String] The rich menu alias ID you want to update.
|
3026
|
+
# @param update_rich_menu_alias_request [UpdateRichMenuAliasRequest]
|
3027
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#update-rich-menu-alias
|
3028
|
+
# @return [String, nil] when HTTP status code is 200
|
3029
|
+
# @return [Line::Bot::V2::MessagingApi::ErrorResponse] when HTTP status code is 400
|
3030
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
3031
|
+
def update_rich_menu_alias(
|
3032
|
+
rich_menu_alias_id:,
|
3033
|
+
update_rich_menu_alias_request:
|
3034
|
+
)
|
3035
|
+
response_body, _status_code, _headers = update_rich_menu_alias_with_http_info(
|
3036
|
+
rich_menu_alias_id: rich_menu_alias_id,
|
3037
|
+
update_rich_menu_alias_request: update_rich_menu_alias_request
|
3038
|
+
)
|
3039
|
+
|
3040
|
+
response_body
|
3041
|
+
end
|
3042
|
+
|
3043
|
+
# Validate message objects of a broadcast message
|
3044
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/validate/broadcast</code>
|
3045
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
3046
|
+
#
|
3047
|
+
# @param validate_message_request [ValidateMessageRequest]
|
3048
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-broadcast-message
|
3049
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
3050
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
3051
|
+
def validate_broadcast_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
3052
|
+
validate_message_request:
|
3053
|
+
)
|
3054
|
+
path = "/v2/bot/message/validate/broadcast"
|
3055
|
+
|
3056
|
+
response = @http_client.post(
|
3057
|
+
path: path,
|
3058
|
+
body_params: validate_message_request,
|
3059
|
+
)
|
3060
|
+
|
3061
|
+
case response.code.to_i
|
3062
|
+
when 200
|
3063
|
+
[response.body, 200, response.each_header.to_h]
|
3064
|
+
else
|
3065
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
3066
|
+
end
|
3067
|
+
end
|
3068
|
+
|
3069
|
+
# Validate message objects of a broadcast message
|
3070
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/validate/broadcast</code>
|
3071
|
+
# When you want to get HTTP status code or response headers, use {#validate_broadcast_with_http_info} instead of this.
|
3072
|
+
#
|
3073
|
+
# @param validate_message_request [ValidateMessageRequest]
|
3074
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-broadcast-message
|
3075
|
+
# @return [String, nil] when HTTP status code is 200
|
3076
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
3077
|
+
def validate_broadcast(
|
3078
|
+
validate_message_request:
|
3079
|
+
)
|
3080
|
+
response_body, _status_code, _headers = validate_broadcast_with_http_info(
|
3081
|
+
validate_message_request: validate_message_request
|
3082
|
+
)
|
3083
|
+
|
3084
|
+
response_body
|
3085
|
+
end
|
3086
|
+
|
3087
|
+
# Validate message objects of a multicast message
|
3088
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/validate/multicast</code>
|
3089
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
3090
|
+
#
|
3091
|
+
# @param validate_message_request [ValidateMessageRequest]
|
3092
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-multicast-message
|
3093
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
3094
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
3095
|
+
def validate_multicast_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
3096
|
+
validate_message_request:
|
3097
|
+
)
|
3098
|
+
path = "/v2/bot/message/validate/multicast"
|
3099
|
+
|
3100
|
+
response = @http_client.post(
|
3101
|
+
path: path,
|
3102
|
+
body_params: validate_message_request,
|
3103
|
+
)
|
3104
|
+
|
3105
|
+
case response.code.to_i
|
3106
|
+
when 200
|
3107
|
+
[response.body, 200, response.each_header.to_h]
|
3108
|
+
else
|
3109
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
3110
|
+
end
|
3111
|
+
end
|
3112
|
+
|
3113
|
+
# Validate message objects of a multicast message
|
3114
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/validate/multicast</code>
|
3115
|
+
# When you want to get HTTP status code or response headers, use {#validate_multicast_with_http_info} instead of this.
|
3116
|
+
#
|
3117
|
+
# @param validate_message_request [ValidateMessageRequest]
|
3118
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-multicast-message
|
3119
|
+
# @return [String, nil] when HTTP status code is 200
|
3120
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
3121
|
+
def validate_multicast(
|
3122
|
+
validate_message_request:
|
3123
|
+
)
|
3124
|
+
response_body, _status_code, _headers = validate_multicast_with_http_info(
|
3125
|
+
validate_message_request: validate_message_request
|
3126
|
+
)
|
3127
|
+
|
3128
|
+
response_body
|
3129
|
+
end
|
3130
|
+
|
3131
|
+
# Validate message objects of a narrowcast message
|
3132
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/validate/narrowcast</code>
|
3133
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
3134
|
+
#
|
3135
|
+
# @param validate_message_request [ValidateMessageRequest]
|
3136
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-narrowcast-message
|
3137
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
3138
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
3139
|
+
def validate_narrowcast_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
3140
|
+
validate_message_request:
|
3141
|
+
)
|
3142
|
+
path = "/v2/bot/message/validate/narrowcast"
|
3143
|
+
|
3144
|
+
response = @http_client.post(
|
3145
|
+
path: path,
|
3146
|
+
body_params: validate_message_request,
|
3147
|
+
)
|
3148
|
+
|
3149
|
+
case response.code.to_i
|
3150
|
+
when 200
|
3151
|
+
[response.body, 200, response.each_header.to_h]
|
3152
|
+
else
|
3153
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
3154
|
+
end
|
3155
|
+
end
|
3156
|
+
|
3157
|
+
# Validate message objects of a narrowcast message
|
3158
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/validate/narrowcast</code>
|
3159
|
+
# When you want to get HTTP status code or response headers, use {#validate_narrowcast_with_http_info} instead of this.
|
3160
|
+
#
|
3161
|
+
# @param validate_message_request [ValidateMessageRequest]
|
3162
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-narrowcast-message
|
3163
|
+
# @return [String, nil] when HTTP status code is 200
|
3164
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
3165
|
+
def validate_narrowcast(
|
3166
|
+
validate_message_request:
|
3167
|
+
)
|
3168
|
+
response_body, _status_code, _headers = validate_narrowcast_with_http_info(
|
3169
|
+
validate_message_request: validate_message_request
|
3170
|
+
)
|
3171
|
+
|
3172
|
+
response_body
|
3173
|
+
end
|
3174
|
+
|
3175
|
+
# Validate message objects of a push message
|
3176
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/validate/push</code>
|
3177
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
3178
|
+
#
|
3179
|
+
# @param validate_message_request [ValidateMessageRequest]
|
3180
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-push-message
|
3181
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
3182
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
3183
|
+
def validate_push_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
3184
|
+
validate_message_request:
|
3185
|
+
)
|
3186
|
+
path = "/v2/bot/message/validate/push"
|
3187
|
+
|
3188
|
+
response = @http_client.post(
|
3189
|
+
path: path,
|
3190
|
+
body_params: validate_message_request,
|
3191
|
+
)
|
3192
|
+
|
3193
|
+
case response.code.to_i
|
3194
|
+
when 200
|
3195
|
+
[response.body, 200, response.each_header.to_h]
|
3196
|
+
else
|
3197
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
3198
|
+
end
|
3199
|
+
end
|
3200
|
+
|
3201
|
+
# Validate message objects of a push message
|
3202
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/validate/push</code>
|
3203
|
+
# When you want to get HTTP status code or response headers, use {#validate_push_with_http_info} instead of this.
|
3204
|
+
#
|
3205
|
+
# @param validate_message_request [ValidateMessageRequest]
|
3206
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-push-message
|
3207
|
+
# @return [String, nil] when HTTP status code is 200
|
3208
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
3209
|
+
def validate_push(
|
3210
|
+
validate_message_request:
|
3211
|
+
)
|
3212
|
+
response_body, _status_code, _headers = validate_push_with_http_info(
|
3213
|
+
validate_message_request: validate_message_request
|
3214
|
+
)
|
3215
|
+
|
3216
|
+
response_body
|
3217
|
+
end
|
3218
|
+
|
3219
|
+
# Validate message objects of a reply message
|
3220
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/validate/reply</code>
|
3221
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
3222
|
+
#
|
3223
|
+
# @param validate_message_request [ValidateMessageRequest]
|
3224
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-reply-message
|
3225
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
3226
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
3227
|
+
def validate_reply_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
3228
|
+
validate_message_request:
|
3229
|
+
)
|
3230
|
+
path = "/v2/bot/message/validate/reply"
|
3231
|
+
|
3232
|
+
response = @http_client.post(
|
3233
|
+
path: path,
|
3234
|
+
body_params: validate_message_request,
|
3235
|
+
)
|
3236
|
+
|
3237
|
+
case response.code.to_i
|
3238
|
+
when 200
|
3239
|
+
[response.body, 200, response.each_header.to_h]
|
3240
|
+
else
|
3241
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
3242
|
+
end
|
3243
|
+
end
|
3244
|
+
|
3245
|
+
# Validate message objects of a reply message
|
3246
|
+
# This requests to <code>POST https://api.line.me/v2/bot/message/validate/reply</code>
|
3247
|
+
# When you want to get HTTP status code or response headers, use {#validate_reply_with_http_info} instead of this.
|
3248
|
+
#
|
3249
|
+
# @param validate_message_request [ValidateMessageRequest]
|
3250
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-reply-message
|
3251
|
+
# @return [String, nil] when HTTP status code is 200
|
3252
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
3253
|
+
def validate_reply(
|
3254
|
+
validate_message_request:
|
3255
|
+
)
|
3256
|
+
response_body, _status_code, _headers = validate_reply_with_http_info(
|
3257
|
+
validate_message_request: validate_message_request
|
3258
|
+
)
|
3259
|
+
|
3260
|
+
response_body
|
3261
|
+
end
|
3262
|
+
|
3263
|
+
# Validate a request body of the Replace or unlink the linked rich menus in batches endpoint.
|
3264
|
+
# This requests to <code>POST https://api.line.me/v2/bot/richmenu/validate/batch</code>
|
3265
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
3266
|
+
#
|
3267
|
+
# @param rich_menu_batch_request [RichMenuBatchRequest]
|
3268
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#validate-batch-control-rich-menus-request
|
3269
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
3270
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
3271
|
+
def validate_rich_menu_batch_request_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
3272
|
+
rich_menu_batch_request:
|
3273
|
+
)
|
3274
|
+
path = "/v2/bot/richmenu/validate/batch"
|
3275
|
+
|
3276
|
+
response = @http_client.post(
|
3277
|
+
path: path,
|
3278
|
+
body_params: rich_menu_batch_request,
|
3279
|
+
)
|
3280
|
+
|
3281
|
+
case response.code.to_i
|
3282
|
+
when 200
|
3283
|
+
[response.body, 200, response.each_header.to_h]
|
3284
|
+
else
|
3285
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
3286
|
+
end
|
3287
|
+
end
|
3288
|
+
|
3289
|
+
# Validate a request body of the Replace or unlink the linked rich menus in batches endpoint.
|
3290
|
+
# This requests to <code>POST https://api.line.me/v2/bot/richmenu/validate/batch</code>
|
3291
|
+
# When you want to get HTTP status code or response headers, use {#validate_rich_menu_batch_request_with_http_info} instead of this.
|
3292
|
+
#
|
3293
|
+
# @param rich_menu_batch_request [RichMenuBatchRequest]
|
3294
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#validate-batch-control-rich-menus-request
|
3295
|
+
# @return [String, nil] when HTTP status code is 200
|
3296
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
3297
|
+
def validate_rich_menu_batch_request(
|
3298
|
+
rich_menu_batch_request:
|
3299
|
+
)
|
3300
|
+
response_body, _status_code, _headers = validate_rich_menu_batch_request_with_http_info(
|
3301
|
+
rich_menu_batch_request: rich_menu_batch_request
|
3302
|
+
)
|
3303
|
+
|
3304
|
+
response_body
|
3305
|
+
end
|
3306
|
+
|
3307
|
+
# Validate rich menu object
|
3308
|
+
# This requests to <code>POST https://api.line.me/v2/bot/richmenu/validate</code>
|
3309
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
3310
|
+
#
|
3311
|
+
# @param rich_menu_request [RichMenuRequest]
|
3312
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#validate-rich-menu-object
|
3313
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
3314
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
3315
|
+
def validate_rich_menu_object_with_http_info( # steep:ignore MethodBodyTypeMismatch
|
3316
|
+
rich_menu_request:
|
3317
|
+
)
|
3318
|
+
path = "/v2/bot/richmenu/validate"
|
3319
|
+
|
3320
|
+
response = @http_client.post(
|
3321
|
+
path: path,
|
3322
|
+
body_params: rich_menu_request,
|
3323
|
+
)
|
3324
|
+
|
3325
|
+
case response.code.to_i
|
3326
|
+
when 200
|
3327
|
+
[response.body, 200, response.each_header.to_h]
|
3328
|
+
else
|
3329
|
+
[response.body, response.code.to_i, response.each_header.to_h]
|
3330
|
+
end
|
3331
|
+
end
|
3332
|
+
|
3333
|
+
# Validate rich menu object
|
3334
|
+
# This requests to <code>POST https://api.line.me/v2/bot/richmenu/validate</code>
|
3335
|
+
# When you want to get HTTP status code or response headers, use {#validate_rich_menu_object_with_http_info} instead of this.
|
3336
|
+
#
|
3337
|
+
# @param rich_menu_request [RichMenuRequest]
|
3338
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#validate-rich-menu-object
|
3339
|
+
# @return [String, nil] when HTTP status code is 200
|
3340
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
3341
|
+
def validate_rich_menu_object(
|
3342
|
+
rich_menu_request:
|
3343
|
+
)
|
3344
|
+
response_body, _status_code, _headers = validate_rich_menu_object_with_http_info(
|
3345
|
+
rich_menu_request: rich_menu_request
|
3346
|
+
)
|
3347
|
+
|
3348
|
+
response_body
|
3349
|
+
end
|
3350
|
+
end
|
3351
|
+
end
|
3352
|
+
end
|
3353
|
+
end
|
3354
|
+
end
|