Skip to content

Commit 18dd33b

Browse files
committed
Bumped v0.4.0
Signed-off-by: Vishal Rana <vr@labstack.com>
1 parent 3adf33a commit 18dd33b

File tree

4 files changed

+5
-21
lines changed

4 files changed

+5
-21
lines changed

labstack/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .client import Client, SearchParameters
1+
from .client import Client
22
from .email import EmailMessage, EmailError
33
from .log import Level, LogError
44
from .store import StoreError

labstack/client.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,4 @@ def log(self):
2929

3030
def store(self):
3131
return _Store(self.interceptor)
32-
33-
class SearchParameters():
34-
def __init__(self, query=None, query_string=None, since=None, sort=None, size=None, from_=None):
35-
self.query = query
36-
self.query_string = query_string
37-
self.since = since
38-
self.sort = since
39-
self.size = size
40-
self.from_ = from_
32+

labstack/store.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,8 @@ def get(self, collection, id):
2222
raise StoreError(data['code'], data['message'])
2323
return data
2424

25-
def search(self, collection, query=None, query_string=None, since=None, sort=None, size=None, from_=None):
26-
params = {
27-
'query': query,
28-
'query_string': query_string,
29-
'since': since,
30-
'sort': sort,
31-
'size': size,
32-
'from': from_
33-
}
34-
r = requests.post('{}{}/{}/search'.format(API_URL, self.path, collection), auth=self.interceptor, json=params)
25+
def search(self, collection, **kwargs):
26+
r = requests.post('{}{}/{}/search'.format(API_URL, self.path, collection), auth=self.interceptor, json=kwargs)
3527
data = r.json()
3628
if not 200 <= r.status_code < 300:
3729
raise StoreError(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.3.2',
5+
version='0.4.0',
66
description='Official Python client library for the LabStack REST API',
77
long_description='`<https://github.com/labstack/labstack-python>`_',
88
keywords='labstack cube email log mqtt store',

0 commit comments

Comments
 (0)