summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@sonymobile.com>2013-10-17 15:59:48 +0900
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2013-10-17 16:11:38 +0900
commit52951c87c234bdb882ab4bf9a46544967c1ba27f (patch)
tree7f45bc8d2bd78084fbb331f5968e7b81b951797b /README.rst
parente655a98f3dc1b23dedaa406d290e24d78e220742 (diff)
downloadpygerrit-52951c87c234bdb882ab4bf9a46544967c1ba27f.tar.gz
Update the README to mention the REST API
Change-Id: I0db09e7c7eb1fd9fd49bd70371b09a9c61326c35
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst20
1 files changed, 19 insertions, 1 deletions
diff --git a/README.rst b/README.rst
index d825bc4..19cd2d5 100644
--- a/README.rst
+++ b/README.rst
@@ -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