I did a full pass on the REST API I had and extracted a documented subset that should be easy to extend in the future.
http://patchwork-freedesktop.readthedocs.org/en/latest/api.html A list of entry points is available, that's the basic documentation needed. More will be added later (describe the 'related' GET parameter, how lists of objects work, ordering, some more details about the various fields, ...) On top of exposing the basic objects, later patches add the concept of events to the db and expose them in the API. The first event here is 'series-new-revision', an event created when patchwork has received a new version of a series. This event can be listened to (well, using polling atm) to trigger tests on an incoming series. FWIW, the REST API is documented using sphinxcontrib-httpdomain[1], a bit quirky but does the job. -- Damien [1] https://pythonhosted.org/sphinxcontrib-httpdomain/ Damien Lespiau (7): models: Split a user_name() helper out of UserProfile models: Monkey patch User to have a name() method models: Don't return the email along with the name in Person's __unicode__ api: Add a basic REST API to access Series/Revisions and Patches models: Add Event and EventLog models series: Add a 'new-series-revision' event api: Expose events docs/api.rst | 414 ++++++++++++++++++++++++++++ docs/conf.py | 2 +- docs/index.rst | 1 + docs/requirements-base.txt | 3 + docs/requirements-dev.txt | 1 + patchwork/fixtures/default_events.xml | 6 + patchwork/migrations/0005_event_eventlog.py | 36 +++ patchwork/models.py | 40 ++- patchwork/serializers.py | 139 ++++++++++ patchwork/settings/base.py | 7 + patchwork/tests/test_bundles.py | 2 +- patchwork/tests/test_encodings.py | 4 +- patchwork/tests/test_expiry.py | 2 +- patchwork/tests/test_list.py | 2 +- patchwork/tests/test_mboxviews.py | 12 +- patchwork/tests/test_notifications.py | 4 +- patchwork/tests/test_patchparser.py | 10 +- patchwork/tests/test_series.py | 51 +++- patchwork/tests/test_tags.py | 4 +- patchwork/tests/test_updates.py | 2 +- patchwork/tests/test_xmlrpc.py | 2 +- patchwork/urls.py | 36 +++ patchwork/views/api.py | 144 ++++++++++ 23 files changed, 891 insertions(+), 33 deletions(-) create mode 100644 docs/api.rst create mode 100644 patchwork/fixtures/default_events.xml create mode 100644 patchwork/migrations/0005_event_eventlog.py create mode 100644 patchwork/serializers.py create mode 100644 patchwork/views/api.py -- 2.4.3 _______________________________________________ Patchwork mailing list [email protected] https://lists.ozlabs.org/listinfo/patchwork
