Manual talk:Pywikibot/Create your own script
Add topicAppearance
Latest comment: 6 years ago by Automatik in topic Any way to make an API request easily?
This page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
Any way to make an API request easily?
[edit]Hi, I know there is a pywikibot.data.api module, but could not figure out yet how to use it... Do you have any tip on making an API request to a Wikimedia site? (Looks like the Request class in the data.api module could be used—but how?) Automatik (talk) 19:23, 31 August 2018 (UTC)
- I've created phab:P7506. Framawiki (talk) 09:24, 1 September 2018 (UTC)
- Excellent! Thanks Automatik (talk) 20:02, 1 September 2018 (UTC)
- pywikibot as multiple tier Levels. Try to get the information from Page or Site object first instead of using the low level api. All the api calls in pywikibot are made by Site objects (with few exceptions I guess) @xqt 10:14, 4 September 2018 (UTC)
- Thanks as well; this solution works also well in a similar manner-the difference is that one has to browse site.py instead of browsing xx.yyy.org/w/api.php Automatik (talk) 15:06, 4 September 2018 (UTC)