Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit701228d

Browse files
committed
Bumped v0.10.1
Signed-off-by: Vishal Rana <vr@labstack.com>
1 parent6ab59f3 commit701228d

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

‎labstack/client.py‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,30 @@ def download(self, id, path):
2323
f.write(chunk)
2424
f.flush()
2525

26-
defbarcode_generate(self,format=None,content=None):
26+
defbarcode_generate(self,format=None,content=None,size=None):
2727
json= {
2828
'format':format,
29-
'content':content
29+
'content':content,
30+
'size':size
3031
}
31-
r=requests.post('{}/barcode/generate'.format(API_URL),auth=self.interceptor,json=json)
32+
r=requests.post(API_URL+'/barcode/generate',auth=self.interceptor,
33+
json=json)
34+
data=r.json()
35+
ifnot200<=r.status_code<300:
36+
raiseAPIError(data['code'],data['message'])
37+
returndata
38+
39+
defbarcode_scan(self,file=None):
40+
files= {'file':open(file,'rb')}
41+
r=requests.post(API_URL+'/barcode/scan',auth=self.interceptor,files=files)
3242
data=r.json()
3343
ifnot200<=r.status_code<300:
3444
raiseAPIError(data['code'],data['message'])
3545
returndata
3646

3747
defimage_compress(self,file=None):
3848
files= {'file':open(file,'rb')}
39-
r=requests.post('{}/image/compress'.format(API_URL),auth=self.interceptor,files=files)
49+
r=requests.post(API_URL+'/image/compress',auth=self.interceptor,files=files)
4050
data=r.json()
4151
ifnot200<=r.status_code<300:
4252
raiseAPIError(data['code'],data['message'])

‎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.10.0',
5+
version='0.10.1',
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)

[8]ページ先頭

©2009-2025 Movatter.jp