Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fix for getText + getHtml

  • Loading branch information...
commit c90e7d8829ff5fea8d321e3f49b6f66d2526d352 1 parent 03ab72b
Eugene Mirotin emirotin authored

Showing 1 changed file with 12 additions and 5 deletions. Show diff stats Hide diff stats

  1. +12 5 src/py_etherpad.py
17 src/py_etherpad.py
@@ -159,11 +159,18 @@ def listSessionsOfAuthor(self, authorID):
159 159 # Pad content can be updated and retrieved through the API
160 160
161 161 # returns the text of a pad
162   - # should take optional rev
163   - def getText(self, padID):
164   - return self.call("getText", {
165   - "padID": padID
166   - })
  162 + def getText(self, padID, rev=None):
  163 + params = {"padID": padID}
  164 + if rev is not None:
  165 + params['rev'] = rev
  166 + return self.call("getText", params)
  167 +
  168 + # returns the html of a pad
  169 + def getHtml(self, padID, rev=None):
  170 + params = {"padID": padID}
  171 + if rev is not None:
  172 + params['rev'] = rev
  173 + return self.call("getHTML", params)
167 174
168 175 # sets the text of a pad
169 176 def setText(self, padID, text):

0 comments on commit c90e7d8

Please sign in to comment.
Something went wrong with that request. Please try again.