@@ -5,14 +5,14 @@ line-bot-sdk-python
5
5
6
6
SDK of the LINE Messaging API for Python.
7
7
8
- About LINE Messaging API
8
+ About the LINE Messaging API
9
9
------------------------
10
10
11
- Please refer to the official API documents for details .
11
+ See the official API documentation for more information .
12
12
13
- en : https://devdocs.line.me/en/
13
+ English : https://devdocs.line.me/en/
14
14
15
- ja : https://devdocs.line.me/ja/
15
+ Japanese : https://devdocs.line.me/ja/
16
16
17
17
Install
18
18
-------
@@ -24,7 +24,7 @@ Install
24
24
Synopsis
25
25
--------
26
26
27
- Usage is :
27
+ Usage:
28
28
29
29
.. code :: python
30
30
@@ -85,13 +85,13 @@ Create a new LineBotApi instance.
85
85
86
86
line_bot_api = linebot.LineBotApi(' YOUR_CHANNEL_ACCESS_TOKEN' )
87
87
88
- You can override ``timeout `` value at each methods .
88
+ You can override the ``timeout `` value for each method .
89
89
90
90
reply\_ message(self, reply\_ token, messages, timeout=None)
91
91
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
92
92
93
93
Respond to events from users, groups, and rooms. You can get a
94
- reply\_ token by a Webhook Event Object .
94
+ reply\_ token from a webhook event object .
95
95
96
96
https://devdocs.line.me/en/#reply-message
97
97
@@ -163,10 +163,10 @@ https://devdocs.line.me/en/#leave
163
163
164
164
line_bot_api.leave_room(room_id)
165
165
166
- ※ Error handle
166
+ ※ Error handling
167
167
^^^^^^^^^^^^^^
168
168
169
- If LINE API server responses a error, LineBotApi raise LineBotApiError.
169
+ If the LINE API server returns an error, LineBotApi raises LineBotApiError.
170
170
171
171
https://devdocs.line.me/en/#error-response
172
172
@@ -184,7 +184,7 @@ Send message object
184
184
185
185
https://devdocs.line.me/en/#send-message-object
186
186
187
- These following class in ``linebot.models `` package.
187
+ These following classes are found in the ``linebot.models `` package.
188
188
189
189
TextSendMessage
190
190
^^^^^^^^^^^^^^^
@@ -393,8 +393,8 @@ WebhookParser
393
393
parse(self, body, signature)
394
394
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
395
395
396
- Parse webhook body and build Event Objects List . If signature does NOT
397
- match, raise InvalidSignatureError.
396
+ Parses the webhook body and builds an event object list . If the signature does NOT
397
+ match, InvalidSignatureError is raised .
398
398
399
399
.. code :: python
400
400
@@ -418,8 +418,8 @@ WebhookHandler
418
418
handle(self, body, signature)
419
419
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
420
420
421
- Handle webhook . If signature does NOT match, raise
422
- InvalidSignatureError.
421
+ Handles webhooks . If the signature does NOT match,
422
+ InvalidSignatureError is raised .
423
423
424
424
.. code :: python
425
425
@@ -428,7 +428,7 @@ InvalidSignatureError.
428
428
Add handler method
429
429
^^^^^^^^^^^^^^^^^^
430
430
431
- You can add handler method by using ``add `` decorator.
431
+ You can add a handler method by using the ``add `` decorator.
432
432
433
433
``add(self, event, message=None) ``
434
434
@@ -440,13 +440,13 @@ You can add handler method by using ``add`` decorator.
440
440
event.reply_token,
441
441
TextSendMessage(text = event.message.text))
442
442
443
- When event is instance of MessageEvent and event.message is instance of
443
+ When the event is an instance of MessageEvent and event.message is an instance of
444
444
TextMessage, this handler method is called.
445
445
446
446
Set default handler method
447
447
^^^^^^^^^^^^^^^^^^^^^^^^^^
448
448
449
- You can set default handler method by using ``default `` decorator.
449
+ You can set the default handler method by using the ``default `` decorator.
450
450
451
451
``default(self) ``
452
452
@@ -456,14 +456,14 @@ You can set default handler method by using ``default`` decorator.
456
456
def default (event ):
457
457
print (event)
458
458
459
- There is no handler for event, this default handler method is called.
459
+ If there is no handler for an event, this default handler method is called.
460
460
461
461
Webhook event object
462
462
~~~~~~~~~~~~~~~~~~~~
463
463
464
464
https://devdocs.line.me/en/#webhooks
465
465
466
- These following class in ``linebot.models `` package.
466
+ The following classes are found in the ``linebot.models `` package.
467
467
468
468
Event
469
469
^^^^^
@@ -572,7 +572,7 @@ Sample echo-bot using `Flask <http://flask.pocoo.org/>`__
572
572
573
573
Sample bot using `Flask <http://flask.pocoo.org/ >`__
574
574
575
- API document
575
+ API documentation
576
576
------------
577
577
578
578
::
@@ -586,7 +586,7 @@ OR |Documentation Status|
586
586
Requirements
587
587
------------
588
588
589
- - python >= 2.7 or >= 3.3
589
+ - Python >= 2.7 or >= 3.3
590
590
591
591
For SDK developers
592
592
------------------
@@ -600,26 +600,26 @@ First install for development.
600
600
Run tests
601
601
~~~~~~~~~
602
602
603
- We test by using tox. We test the following versions.
603
+ Test by using tox. We test against the following versions.
604
604
605
605
- 2.7
606
606
- 3.3
607
607
- 3.4
608
608
- 3.5
609
609
610
- If you want to run all tests and run ``flake8 `` against all versions:
610
+ To run all tests and to run ``flake8 `` against all versions, use :
611
611
612
612
::
613
613
614
614
tox
615
615
616
- If you want to run all tests against 2.7 version :
616
+ To run all tests against version 2.7, use :
617
617
618
618
::
619
619
620
620
$ tox -e py27
621
621
622
- If you want to run a test against 2.7 version and against specific file:
622
+ To run a test against version 2.7 and against a specific file, use :
623
623
624
624
::
625
625
0 commit comments