Board Thread:Support Requests - Getting Technical/@comment-37090017-20181003183008

Hi, im very new to using APIs but what i am trying to do is the following

using the [//ageofempires.wikia.com/api.php http://ageofempires.wikia.com/api.php] i would like to be able to search for a cirtain tech/unit/research/etc and return the basic description as text only.

i.e. if i searched for "forging" it would look at the page [//ageofempires.wikia.com/wiki/Forging http://ageofempires.wikia.com/wiki/Forging]

and return the initial description section being

"Forging is a technology in Age of Empires II that can be researched at the Blacksmith. Once researched, it increases infantry and cavalry attack by +1. Iron Casting is the further upgrade of this technology."

i have tried a few different things after reading the help at [//ageofempires.wikia.com/api.php http://ageofempires.wikia.com/api.php] but it is a bit over my head

the closest to getting what i want has been [//ageofempires.wikia.com/api.php?action=query&prop=revisions&rvprop=content&format=jsonfm&formatversion=2&titles=forging http://ageofempires.wikia.com/api.php?action=query&prop=revisions&rvprop=content&format=jsonfm&formatversion=2&titles=forging]

but i want to narrow it down to only display the above information or if this is not posible then the \n|stats bit, but would prefer the description.

the end goal of me wanting to do this is to add it to a twitch bot (slobs) as a command for chat users to return info on technologies or units they may not be familiar with

example typing '!tech forging' would return a command of '$readapi(URL)' where 'URL' is the api query returning the plain text as required above with the title changed

i.e.

!tech forging

returns $readapi([//ageofempires.wikia.com/api.php?action=query&prop=revisions&rvprop=content&format=jsonfm&formatversion=2&titles=forging http://ageofempires.wikia.com/api.php?action=query&prop=revisions&rvprop=content&format=jsonfm&formatversion=2&titles=]$arg1) where $arg1 is the text after !tech and the page title to grab the description from

any advice or help would be greatly appreciated. thank you in advance

Mark 