[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is distro-tracker accessible by some sort of API?



On Fri, Jan 17, 2020 at 02:41:26AM +0000, Paul Wise wrote:
> On Thu, Jan 16, 2020 at 7:06 PM Roberto C. Sánchez wrote:
> 
> > I've read the distro-tracker documentation and it seems like interaction
> > is by visiting with a web browser or via email.  Is there an official or
> > even unofficial API for access to data in distro-tracker?
> 
> There are a few APIs defined in the URL configuration:
> 
> https://salsa.debian.org/qa/distro-tracker/tree/master/distro_tracker/project/urls.py
> 
> Which kind of APIs were you looking for and what did you intend to use
> them for? Most of the tracker data is just imports from elsewhere (UDD
> mostly) so it might be better for you to use that data instead.
> 
OK.  That's helpful.  I'm sure I have heard of UDD over the years and
just not really paid it much mind since it wasn't relevant to my needs
at the time.

My initial thought was to query the tracker for a given package to
determine its availability.

The particular question I'm trying to answer is:

does source package 'foo' exist in release 'bar'?

Looking at the UDD wiki page and the associated examples, it seems like
the query I need is something roughly like:

SELECT COUNT(*) FROM public.packages WHERE source='foo' AND release='bar';

Is this the best approach?

Regards,

-Roberto

-- 
Roberto C. Sánchez


Reply to: