Skip to content

Commit 097ed8b

Browse files
committed
Bumped v0.13.0
Signed-off-by: Vishal Rana <vr@labstack.com>
1 parent 60ba7d4 commit 097ed8b

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

labstack/client.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,19 @@ def text_summary(self, text=None, url=None, language=None, length=None):
134134
if not 200 <= r.status_code < 300:
135135
raise APIError(data['code'], data['message'])
136136
return data
137+
138+
def webpage_to_pdf(self, url=None, size=None, layout=None):
139+
json = {
140+
'url': url,
141+
'size': size,
142+
'layout': layout
143+
}
144+
r = requests.post(API_URL + '/webpage/to-pdf', auth=self.interceptor,
145+
json=json)
146+
data = r.json()
147+
if not 200 <= r.status_code < 300:
148+
raise APIError(data['code'], data['message'])
149+
return data
137150

138151
def word_lookup(self, word=None):
139152
json = {'word': word}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='labstack',
5-
version='0.12.0',
5+
version='0.13.0',
66
description='Official Python client library for the LabStack API',
77
long_description='`<https://github.com/labstack/labstack-python>`_',
88
keywords='image compress, image resize, text summary, barcode generate, barcode scan',

0 commit comments

Comments
 (0)