|
1 | 1 | |GitHubActions|_ |CodeCov|_ |PyPi|_ |
2 | 2 |
|
3 | 3 | .. |GitHubActions| image:: https://github.com/kmaehashi/atwiki-python/actions/workflows/test.yml/badge.svg?branch=master |
4 | | -.. _GitHubActions: https://github.com/kmaehashi/atwiki-python/actions/workflows/test.yml |
| 4 | +.. _GitHubActions: https://github.com/kmaehashi/atwiki-python/actions/workflows/test.yml?query=branch%3Amaster |
5 | 5 |
|
6 | 6 | .. |CodeCov| image:: https://codecov.io/gh/kmaehashi/atwiki-python/branch/master/graph/badge.svg |
7 | 7 | .. _CodeCov: https://codecov.io/gh/kmaehashi/atwiki-python |
8 | 8 |
|
9 | | -.. |PyPi| image:: https://badge.fury.io/py/atwiki-python.svg |
10 | | -.. _PyPi: https://badge.fury.io/py/atwiki-python |
| 9 | +.. |PyPI| image:: https://badge.fury.io/py/atwiki-python.svg |
| 10 | +.. _PyPI: https://pypi.org/project/atwiki-python |
11 | 11 |
|
12 | 12 | atwiki-python |
13 | 13 | ============= |
@@ -53,28 +53,29 @@ Python API provides access to @wiki features. |
53 | 53 |
|
54 | 54 | # Show list of tags. |
55 | 55 | for tag in api.get_tags(): |
56 | | - print(tag) |
| 56 | + print(tag) |
57 | 57 |
|
58 | 58 | # Show list of pages. |
59 | 59 | for page in api.get_list(): |
60 | | - print(page) |
| 60 | + print(page) |
61 | 61 |
|
62 | 62 | # Show list of pages tagged with 'tag01'. |
63 | 63 | for page in api.get_list('tag01'): |
64 | | - print(page) |
| 64 | + print(page) |
65 | 65 |
|
66 | 66 | # Show source of page ID 14. |
67 | 67 | print(api.get_source(14)) |
68 | 68 |
|
69 | 69 | # Show results of wiki search. |
70 | 70 | for result in api.search('test'): |
71 | | - print(result) |
| 71 | + print(result) |
72 | 72 |
|
73 | 73 | Hints |
74 | 74 | ----- |
75 | 75 |
|
76 | 76 | * Always use an appropraite interval between requests, or your IP address may get banned. |
77 | 77 | Empirically, 10 seconds of sleep between API call is sufficient. |
| 78 | + Each ``AtWikiAPI`` instance automatically injects a delay between requests. |
78 | 79 | * Your application must expect that entries returned from APIs may be duplicate/missing when pages/tags are added/removed during API call. |
79 | 80 | This is because listing requests are internally pagerized and it is costly to guarantee consistency. |
80 | 81 | * AtWiki's specification may change anytime. |
|
0 commit comments