@@ -688,6 +688,21 @@ def create_user_id_audience(params)
688688 post ( endpoint , endpoint_path , params . to_json , credentials )
689689 end
690690
691+ # Update an audience group
692+ #
693+ # Parameters are described here.
694+ # https://developers.line.biz/en/reference/messaging-api/#update-upload-audience-group
695+ #
696+ # @param opts [Hash] options
697+ #
698+ # @return [Net::HTTPResponse] This response includes an audience_group_id.
699+ def update_user_id_audience ( params )
700+ channel_token_required
701+
702+ endpoint_path = '/bot/audienceGroup/upload'
703+ put ( endpoint , endpoint_path , params . to_json , credentials )
704+ end
705+
691706 # Create an audience group of users that clicked a URL in a message sent in the past
692707 #
693708 # Parameters are described here.
@@ -727,13 +742,16 @@ def create_impression_audience
727742 def rename_audience ( audience_group_id , description )
728743 channel_token_required
729744
730- endpoint_path = "/bot/audienceGroup/#{ audience_group_id } "
745+ endpoint_path = "/bot/audienceGroup/#{ audience_group_id } /updateDescription "
731746 body = { description : description }
732747 put ( endpoint , endpoint_path , body . to_json , credentials )
733748 end
734749
735750 # Delete an existing audience group
736751 #
752+ # Parameters are described here.
753+ # https://developers.line.biz/en/reference/messaging-api/#delete-audience-group
754+ #
737755 # @param audience_group_id [Integer]
738756 #
739757 # @return [Net::HTTPResponse]
@@ -746,6 +764,9 @@ def delete_audience(audience_group_id)
746764
747765 # Get audience group data
748766 #
767+ # Parameters are described here.
768+ # https://developers.line.biz/en/reference/messaging-api/#get-audience-group
769+ #
749770 # @param audience_group_id [Integer]
750771 #
751772 # @return [Net::HTTPResponse]
@@ -761,18 +782,21 @@ def get_audience(audience_group_id)
761782 # Parameters are described here.
762783 # https://developers.line.biz/en/reference/messaging-api/#get-audience-groups
763784 #
764- # @param params [Hash] key name `size ` is required
785+ # @param params [Hash] key name `page ` is required
765786 #
766787 # @return [Net::HTTPResponse]
767788 def get_audiences ( params )
768789 channel_token_required
769790
770- endpoint_path = "/bot/audienceGroup/list?" + params . map { | k , v | " #{ k } = #{ v } " } . join ( '&' )
791+ endpoint_path = "/bot/audienceGroup/list?" + URI . encode_www_form ( params )
771792 get ( endpoint , endpoint_path , credentials )
772793 end
773794
774795 # Get the authority level of the audience
775796 #
797+ # Parameters are described here.
798+ # https://developers.line.biz/en/reference/messaging-api/#get-authority-level
799+ #
776800 # @return [Net::HTTPResponse]
777801 def get_audience_authority_level
778802 channel_token_required
@@ -783,6 +807,9 @@ def get_audience_authority_level
783807
784808 # Change the authority level of the audience
785809 #
810+ # Parameters are described here.
811+ # https://developers.line.biz/en/reference/messaging-api/#change-authority-level
812+ #
786813 # @param authority_level [String] value must be `PUBLIC` or `PRIVATE`
787814 #
788815 # @return [Net::HTTPResponse]
0 commit comments