Skip to content

Commit 5b676e2

Browse files
committed
Bumped v0.6.6
Signed-off-by: Vishal Rana <vr@labstack.com>
1 parent db5a860 commit 5b676e2

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

labstack/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import requests
2-
from .queue import _Queue
2+
from .message import _Message
33
from .email import _Email
44
from .log import _Log
55
from .store import _Store
@@ -19,8 +19,8 @@ def __init__(self, account_id, api_key):
1919
self.api_key = api_key
2020
self.interceptor = _Interceptor(api_key)
2121

22-
def queue(self, client_id):
23-
return _Queue(self.account_id, self.api_key, client_id)
22+
def message(self, client_id):
23+
return _Message(self.account_id, self.api_key, client_id)
2424

2525
def email(self):
2626
return _Email(self.interceptor)
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import paho.mqtt.client as mqtt
22

3-
class _Queue():
3+
class _Message():
44
def __init__(self, account_id, api_key, client_id):
55
self.account_id = account_id
66
self.client = mqtt.Client(client_id=client_id, clean_session=True)
@@ -12,10 +12,10 @@ def on_connect(client, userdata, flags, rc):
1212
handler()
1313
self.client.on_connect = on_connect
1414

15-
def on_message(self, handler):
16-
def on_message(client, userdata, msg):
15+
def on_data(self, handler):
16+
def on_data(client, userdata, msg):
1717
handler(msg.topic, msg.payload)
18-
self.client.on_message = on_message
18+
self.client.on_message = on_data
1919

2020
def publish(self, topic, message):
2121
self.client.publish('{}/{}'.format(self.account_id, topic), 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.6.5',
5+
version='0.6.6',
66
description='Official Python client library for the LabStack platform',
77
long_description='`<https://github.com/labstack/labstack-python>`_',
88
keywords='labstack cube email log mqtt store',

0 commit comments

Comments
 (0)