@@ -280,6 +280,24 @@ def get_user_rich_menu(user_id)
280
280
get ( endpoint_path )
281
281
end
282
282
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
+
283
301
# Link a rich menu to a user
284
302
#
285
303
# @param user_id [String] ID of the user
@@ -353,6 +371,25 @@ def get(endpoint_path)
353
371
request . get
354
372
end
355
373
374
+ # Post data, get content of specified URL.
375
+ #
376
+ # @param endpoint_path [String]
377
+ #
378
+ # @return [Net::HTTPResponse]
379
+ def post ( endpoint_path , payload = nil )
380
+ raise Line ::Bot ::API ::InvalidCredentialsError , 'Invalidates credentials' unless credentials?
381
+
382
+ request = Request . new do |config |
383
+ config . httpclient = httpclient
384
+ config . endpoint = endpoint
385
+ config . endpoint_path = endpoint_path
386
+ config . credentials = credentials
387
+ config . payload = payload if payload
388
+ end
389
+
390
+ request . post
391
+ end
392
+
356
393
# Delete content of specified URL.
357
394
#
358
395
# @param endpoint_path [String]
0 commit comments