[freshports-coders] interface to query freshports' database

Mario G. Pavlov mgp at e-soul.org
Sun Feb 21 22:17:30 GMT 2010


Hi,
as I'm not the only person (anymore) wanting something like that I'm starting 
this thread as Dan suggested. So why doesn't freshports provide a way for 
external applications or in other words non-browser clients use freshports' 
database? Maybe there was no demand until now? Anyway I've spoken to Dan 
sometime ago for such an interface. I would imagine it something like that: 
sending an HTTP GET request to freshports with maybe SQL-like (or whatever is 
better) parameters and freshports returning clear text (to save bandwidth) or 
XML (to be more elegant) with the response
e.g.
HTTP GET: 
www.freshports.org/publicAPI?ports=www\firefox,www\apache22&attributes=version,description
RESPONSE (in clear text):
www\firefox: version=3.5.7 description=web browser created by Mozilla
www\apache22: version=2.2.6 description=widely used HTTP web server

RESPONSE (in XML):
<ports>
	<port name="www\firefox" version="3.5.7">
		<description>web browser created by Mozilla</description>
	</port>
	<port name="www\apache22" version="2.2.6">
		<description>widely used HTTP web server</description>
	</port>
</ports>

...or something...

Of course this is just a stupid example...the real thing would need some 
design work.
So Dan, what do you think? Are you into something like that?
Thanks.

Regards
MGP


More information about the freshports-coders mailing list