Hi
I’m trying to connect to an external API
For example, if you have a weather chatbot, the chatscript server itself does not have weather data, so it should be retrieved from an external server.
You need to parse the name of the region you entered, for example city, country, village.
And then, you should call api
But I don’t know how to do..
I saw this syntax in the keywordless.top file in Harry’s folder
Whether I need to use this grammar,
Or is there another way?
—————————————————————————————————————————-
?: (what is a _*1 >) keep() $$tmp = _0
$$url = ^”\“https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exsentences=2&exintro;=&explaintext;=&format=json&titles;=$$tmp\”“
$$user_agent = ^“[email protected] User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)”
$$tmp = ^jsonopen(GET $$url “” $$user_agent)
^jsontree($$tmp)
^jsonpath( “.query .pages .56333 .extract” $$tmp)
@0 = query(direct_v ? extract ? 1)
@0object
——————————————————————————————————————————