Skip to content

Commit f288857

Browse files
authored
Merge pull request #10 from kmaehashi/improve-readme
Improve documentation
2 parents b9570a7 + b780d7f commit f288857

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (C) 2016-2019 Kenichi Maehashi
1+
Copyright (C) 2016-2022 Kenichi Maehashi
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44

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)