dlespiau / patchwork

The freedesktop.org edition of patchwork. Patchwork is a web patch tracking system for projects using a mailing list for contributions and reviews.
http://patchwork-freedesktop.readthedocs.org/en/latest/
GNU General Public License v2.0
22 stars 13 forks source link

Add a simple API call to receive submitter details #134

Closed ruscur closed 8 years ago

ruscur commented 8 years ago

Submitters are referenced by an ID in the series and patch APIs. This is used in the views to render their name and email. Though it can be read from the database or parsed from an mbox, if it's returned in a REST API there should be a place in the API I can look up what it means, rather than just use it in queries.

dlespiau commented 8 years ago

Hi,

So there's a non-documented API GET parameter that can be useful to you right now:

http://patchwork.freedesktop.org/api/1.0/projects/intel-gfx/series/?ordering=-last_updated&related=expand

The key is the related=expand. It will "expand" the related fields, ie the primary keys will become a serialization of the object pointed at by that primary key.

I haven't documented this API yet as I'd like to ensure it makes the number of SQL queries still O(1) (ie not depending on the number of series returned). This is true on the series entry point (it even has test coverage!), but not tested for all the "list" entry points.

ruscur commented 8 years ago

Yeah, that's useful. So, leave the issue open until there's a separate API or the field expansion is documented?

dlespiau commented 8 years ago

I actually had that exact one captured already. So closing as duplicate. I see you're looking at the API, you may be interested in two scripts using the API that I can share:

If you have any precise-ish question don't hesitate to open issues, the documentation of what's possible definitely needs improvement.

Closed as duplicated of https://github.com/dlespiau/patchwork/issues/68