Add an "add_inline_comment" method to rietveld.py

With the addition of this method, rietveld.py can be used to create cli-based tools to review Chromium code.

BUG=none

Review URL: https://codereview.chromium.org/127083003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@244529 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/rietveld.py b/rietveld.py
index 7e476fb..5528c55 100644
--- a/rietveld.py
+++ b/rietveld.py
@@ -253,6 +253,18 @@
         ('send_mail', 'True'),
         ('no_redirect', 'True')])
 
+  def add_inline_comment(
+      self, issue, text, side, snapshot, patchset, patchid, lineno):
+    logging.info('add inline comment for issue %d' % issue)
+    return self.post('/inline_draft', [
+        ('issue', str(issue)),
+        ('text', text),
+        ('side', side),
+        ('snapshot', snapshot),
+        ('patchset', str(patchset)),
+        ('patch', str(patchid)),
+         ('lineno', str(lineno))])
+
   def set_flag(self, issue, patchset, flag, value):
     return self.post('/%d/edit_flags' % issue, [
         ('last_patchset', str(patchset)),