On Sun, 17 Nov 2019, Graeme Geldenhuys wrote:
On 17/11/2019 4:29 pm, Ryan Joseph via fpc-pascal wrote:
at https://www.freepascal.org/docsearch/docsearch.var
Good to see Free Pascal now actually has searchable online docs (without
the help of Internet Search Engines). That's a big step up from a few
years ago. Well done to whomever was involved in that!
That would be me.
And there already is an API. How else ? This is Free Pascal !
If you look in the browser developer console when using that page,
you'll see there are 2 calls available which do return JSON.
for dropdown completion:
https://www.freepascal.org/docsearch/docsearch.cgi/list?t=contains&m=1&q=as
https://www.freepascal.org/docsearch/docsearch.cgi/list?t=contains&m=1&q=al
q is the query parameter. m=1 requests metadata. m=0 omits metadata.
For actual search there is
https://www.freepascal.org/docsearch/docsearch.cgi/search?m=1&q=equals
again, search term is in 'q'. m has the same meaning.
The JSON is straightforward.
But I will document the API.
Michael.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal