[freshports-coders] interface to query freshports' database

Mario G. Pavlov mgp at e-soul.org
Tue Feb 23 06:15:30 GMT 2010


Hi Dan,
I think the most important information would be the following:
port name
full port version
short description (COMMENT)
long description (pkg-descr)
link to freshports.org

Another thing that we should consider is the limitations of URL when using 
HTTP GET. If I request information for 50-100 or more ports I will probably 
hit the URL length limit. Perhaps we should go for HTTP POST...or even another 
protocol (not HTTP). What do you think?

Regards
Mario

On Tuesday 23 February 2010 04:22:45 Dan Langille wrote:
> On 2/21/2010 5:17 PM, Mario G. Pavlov wrote:
> > 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?
> 
> Correct.
> 
> > 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=ve
> >rsion,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?
> 
> It's a matter of time.  In the immediate future, I have BSDCan and PGCOn
> until the end of May.  After that, I can consider such things.  But the
> design etc can start.
> 
> A good place to start is the list of information you want from the system.
> 


More information about the freshports-coders mailing list