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

Commite2f51e4

Browse files
committed
Bumped v0.11.0
Signed-off-by: Vishal Rana <vr@labstack.com>
1 parent701228d commite2f51e4

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

‎labstack/client.py‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ def barcode_scan(self, file=None):
4444
raiseAPIError(data['code'],data['message'])
4545
returndata
4646

47+
defemail_verify(self,email=None):
48+
json= {'email':email}
49+
r=requests.post(API_URL+'/email/verify',auth=self.interceptor,
50+
json=json)
51+
data=r.json()
52+
ifnot200<=r.status_code<300:
53+
raiseAPIError(data['code'],data['message'])
54+
returndata
55+
4756
defimage_compress(self,file=None):
4857
files= {'file':open(file,'rb')}
4958
r=requests.post(API_URL+'/image/compress',auth=self.interceptor,files=files)
@@ -65,6 +74,38 @@ def image_resize(self, file=None, width=None, height=None, crop=None):
6574
ifnot200<=r.status_code<300:
6675
raiseAPIError(data['code'],data['message'])
6776
returndata
77+
78+
deftext_sentiment(self,text=None):
79+
json= {'text':text}
80+
r=requests.post(API_URL+'/text/sentiment',auth=self.interceptor,
81+
json=json)
82+
data=r.json()
83+
ifnot200<=r.status_code<300:
84+
raiseAPIError(data['code'],data['message'])
85+
returndata
86+
87+
deftext_spell_check(self,text=None):
88+
json= {'text':text}
89+
r=requests.post(API_URL+'/text/spell-check',auth=self.interceptor,
90+
json=json)
91+
data=r.json()
92+
ifnot200<=r.status_code<300:
93+
raiseAPIError(data['code'],data['message'])
94+
returndata
95+
96+
deftext_summary(self,text=None,url=None,language=None,length=None):
97+
json= {
98+
'text':text,
99+
'url':url,
100+
'language':language,
101+
'length':length
102+
}
103+
r=requests.post(API_URL+'/text/summary',auth=self.interceptor,
104+
json=json)
105+
data=r.json()
106+
ifnot200<=r.status_code<300:
107+
raiseAPIError(data['code'],data['message'])
108+
returndata
68109

69110
classAPIError(Exception):
70111
def__init__(self,code,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.1',
5+
version='0.11.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)

[8]ページ先頭

©2009-2025 Movatter.jp