@@ -363,44 +363,23 @@ def unlink_user_rich_menu(user_id)
363
363
delete ( endpoint_path )
364
364
end
365
365
366
- # To link rich menus to multiple users at a time
366
+ # To link a rich menu to multiple users at a time
367
367
#
368
368
# @param user_ids [Array] ID of the user
369
369
# @param rich_menu_id [String] ID of the uploaded rich menu
370
370
#
371
371
# @return [Net::HTTPResponse]
372
372
def bulk_link_rich_menus ( user_ids , rich_menu_id )
373
- request = Request . new do |config |
374
- config . httpclient = httpclient
375
- config . endpoint = endpoint
376
- config . endpoint_path = "/bot/richmenu/bulk/link"
377
- config . credentials = credentials
378
- config . payload = {
379
- richMenuId : rich_menu_id ,
380
- userIds : user_ids ,
381
- } . to_json
382
- end
383
-
384
- request . post
373
+ post ( "/bot/richmenu/bulk/link" , { richMenuId : rich_menu_id , userIds : user_ids } . to_json )
385
374
end
386
375
387
- # To unlink rich menus from multiple users at a time
376
+ # To unlink a rich menu from multiple users at a time
388
377
#
389
378
# @param user_ids [Array] ID of the user
390
379
#
391
380
# @return [Net::HTTPResponse]
392
381
def bulk_unlink_rich_menus ( user_ids )
393
- request = Request . new do |config |
394
- config . httpclient = httpclient
395
- config . endpoint = endpoint
396
- config . endpoint_path = "/bot/richmenu/bulk/unlink"
397
- config . credentials = credentials
398
- config . payload = {
399
- userIds : user_ids ,
400
- } . to_json
401
- end
402
-
403
- request . post
382
+ post ( "/bot/richmenu/bulk/unlink" , { userIds : user_ids } . to_json )
404
383
end
405
384
406
385
# Download an image associated with a rich menu
0 commit comments