Skip to content

Commit 3ee4093

Browse files
committed
improve readme
1 parent b9570a7 commit 3ee4093

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

README.rst

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ Requirements
3131
Usage
3232
-----
3333

34-
``atwiki-dump`` Tool
35-
~~~~~~~~~~~~~~~~~~~~
34+
``atwiki-dump`` Command
35+
~~~~~~~~~~~~~~~~~~~~~~~
3636

3737
Dump source and page name for each page in the wiki site.
3838

@@ -53,15 +53,15 @@ Python API provides access to @wiki features.
5353
5454
# Show list of tags.
5555
for tag in api.get_tags():
56-
print(tag['name'])
56+
print(tag)
5757
5858
# Show list of pages.
5959
for page in api.get_list():
60-
print(page['name'])
60+
print(page)
6161
6262
# Show list of pages tagged with 'tag01'.
6363
for page in api.get_list('tag01'):
64-
print(page['name'])
64+
print(page)
6565
6666
# Show source of page ID 14.
6767
print(api.get_source(14))
@@ -70,6 +70,16 @@ Python API provides access to @wiki features.
7070
for result in api.search('test'):
7171
print(result)
7272
73+
Hints
74+
-----
75+
76+
* Always use an appropraite interval between requests, or your IP address may get banned.
77+
Empirically, 10 seconds of sleep between API call is sufficient.
78+
* Your application must expect that entries returned from APIs may be duplicate/missing when pages/tags are added/removed during API call.
79+
This is because listing requests are internally pagerized and it is costly to guarantee consistency.
80+
* AtWiki's specification may change anytime.
81+
If you are going to build an automated system, it is encouraged to run test suites included with the installation of this library (``python -m unittest discover atwiki``) everytime before running your application.
82+
7383
License
7484
-------
7585

0 commit comments

Comments
 (0)