@@ -102,8 +102,8 @@ Create a new LineBotApi instance.
102
102
103
103
You can override the ``timeout `` value for each method.
104
104
105
- reply\_ message(self, reply\_ token, messages, timeout=None)
106
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
105
+ reply\_ message(self, reply\_ token, messages, notification_disabled=False, timeout=None)
106
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
107
107
108
108
Respond to events from users, groups, and rooms. You can get a
109
109
reply\_ token from a webhook event object.
@@ -114,8 +114,8 @@ https://developers.line.biz/en/reference/messaging-api/#send-reply-message
114
114
115
115
line_bot_api.reply_message(reply_token, TextSendMessage(text = ' Hello World!' ))
116
116
117
- push\_ message(self, to, messages, timeout=None)
118
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117
+ push\_ message(self, to, messages, notification_disabled=False, timeout=None)
118
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
119
119
120
120
Send messages to users, groups, and rooms at any time.
121
121
@@ -125,17 +125,28 @@ https://developers.line.biz/en/reference/messaging-api/#send-push-message
125
125
126
126
line_bot_api.push_message(to, TextSendMessage(text = ' Hello World!' ))
127
127
128
- multicast(self, to, messages, timeout=None)
129
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
128
+ multicast(self, to, messages, notification_disabled=False, timeout=None)
129
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
130
130
131
- Send messages to multiple users at any time.
131
+ Send push messages to multiple users at any time. Messages cannot be sent to groups or rooms .
132
132
133
133
https://developers.line.biz/en/reference/messaging-api/#send-multicast-message
134
134
135
135
.. code :: python
136
136
137
137
line_bot_api.multicast([' to1' , ' to2' ], TextSendMessage(text = ' Hello World!' ))
138
138
139
+ broadcast(self, messages, notification_disabled=False, timeout=None)
140
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
141
+
142
+ Send push messages to multiple users at any time.
143
+
144
+ https://developers.line.biz/en/reference/messaging-api/#send-broadcast-message
145
+
146
+ .. code :: python
147
+
148
+ line_bot_api.broadcast(TextSendMessage(text = ' Hello World!' ))
149
+
139
150
get\_ profile(self, user\_ id, timeout=None)
140
151
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
141
152
@@ -461,7 +472,7 @@ https://developers.line.biz/en/reference/messaging-api/#revoke-channel-access-to
461
472
line_bot_api.revoke_channel_token(< access_token> )
462
473
463
474
get\_ insight\_ message\_ delivery(self, date, timeout=None)
464
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
475
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
465
476
466
477
Get the number of messages sent on a specified day.
467
478
@@ -473,7 +484,7 @@ https://developers.line.biz/en/reference/messaging-api/#get-number-of-delivery-m
473
484
print (insight.api_broadcast)
474
485
475
486
get\_ insight\_ followers(self, date, timeout=None)
476
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
487
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
477
488
478
489
Get the number of users who have added the bot on or before a specified date.
479
490
@@ -485,7 +496,7 @@ https://developers.line.biz/en/reference/messaging-api/#get-number-of-followers
485
496
print (insight.followers)
486
497
487
498
get\_ insight\_ demographic(self, timeout=None)
488
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
499
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
489
500
490
501
Retrieve the demographic attributes for a bot's friends.
491
502
@@ -505,11 +516,12 @@ https://developers.line.biz/en/reference/messaging-api/#get-message-event
505
516
506
517
.. code :: python
507
518
508
- insight = line_bot_api.get_insight_message_event()
519
+ broadcast_response = line_bot_api.broadcast(TextSendMessage(text = ' Hello World!' ))
520
+ insight = line_bot_api.get_insight_message_event(broadcast_response.request_id)
509
521
print (insight.overview)
510
522
511
523
※ Error handling
512
- ^^^^^^^^^^^^^^^^
524
+ ^^^^^^^^^^^^^^^^^
513
525
514
526
If the LINE API server returns an error, LineBotApi raises LineBotApiError.
515
527
0 commit comments