I would appreciate an instruction by one "Hello World" example of use of the API for replacing one whole page on my wikidot site. Say that the page is at mysite.wikidot.com/mypage and I have prepared new text for that page in a file called mypage on my Unix system. What do I do on the Unix system to get the wikidot page content replaced by the local file? After that Hello World example I may be able to make further progress by referring to https://www.wikidot.com/doc:api.
I would try to use some of our applications: http://community.wikidot.com/app:_start/tag/python (python tag selected)
http://community.wikidot.com/app:whiffle
http://community.wikidot.com/app:fancydownloader
I would also try to find out how this works:
http://community.wikidot.com/app:edmund
http://community.wikidot.com/app:extension
http://community.wikidot.com/app:jsapi
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
Thank you Helmut, I looked at several of those examples and extracted the following tentative information. I need to become a pro-user and obtain an access key via https://www.wikidot.com/account/settings. Then I must create a local file url.txt containing a single line like this:
https://mysite:<apiaccesskey>@www.wikidot.com/xml-rpc-api.php
Then I can do the following in python.
>>> from xmlrpc import client
>>> mypage=client.ServerProxy(url).pages.save_one({"site" : "mysite", "page" : mypage})
And then I may be able to follow other examples at https://www.wikidot.com/doc:api, always replacing s.<method> by client.ServerProxy(url).<method>.
Hope that this is close enough.
In the mean time I have signed up as a pro-user and have obtained a read-write access key that I put it into a local file url.txt as discussed above. Now I would like to carry out any simple python3 command following the examples at https://www.wikidot.com/doc:api. These examples use a syntax like this: s.categories.select({"site": "my-site"}). I know the name of my site. But what is that "s", the prefix to every method? I expected something like client.ServerProxy(url) (as discussed above), but I cannot make it work. Somehow this "s" must inlcude the information about my access key, so about that local file url.txt.
… And now I found the magic command "url=open("url.txt").read()" in the example file FancyDownloader.py.