Skip to content

Commit b24e724

Browse files
committed
デフォルトリッチメニューを操作するメソッドを明記
1 parent 67ffb80 commit b24e724

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

lib/line/bot/client.rb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,24 @@ def get_user_rich_menu(user_id)
280280
get(endpoint_path)
281281
end
282282

283+
# Set default rich menu (Link a rich menu to all user)
284+
#
285+
# @param rich_menu_id [String] ID of an uploaded rich menu
286+
#
287+
# @return [Net::HTTPResponse]
288+
def set_default_rich_menu(rich_menu_id)
289+
endpoint_path = "/bot/user/all/richmenu/#{rich_menu_id}"
290+
post(endpoint_path)
291+
end
292+
293+
# Unset default rich menu (Unlink a rich menu from all user)
294+
#
295+
# @return [Net::HTTPResponse]
296+
def unset_default_rich_menu
297+
endpoint_path = "/bot/user/all/richmenu"
298+
delete(endpoint_path)
299+
end
300+
283301
# Link a rich menu to a user
284302
#
285303
# @param user_id [String] ID of the user

0 commit comments

Comments
 (0)