Reputation: 5520
I'm trying to retrieve section data. The only way I found this is possible is by using the rvsection parameter. Is there a way to get section data by the section title?
rvsection is used like this: http://2007.runescape.wikia.com/api.php?action=query&prop=revisions&titles=Abyssal_demon&rvprop=content&format=jsonfm&rvsection=3
changing the rvsection number determines the data you get.
Upvotes: 1
Views: 130
Reputation: 244988
AFAIK, there is no way to directly get the section contents based on the section name.
What you can do is to get the section name to section index mapping first:
http://2007.runescape.wikia.com/api.php?action=parse&page=Abyssal_demon&prop=sections&format=jsonfm
And use that to figure out the section index of the section that you want.
One possible issue with this approach is what happens when the article changes between the two queries. To solve that, you can make the first query also return revision id:
And then use that in your second query:
Upvotes: 1