Skip to content

Commit 9f3fe03

Browse files
committed
Merge pull request #11 from swestwood/fix-get-content
Fix get_pad_content.
2 parents 4509935 + 58f1562 commit 9f3fe03

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

hackpad_api/hackpad.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,8 @@ def create_hackpad(self, title, content, asUser='', content_type='text/plain'):
2828
params['asUser'] = asUser
2929
return self.do_api_request(api_link, 'POST', params, '%s\n%s' % (title, content), content_type)
3030

31-
def get_pad_content(self, padId, revision='', response_format='txt', asUser=''):
32-
api_link = 'pad/%s/content' % padId
33-
if revision != '':
34-
api_link += revision
35-
api_link += '.%s' % response_format
31+
def get_pad_content(self, padId, revision='latest', response_format='txt', asUser=''):
32+
api_link = 'pad/%s/content/%s.%s' % (padId, revision, response_format)
3633
params = {}
3734
if asUser != '':
3835
params['asUser'] = asUser

0 commit comments

Comments
 (0)