diff options
author | David Pursehouse <david.pursehouse@sonymobile.com> | 2013-10-17 15:59:48 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2013-10-17 16:11:38 +0900 |
commit | 52951c87c234bdb882ab4bf9a46544967c1ba27f (patch) | |
tree | 7f45bc8d2bd78084fbb331f5968e7b81b951797b /README.rst | |
parent | e655a98f3dc1b23dedaa406d290e24d78e220742 (diff) | |
download | pygerrit-52951c87c234bdb882ab4bf9a46544967c1ba27f.tar.gz |
Update the README to mention the REST API
Change-Id: I0db09e7c7eb1fd9fd49bd70371b09a9c61326c35
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -2,7 +2,7 @@ Pygerrit - Client library for interacting with Gerrit Code Review ================================================================= Pygerrit is a Python library to interact with the -`Gerrit Code Review`_ system over ssh. +`Gerrit Code Review`_ system over ssh or via the REST API. Installation ------------ @@ -80,6 +80,23 @@ installation with non-standard events. Refer to the `example`_ script for a more detailed example of how the SSH event stream interface works. +REST API +-------- + +Gerrit offers a feature-rich REST API. This library provides a simple +interface for clients to interact with Gerrit via the REST API. + +.. code-block:: pycon + + >>> from requests.auth import HTTPDigestAuth + >>> from pygerrit.rest import GerritRestAPI + >>> auth = HTTPDigestAuth('username', 'password') + >>> rest = GerritRestAPI(url='http://review.example.net', auth=auth) + >>> changes = rest.get("/changes/?q=owner:self%20status:open") + + +Refer to the `rest_example`_ script for a more detailed example of how the +REST API interface works. Copyright and License --------------------- @@ -93,4 +110,5 @@ license details. .. _`Gerrit Code Review`: https://code.google.com/p/gerrit/ .. _example: https://github.com/sonyxperiadev/pygerrit/blob/master/example.py +.. _rest_example: https://github.com/sonyxperiadev/pygerrit/blob/master/rest_example.py .. _LICENSE: https://github.com/sonyxperiadev/pygerrit/blob/master/LICENSE |