Changeset: 81a1c44abe91 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=81a1c44abe91 Modified Files: clients/iotapi/documentation/websockets_api.rst clients/iotapi/src/WebSockets/websockets.py clients/iotclient/src/Streams/streamscontext.py Branch: iot Log Message:
Small typos correction diffs (95 lines): diff --git a/clients/iotapi/documentation/websockets_api.rst b/clients/iotapi/documentation/websockets_api.rst --- a/clients/iotapi/documentation/websockets_api.rst +++ b/clients/iotapi/documentation/websockets_api.rst @@ -15,8 +15,8 @@ The client must always provide a JSON st The following sections explain the available :code:`request` fields. -sub ---- +sub/subscribe +------------- Subscribes for new basket creations from a specific stream. Whenever a basket is created, the server sends a notification message indicating the number of inserted tuples in the new basket. The user has to specify the stream's name and schema. To subscribe to a temperature stream, the following would suffice: @@ -28,8 +28,8 @@ Subscribes for new basket creations from "stream": "temperature" } -unsub ------ +unsub/unsubscribe +----------------- Unsubscribes a previous subscribed stream for a client. The user has to specify the stream's name and schema. The example is the same as above, just changing the request keyword. @@ -86,7 +86,7 @@ An internal error occurred in the server { "response": "error", - "message": "Stream measures.temperature not present in the user's subscriptions!" + "message": "Stream measures.temperature is not present in the user's subscriptions!" } subscribed @@ -146,7 +146,7 @@ Notification of a new basket creation fr read ---- -Response message for a read query. Contains the reconstructed tuples listening. The tuples are listened in the say they are inserted in the RESTful webserver. If a column has a null value, the JSON's :code:`null` value will be listened. A possible query result for the above stream: +Response message for a read query. Contains the reconstructed tuples listening. The tuples are listened in the say they are inserted in the RESTful Webserver. If a column has a null value, the JSON's :code:`null` value will be listened. A possible query result for the above stream: .. code-block:: json @@ -174,7 +174,7 @@ Response message for a read query. Conta info ---- -Message with details about a stream including both columns and baskets details. Note that the possible types list are restricted to the MonetDB kernel. A possible example for the above stream: +Message with details about a stream including both columns and baskets details. Note that the possible types list are restricted to the MonetDB kernel. A possible example for the above stream: .. code-block:: json @@ -212,7 +212,7 @@ Message with details about a stream incl data ---- -Return a info messaging regarding all the streams in the system. An example with the temperatures stream: +Returns a info message regarding all the streams in the system. An example with the temperatures stream: .. code-block:: json diff --git a/clients/iotapi/src/WebSockets/websockets.py b/clients/iotapi/src/WebSockets/websockets.py --- a/clients/iotapi/src/WebSockets/websockets.py +++ b/clients/iotapi/src/WebSockets/websockets.py @@ -69,7 +69,7 @@ class IOTAPI(WebSocket): elif input_schema['request'] in UNSUBSCRIBE_OPTS: self.unsubscribe(input_schema['schema'], input_schema['stream']) elif input_schema['request'] in READ_OPTS: - self.read_stream_batch(input_schema['schema'],input_schema['stream'], int(input_schema['basket']), + self.read_stream_batch(input_schema['schema'], input_schema['stream'], int(input_schema['basket']), int(input_schema['limit']), int(input_schema['offset'])) elif input_schema['request'] in INFO_OPTS: if len(input_schema) == 1: # get all streams information @@ -95,7 +95,7 @@ class IOTAPI(WebSocket): if concatenated_name not in self._subscriptions: self._subscriptions_locker.release() self.sendJSONMessage(response="error", message={"message": "Stream " + concatenated_name + - " not present in the user's subscriptions!"}) + " is not present in the user's subscriptions!"}) else: del self._subscriptions[concatenated_name] self._subscriptions_locker.release() diff --git a/clients/iotclient/src/Streams/streamscontext.py b/clients/iotclient/src/Streams/streamscontext.py --- a/clients/iotclient/src/Streams/streamscontext.py +++ b/clients/iotclient/src/Streams/streamscontext.py @@ -102,7 +102,7 @@ class IOTStreamsContext(object): def get_streams_data(self): self._locker.acquire_read() - res = {'count': len(self._context), - 'details': [value.get_data_dictionary(include_number_tuples=True) for value in self._context.values()]} + res = {'streams_count': len(self._context), 'streams_listing': + [value.get_data_dictionary(include_number_tuples=True) for value in self._context.values()]} self._locker.release() return res _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list