@@ -688,6 +688,21 @@ def create_user_id_audience(params)
688
688
post ( endpoint , endpoint_path , params . to_json , credentials )
689
689
end
690
690
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
+
691
706
# Create an audience group of users that clicked a URL in a message sent in the past
692
707
#
693
708
# Parameters are described here.
@@ -727,13 +742,16 @@ def create_impression_audience
727
742
def rename_audience ( audience_group_id , description )
728
743
channel_token_required
729
744
730
- endpoint_path = "/bot/audienceGroup/#{ audience_group_id } "
745
+ endpoint_path = "/bot/audienceGroup/#{ audience_group_id } /updateDescription "
731
746
body = { description : description }
732
747
put ( endpoint , endpoint_path , body . to_json , credentials )
733
748
end
734
749
735
750
# Delete an existing audience group
736
751
#
752
+ # Parameters are described here.
753
+ # https://developers.line.biz/en/reference/messaging-api/#delete-audience-group
754
+ #
737
755
# @param audience_group_id [Integer]
738
756
#
739
757
# @return [Net::HTTPResponse]
@@ -746,6 +764,9 @@ def delete_audience(audience_group_id)
746
764
747
765
# Get audience group data
748
766
#
767
+ # Parameters are described here.
768
+ # https://developers.line.biz/en/reference/messaging-api/#get-audience-group
769
+ #
749
770
# @param audience_group_id [Integer]
750
771
#
751
772
# @return [Net::HTTPResponse]
@@ -761,18 +782,21 @@ def get_audience(audience_group_id)
761
782
# Parameters are described here.
762
783
# https://developers.line.biz/en/reference/messaging-api/#get-audience-groups
763
784
#
764
- # @param params [Hash] key name `size ` is required
785
+ # @param params [Hash] key name `page ` is required
765
786
#
766
787
# @return [Net::HTTPResponse]
767
788
def get_audiences ( params )
768
789
channel_token_required
769
790
770
- endpoint_path = "/bot/audienceGroup/list?" + params . map { | k , v | " #{ k } = #{ v } " } . join ( '&' )
791
+ endpoint_path = "/bot/audienceGroup/list?" + URI . encode_www_form ( params )
771
792
get ( endpoint , endpoint_path , credentials )
772
793
end
773
794
774
795
# Get the authority level of the audience
775
796
#
797
+ # Parameters are described here.
798
+ # https://developers.line.biz/en/reference/messaging-api/#get-authority-level
799
+ #
776
800
# @return [Net::HTTPResponse]
777
801
def get_audience_authority_level
778
802
channel_token_required
@@ -783,6 +807,9 @@ def get_audience_authority_level
783
807
784
808
# Change the authority level of the audience
785
809
#
810
+ # Parameters are described here.
811
+ # https://developers.line.biz/en/reference/messaging-api/#change-authority-level
812
+ #
786
813
# @param authority_level [String] value must be `PUBLIC` or `PRIVATE`
787
814
#
788
815
# @return [Net::HTTPResponse]
0 commit comments