partition stringclasses 3
values | func_name stringlengths 1 134 | docstring stringlengths 1 46.9k | path stringlengths 4 223 | original_string stringlengths 75 104k | code stringlengths 75 104k | docstring_tokens listlengths 1 1.97k | repo stringlengths 7 55 | language stringclasses 1
value | url stringlengths 87 315 | code_tokens listlengths 19 28.4k | sha stringlengths 40 40 |
|---|---|---|---|---|---|---|---|---|---|---|---|
test | BtfxWss.unsubscribe_from_ticker | Unsubscribe to the passed pair's ticker channel.
:param pair: str, Symbol pair to request data for
:param kwargs:
:return: | btfxwss/client.py | def unsubscribe_from_ticker(self, pair, **kwargs):
"""Unsubscribe to the passed pair's ticker channel.
:param pair: str, Symbol pair to request data for
:param kwargs:
:return:
"""
identifier = ('ticker', pair)
self._unsubscribe('ticker', identifier, symbol=pair,... | def unsubscribe_from_ticker(self, pair, **kwargs):
"""Unsubscribe to the passed pair's ticker channel.
:param pair: str, Symbol pair to request data for
:param kwargs:
:return:
"""
identifier = ('ticker', pair)
self._unsubscribe('ticker', identifier, symbol=pair,... | [
"Unsubscribe",
"to",
"the",
"passed",
"pair",
"s",
"ticker",
"channel",
"."
] | Crypto-toolbox/btfxwss | python | https://github.com/Crypto-toolbox/btfxwss/blob/16827fa6aacb2c0e289aa852bf61a18df6905835/btfxwss/client.py#L199-L207 | [
"def",
"unsubscribe_from_ticker",
"(",
"self",
",",
"pair",
",",
"*",
"*",
"kwargs",
")",
":",
"identifier",
"=",
"(",
"'ticker'",
",",
"pair",
")",
"self",
".",
"_unsubscribe",
"(",
"'ticker'",
",",
"identifier",
",",
"symbol",
"=",
"pair",
",",
"*",
... | 16827fa6aacb2c0e289aa852bf61a18df6905835 |
test | BtfxWss.subscribe_to_order_book | Subscribe to the passed pair's order book channel.
:param pair: str, Symbol pair to request data for
:param kwargs:
:return: | btfxwss/client.py | def subscribe_to_order_book(self, pair, **kwargs):
"""Subscribe to the passed pair's order book channel.
:param pair: str, Symbol pair to request data for
:param kwargs:
:return:
"""
identifier = ('book', pair)
self._subscribe('book', identifier, symbol=pair, **k... | def subscribe_to_order_book(self, pair, **kwargs):
"""Subscribe to the passed pair's order book channel.
:param pair: str, Symbol pair to request data for
:param kwargs:
:return:
"""
identifier = ('book', pair)
self._subscribe('book', identifier, symbol=pair, **k... | [
"Subscribe",
"to",
"the",
"passed",
"pair",
"s",
"order",
"book",
"channel",
"."
] | Crypto-toolbox/btfxwss | python | https://github.com/Crypto-toolbox/btfxwss/blob/16827fa6aacb2c0e289aa852bf61a18df6905835/btfxwss/client.py#L210-L218 | [
"def",
"subscribe_to_order_book",
"(",
"self",
",",
"pair",
",",
"*",
"*",
"kwargs",
")",
":",
"identifier",
"=",
"(",
"'book'",
",",
"pair",
")",
"self",
".",
"_subscribe",
"(",
"'book'",
",",
"identifier",
",",
"symbol",
"=",
"pair",
",",
"*",
"*",
... | 16827fa6aacb2c0e289aa852bf61a18df6905835 |
test | BtfxWss.unsubscribe_from_order_book | Unsubscribe to the passed pair's order book channel.
:param pair: str, Symbol pair to request data for
:param kwargs:
:return: | btfxwss/client.py | def unsubscribe_from_order_book(self, pair, **kwargs):
"""Unsubscribe to the passed pair's order book channel.
:param pair: str, Symbol pair to request data for
:param kwargs:
:return:
"""
identifier = ('book', pair)
self._unsubscribe('book', identifier, symbol=p... | def unsubscribe_from_order_book(self, pair, **kwargs):
"""Unsubscribe to the passed pair's order book channel.
:param pair: str, Symbol pair to request data for
:param kwargs:
:return:
"""
identifier = ('book', pair)
self._unsubscribe('book', identifier, symbol=p... | [
"Unsubscribe",
"to",
"the",
"passed",
"pair",
"s",
"order",
"book",
"channel",
"."
] | Crypto-toolbox/btfxwss | python | https://github.com/Crypto-toolbox/btfxwss/blob/16827fa6aacb2c0e289aa852bf61a18df6905835/btfxwss/client.py#L221-L229 | [
"def",
"unsubscribe_from_order_book",
"(",
"self",
",",
"pair",
",",
"*",
"*",
"kwargs",
")",
":",
"identifier",
"=",
"(",
"'book'",
",",
"pair",
")",
"self",
".",
"_unsubscribe",
"(",
"'book'",
",",
"identifier",
",",
"symbol",
"=",
"pair",
",",
"*",
... | 16827fa6aacb2c0e289aa852bf61a18df6905835 |
test | BtfxWss.subscribe_to_raw_order_book | Subscribe to the passed pair's raw order book channel.
:param pair: str, Symbol pair to request data for
:param prec:
:param kwargs:
:return: | btfxwss/client.py | def subscribe_to_raw_order_book(self, pair, prec=None, **kwargs):
"""Subscribe to the passed pair's raw order book channel.
:param pair: str, Symbol pair to request data for
:param prec:
:param kwargs:
:return:
"""
identifier = ('raw_book', pair)
prec = '... | def subscribe_to_raw_order_book(self, pair, prec=None, **kwargs):
"""Subscribe to the passed pair's raw order book channel.
:param pair: str, Symbol pair to request data for
:param prec:
:param kwargs:
:return:
"""
identifier = ('raw_book', pair)
prec = '... | [
"Subscribe",
"to",
"the",
"passed",
"pair",
"s",
"raw",
"order",
"book",
"channel",
"."
] | Crypto-toolbox/btfxwss | python | https://github.com/Crypto-toolbox/btfxwss/blob/16827fa6aacb2c0e289aa852bf61a18df6905835/btfxwss/client.py#L232-L242 | [
"def",
"subscribe_to_raw_order_book",
"(",
"self",
",",
"pair",
",",
"prec",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"identifier",
"=",
"(",
"'raw_book'",
",",
"pair",
")",
"prec",
"=",
"'R0'",
"if",
"prec",
"is",
"None",
"else",
"prec",
"self"... | 16827fa6aacb2c0e289aa852bf61a18df6905835 |
test | BtfxWss.unsubscribe_from_raw_order_book | Unsubscribe to the passed pair's raw order book channel.
:param pair: str, Symbol pair to request data for
:param prec:
:param kwargs:
:return: | btfxwss/client.py | def unsubscribe_from_raw_order_book(self, pair, prec=None, **kwargs):
"""Unsubscribe to the passed pair's raw order book channel.
:param pair: str, Symbol pair to request data for
:param prec:
:param kwargs:
:return:
"""
identifier = ('raw_book', pair)
pr... | def unsubscribe_from_raw_order_book(self, pair, prec=None, **kwargs):
"""Unsubscribe to the passed pair's raw order book channel.
:param pair: str, Symbol pair to request data for
:param prec:
:param kwargs:
:return:
"""
identifier = ('raw_book', pair)
pr... | [
"Unsubscribe",
"to",
"the",
"passed",
"pair",
"s",
"raw",
"order",
"book",
"channel",
"."
] | Crypto-toolbox/btfxwss | python | https://github.com/Crypto-toolbox/btfxwss/blob/16827fa6aacb2c0e289aa852bf61a18df6905835/btfxwss/client.py#L245-L255 | [
"def",
"unsubscribe_from_raw_order_book",
"(",
"self",
",",
"pair",
",",
"prec",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"identifier",
"=",
"(",
"'raw_book'",
",",
"pair",
")",
"prec",
"=",
"'R0'",
"if",
"prec",
"is",
"None",
"else",
"prec",
"s... | 16827fa6aacb2c0e289aa852bf61a18df6905835 |
test | BtfxWss.subscribe_to_trades | Subscribe to the passed pair's trades channel.
:param pair: str, Symbol pair to request data for
:param kwargs:
:return: | btfxwss/client.py | def subscribe_to_trades(self, pair, **kwargs):
"""Subscribe to the passed pair's trades channel.
:param pair: str, Symbol pair to request data for
:param kwargs:
:return:
"""
identifier = ('trades', pair)
self._subscribe('trades', identifier, symbol=pair, **kwarg... | def subscribe_to_trades(self, pair, **kwargs):
"""Subscribe to the passed pair's trades channel.
:param pair: str, Symbol pair to request data for
:param kwargs:
:return:
"""
identifier = ('trades', pair)
self._subscribe('trades', identifier, symbol=pair, **kwarg... | [
"Subscribe",
"to",
"the",
"passed",
"pair",
"s",
"trades",
"channel",
"."
] | Crypto-toolbox/btfxwss | python | https://github.com/Crypto-toolbox/btfxwss/blob/16827fa6aacb2c0e289aa852bf61a18df6905835/btfxwss/client.py#L258-L266 | [
"def",
"subscribe_to_trades",
"(",
"self",
",",
"pair",
",",
"*",
"*",
"kwargs",
")",
":",
"identifier",
"=",
"(",
"'trades'",
",",
"pair",
")",
"self",
".",
"_subscribe",
"(",
"'trades'",
",",
"identifier",
",",
"symbol",
"=",
"pair",
",",
"*",
"*",
... | 16827fa6aacb2c0e289aa852bf61a18df6905835 |
test | BtfxWss.unsubscribe_from_trades | Unsubscribe to the passed pair's trades channel.
:param pair: str, Symbol pair to request data for
:param kwargs:
:return: | btfxwss/client.py | def unsubscribe_from_trades(self, pair, **kwargs):
"""Unsubscribe to the passed pair's trades channel.
:param pair: str, Symbol pair to request data for
:param kwargs:
:return:
"""
identifier = ('trades', pair)
self._unsubscribe('trades', identifier, symbol=pair,... | def unsubscribe_from_trades(self, pair, **kwargs):
"""Unsubscribe to the passed pair's trades channel.
:param pair: str, Symbol pair to request data for
:param kwargs:
:return:
"""
identifier = ('trades', pair)
self._unsubscribe('trades', identifier, symbol=pair,... | [
"Unsubscribe",
"to",
"the",
"passed",
"pair",
"s",
"trades",
"channel",
"."
] | Crypto-toolbox/btfxwss | python | https://github.com/Crypto-toolbox/btfxwss/blob/16827fa6aacb2c0e289aa852bf61a18df6905835/btfxwss/client.py#L269-L277 | [
"def",
"unsubscribe_from_trades",
"(",
"self",
",",
"pair",
",",
"*",
"*",
"kwargs",
")",
":",
"identifier",
"=",
"(",
"'trades'",
",",
"pair",
")",
"self",
".",
"_unsubscribe",
"(",
"'trades'",
",",
"identifier",
",",
"symbol",
"=",
"pair",
",",
"*",
... | 16827fa6aacb2c0e289aa852bf61a18df6905835 |
test | BtfxWss.subscribe_to_candles | Subscribe to the passed pair's OHLC data channel.
:param pair: str, Symbol pair to request data for
:param timeframe: str, {1m, 5m, 15m, 30m, 1h, 3h, 6h, 12h,
1D, 7D, 14D, 1M}
:param kwargs:
:return: | btfxwss/client.py | def subscribe_to_candles(self, pair, timeframe=None, **kwargs):
"""Subscribe to the passed pair's OHLC data channel.
:param pair: str, Symbol pair to request data for
:param timeframe: str, {1m, 5m, 15m, 30m, 1h, 3h, 6h, 12h,
1D, 7D, 14D, 1M}
:param kwarg... | def subscribe_to_candles(self, pair, timeframe=None, **kwargs):
"""Subscribe to the passed pair's OHLC data channel.
:param pair: str, Symbol pair to request data for
:param timeframe: str, {1m, 5m, 15m, 30m, 1h, 3h, 6h, 12h,
1D, 7D, 14D, 1M}
:param kwarg... | [
"Subscribe",
"to",
"the",
"passed",
"pair",
"s",
"OHLC",
"data",
"channel",
"."
] | Crypto-toolbox/btfxwss | python | https://github.com/Crypto-toolbox/btfxwss/blob/16827fa6aacb2c0e289aa852bf61a18df6905835/btfxwss/client.py#L280-L300 | [
"def",
"subscribe_to_candles",
"(",
"self",
",",
"pair",
",",
"timeframe",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"valid_tfs",
"=",
"[",
"'1m'",
",",
"'5m'",
",",
"'15m'",
",",
"'30m'",
",",
"'1h'",
",",
"'3h'",
",",
"'6h'",
",",
"'12h'",
... | 16827fa6aacb2c0e289aa852bf61a18df6905835 |
test | BtfxWss.unsubscribe_from_candles | Unsubscribe to the passed pair's OHLC data channel.
:param timeframe: str, {1m, 5m, 15m, 30m, 1h, 3h, 6h, 12h,
1D, 7D, 14D, 1M}
:param kwargs:
:return: | btfxwss/client.py | def unsubscribe_from_candles(self, pair, timeframe=None, **kwargs):
"""Unsubscribe to the passed pair's OHLC data channel.
:param timeframe: str, {1m, 5m, 15m, 30m, 1h, 3h, 6h, 12h,
1D, 7D, 14D, 1M}
:param kwargs:
:return:
"""
valid_tfs =... | def unsubscribe_from_candles(self, pair, timeframe=None, **kwargs):
"""Unsubscribe to the passed pair's OHLC data channel.
:param timeframe: str, {1m, 5m, 15m, 30m, 1h, 3h, 6h, 12h,
1D, 7D, 14D, 1M}
:param kwargs:
:return:
"""
valid_tfs =... | [
"Unsubscribe",
"to",
"the",
"passed",
"pair",
"s",
"OHLC",
"data",
"channel",
"."
] | Crypto-toolbox/btfxwss | python | https://github.com/Crypto-toolbox/btfxwss/blob/16827fa6aacb2c0e289aa852bf61a18df6905835/btfxwss/client.py#L303-L323 | [
"def",
"unsubscribe_from_candles",
"(",
"self",
",",
"pair",
",",
"timeframe",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"valid_tfs",
"=",
"[",
"'1m'",
",",
"'5m'",
",",
"'15m'",
",",
"'30m'",
",",
"'1h'",
",",
"'3h'",
",",
"'6h'",
",",
"'12h'"... | 16827fa6aacb2c0e289aa852bf61a18df6905835 |
test | BtfxWss.authenticate | Authenticate with the Bitfinex API.
:return: | btfxwss/client.py | def authenticate(self):
"""Authenticate with the Bitfinex API.
:return:
"""
if not self.key and not self.secret:
raise ValueError("Must supply both key and secret key for API!")
self.channel_configs['auth'] = {'api_key': self.key, 'secret': self.secret}
self.... | def authenticate(self):
"""Authenticate with the Bitfinex API.
:return:
"""
if not self.key and not self.secret:
raise ValueError("Must supply both key and secret key for API!")
self.channel_configs['auth'] = {'api_key': self.key, 'secret': self.secret}
self.... | [
"Authenticate",
"with",
"the",
"Bitfinex",
"API",
"."
] | Crypto-toolbox/btfxwss | python | https://github.com/Crypto-toolbox/btfxwss/blob/16827fa6aacb2c0e289aa852bf61a18df6905835/btfxwss/client.py#L326-L334 | [
"def",
"authenticate",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"key",
"and",
"not",
"self",
".",
"secret",
":",
"raise",
"ValueError",
"(",
"\"Must supply both key and secret key for API!\"",
")",
"self",
".",
"channel_configs",
"[",
"'auth'",
"]",
"=... | 16827fa6aacb2c0e289aa852bf61a18df6905835 |
test | BtfxWss.cancel_order | Cancel one or multiple orders via Websocket.
:param multi: bool, whether order_settings contains settings for one, or
multiples orders
:param order_identifiers: Identifiers for the order(s) you with to cancel
:return: | btfxwss/client.py | def cancel_order(self, multi=False, **order_identifiers):
"""Cancel one or multiple orders via Websocket.
:param multi: bool, whether order_settings contains settings for one, or
multiples orders
:param order_identifiers: Identifiers for the order(s) you with to cancel
... | def cancel_order(self, multi=False, **order_identifiers):
"""Cancel one or multiple orders via Websocket.
:param multi: bool, whether order_settings contains settings for one, or
multiples orders
:param order_identifiers: Identifiers for the order(s) you with to cancel
... | [
"Cancel",
"one",
"or",
"multiple",
"orders",
"via",
"Websocket",
"."
] | Crypto-toolbox/btfxwss | python | https://github.com/Crypto-toolbox/btfxwss/blob/16827fa6aacb2c0e289aa852bf61a18df6905835/btfxwss/client.py#L346-L357 | [
"def",
"cancel_order",
"(",
"self",
",",
"multi",
"=",
"False",
",",
"*",
"*",
"order_identifiers",
")",
":",
"if",
"multi",
":",
"self",
".",
"_send_auth_command",
"(",
"'oc_multi'",
",",
"order_identifiers",
")",
"else",
":",
"self",
".",
"_send_auth_comma... | 16827fa6aacb2c0e289aa852bf61a18df6905835 |
test | parseEnvVars | Parse environment variables into a Python dictionary suitable for passing to the
device client constructor as the `options` parameter
- `WIOTP_IDENTITY_APPID`
- `WIOTP_AUTH_KEY`
- `WIOTP_AUTH_TOKEN`
- `WIOTP_OPTIONS_DOMAIN` (optional)
- `WIOTP_OPTIONS_LOGLEVEL` (optional)
- `WIOTP_OPTIONS_... | src/wiotp/sdk/application/config.py | def parseEnvVars():
"""
Parse environment variables into a Python dictionary suitable for passing to the
device client constructor as the `options` parameter
- `WIOTP_IDENTITY_APPID`
- `WIOTP_AUTH_KEY`
- `WIOTP_AUTH_TOKEN`
- `WIOTP_OPTIONS_DOMAIN` (optional)
- `WIOTP_OPTIONS_LOGLEVEL` ... | def parseEnvVars():
"""
Parse environment variables into a Python dictionary suitable for passing to the
device client constructor as the `options` parameter
- `WIOTP_IDENTITY_APPID`
- `WIOTP_AUTH_KEY`
- `WIOTP_AUTH_TOKEN`
- `WIOTP_OPTIONS_DOMAIN` (optional)
- `WIOTP_OPTIONS_LOGLEVEL` ... | [
"Parse",
"environment",
"variables",
"into",
"a",
"Python",
"dictionary",
"suitable",
"for",
"passing",
"to",
"the",
"device",
"client",
"constructor",
"as",
"the",
"options",
"parameter"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/application/config.py#L167-L254 | [
"def",
"parseEnvVars",
"(",
")",
":",
"# Auth",
"authKey",
"=",
"os",
".",
"getenv",
"(",
"\"WIOTP_AUTH_KEY\"",
",",
"None",
")",
"authToken",
"=",
"os",
".",
"getenv",
"(",
"\"WIOTP_AUTH_TOKEN\"",
",",
"None",
")",
"# Also support WIOTP_API_KEY / WIOTP_API_TOKEN ... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | parseConfigFile | Parse a yaml configuration file into a Python dictionary suitable for passing to the
device client constructor as the `options` parameter
# Example Configuration File
identity:
appId: myApp
auth:
key: a-23gh56-sdsdajhjnee
token: Ab$76s)asj8_s5
options:
domain: inte... | src/wiotp/sdk/application/config.py | def parseConfigFile(configFilePath):
"""
Parse a yaml configuration file into a Python dictionary suitable for passing to the
device client constructor as the `options` parameter
# Example Configuration File
identity:
appId: myApp
auth:
key: a-23gh56-sdsdajhjnee
toke... | def parseConfigFile(configFilePath):
"""
Parse a yaml configuration file into a Python dictionary suitable for passing to the
device client constructor as the `options` parameter
# Example Configuration File
identity:
appId: myApp
auth:
key: a-23gh56-sdsdajhjnee
toke... | [
"Parse",
"a",
"yaml",
"configuration",
"file",
"into",
"a",
"Python",
"dictionary",
"suitable",
"for",
"passing",
"to",
"the",
"device",
"client",
"constructor",
"as",
"the",
"options",
"parameter",
"#",
"Example",
"Configuration",
"File",
"identity",
":",
"appI... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/application/config.py#L257-L299 | [
"def",
"parseConfigFile",
"(",
"configFilePath",
")",
":",
"try",
":",
"with",
"open",
"(",
"configFilePath",
")",
"as",
"f",
":",
"data",
"=",
"yaml",
".",
"load",
"(",
"f",
")",
"except",
"(",
"OSError",
",",
"IOError",
")",
"as",
"e",
":",
"# In 3... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | GatewayClient._onCommand | Internal callback for device command messages, parses source device from topic string and
passes the information on to the registered device command callback | src/wiotp/sdk/gateway/client.py | def _onCommand(self, client, userdata, pahoMessage):
"""
Internal callback for device command messages, parses source device from topic string and
passes the information on to the registered device command callback
"""
try:
command = Command(pahoMessage, self._message... | def _onCommand(self, client, userdata, pahoMessage):
"""
Internal callback for device command messages, parses source device from topic string and
passes the information on to the registered device command callback
"""
try:
command = Command(pahoMessage, self._message... | [
"Internal",
"callback",
"for",
"device",
"command",
"messages",
"parses",
"source",
"device",
"from",
"topic",
"string",
"and",
"passes",
"the",
"information",
"on",
"to",
"the",
"registered",
"device",
"command",
"callback"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/gateway/client.py#L111-L123 | [
"def",
"_onCommand",
"(",
"self",
",",
"client",
",",
"userdata",
",",
"pahoMessage",
")",
":",
"try",
":",
"command",
"=",
"Command",
"(",
"pahoMessage",
",",
"self",
".",
"_messageCodecs",
")",
"except",
"InvalidEventException",
"as",
"e",
":",
"self",
"... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | GatewayClient._onDeviceCommand | Internal callback for gateway command messages, parses source device from topic string and
passes the information on to the registered device command callback | src/wiotp/sdk/gateway/client.py | def _onDeviceCommand(self, client, userdata, pahoMessage):
"""
Internal callback for gateway command messages, parses source device from topic string and
passes the information on to the registered device command callback
"""
try:
command = Command(pahoMessage, self._... | def _onDeviceCommand(self, client, userdata, pahoMessage):
"""
Internal callback for gateway command messages, parses source device from topic string and
passes the information on to the registered device command callback
"""
try:
command = Command(pahoMessage, self._... | [
"Internal",
"callback",
"for",
"gateway",
"command",
"messages",
"parses",
"source",
"device",
"from",
"topic",
"string",
"and",
"passes",
"the",
"information",
"on",
"to",
"the",
"registered",
"device",
"command",
"callback"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/gateway/client.py#L125-L137 | [
"def",
"_onDeviceCommand",
"(",
"self",
",",
"client",
",",
"userdata",
",",
"pahoMessage",
")",
":",
"try",
":",
"command",
"=",
"Command",
"(",
"pahoMessage",
",",
"self",
".",
"_messageCodecs",
")",
"except",
"InvalidEventException",
"as",
"e",
":",
"self... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | GatewayClient._onMessageNotification | Internal callback for gateway notification messages, parses source device from topic string and
passes the information on to the registered device command callback | src/wiotp/sdk/gateway/client.py | def _onMessageNotification(self, client, userdata, pahoMessage):
"""
Internal callback for gateway notification messages, parses source device from topic string and
passes the information on to the registered device command callback
"""
try:
note = Notification(pahoMe... | def _onMessageNotification(self, client, userdata, pahoMessage):
"""
Internal callback for gateway notification messages, parses source device from topic string and
passes the information on to the registered device command callback
"""
try:
note = Notification(pahoMe... | [
"Internal",
"callback",
"for",
"gateway",
"notification",
"messages",
"parses",
"source",
"device",
"from",
"topic",
"string",
"and",
"passes",
"the",
"information",
"on",
"to",
"the",
"registered",
"device",
"command",
"callback"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/gateway/client.py#L139-L151 | [
"def",
"_onMessageNotification",
"(",
"self",
",",
"client",
",",
"userdata",
",",
"pahoMessage",
")",
":",
"try",
":",
"note",
"=",
"Notification",
"(",
"pahoMessage",
",",
"self",
".",
"_messageCodecs",
")",
"except",
"InvalidEventException",
"as",
"e",
":",... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | Connectors.find | Gets the list of Historian connectors, they are used to configure the Watson IoT Platform to store IoT data in compatible services.
Parameters:
- nameFilter(string) - Filter the results by the specified name
- typeFilter(string) - Filter the results by the spe... | src/wiotp/sdk/api/dsc/connectors.py | def find(self, nameFilter=None, typeFilter=None, enabledFilter=None, serviceId=None):
"""
Gets the list of Historian connectors, they are used to configure the Watson IoT Platform to store IoT data in compatible services.
Parameters:
- nameFilter(string) - Filt... | def find(self, nameFilter=None, typeFilter=None, enabledFilter=None, serviceId=None):
"""
Gets the list of Historian connectors, they are used to configure the Watson IoT Platform to store IoT data in compatible services.
Parameters:
- nameFilter(string) - Filt... | [
"Gets",
"the",
"list",
"of",
"Historian",
"connectors",
"they",
"are",
"used",
"to",
"configure",
"the",
"Watson",
"IoT",
"Platform",
"to",
"store",
"IoT",
"data",
"in",
"compatible",
"services",
".",
"Parameters",
":",
"-",
"nameFilter",
"(",
"string",
")",... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/api/dsc/connectors.py#L159-L185 | [
"def",
"find",
"(",
"self",
",",
"nameFilter",
"=",
"None",
",",
"typeFilter",
"=",
"None",
",",
"enabledFilter",
"=",
"None",
",",
"serviceId",
"=",
"None",
")",
":",
"queryParms",
"=",
"{",
"}",
"if",
"nameFilter",
":",
"queryParms",
"[",
"\"name\"",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | Connectors.create | Create a connector for the organization in the Watson IoT Platform.
The connector must reference the target service that the Watson IoT Platform will store the IoT data in.
Parameters:
- name (string) - Name of the service
- serviceId (string) - must be either eventstreams or cl... | src/wiotp/sdk/api/dsc/connectors.py | def create(self, name, serviceId, timezone, description, enabled):
"""
Create a connector for the organization in the Watson IoT Platform.
The connector must reference the target service that the Watson IoT Platform will store the IoT data in.
Parameters:
- name (string) - N... | def create(self, name, serviceId, timezone, description, enabled):
"""
Create a connector for the organization in the Watson IoT Platform.
The connector must reference the target service that the Watson IoT Platform will store the IoT data in.
Parameters:
- name (string) - N... | [
"Create",
"a",
"connector",
"for",
"the",
"organization",
"in",
"the",
"Watson",
"IoT",
"Platform",
".",
"The",
"connector",
"must",
"reference",
"the",
"target",
"service",
"that",
"the",
"Watson",
"IoT",
"Platform",
"will",
"store",
"the",
"IoT",
"data",
"... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/api/dsc/connectors.py#L187-L214 | [
"def",
"create",
"(",
"self",
",",
"name",
",",
"serviceId",
",",
"timezone",
",",
"description",
",",
"enabled",
")",
":",
"connector",
"=",
"{",
"\"name\"",
":",
"name",
",",
"\"description\"",
":",
"description",
",",
"\"serviceId\"",
":",
"serviceId",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | Connectors.update | Updates the connector with the specified uuid.
if description is empty, the existing description will be removed.
Parameters:
- connector (String), Connnector Id which is a UUID
- name (string) - Name of the service
- timezone (json object) - Should have a valid struc... | src/wiotp/sdk/api/dsc/connectors.py | def update(self, connectorId, name, description, timezone, enabled):
"""
Updates the connector with the specified uuid.
if description is empty, the existing description will be removed.
Parameters:
- connector (String), Connnector Id which is a UUID
- name (strin... | def update(self, connectorId, name, description, timezone, enabled):
"""
Updates the connector with the specified uuid.
if description is empty, the existing description will be removed.
Parameters:
- connector (String), Connnector Id which is a UUID
- name (strin... | [
"Updates",
"the",
"connector",
"with",
"the",
"specified",
"uuid",
".",
"if",
"description",
"is",
"empty",
"the",
"existing",
"description",
"will",
"be",
"removed",
".",
"Parameters",
":",
"-",
"connector",
"(",
"String",
")",
"Connnector",
"Id",
"which",
... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/api/dsc/connectors.py#L216-L242 | [
"def",
"update",
"(",
"self",
",",
"connectorId",
",",
"name",
",",
"description",
",",
"timezone",
",",
"enabled",
")",
":",
"url",
"=",
"\"api/v0002/historianconnectors/%s\"",
"%",
"(",
"connectorId",
")",
"connectorBody",
"=",
"{",
"}",
"connectorBody",
"["... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | ServiceBindings.find | Gets the list of services that the Watson IoT Platform can connect to.
The list can include a mixture of services that are either bound or unbound.
Parameters:
- nameFilter(string) - Filter the results by the specified name
- typeFilter(string) - Filter the res... | src/wiotp/sdk/api/services/__init__.py | def find(self, nameFilter=None, typeFilter=None, bindingModeFilter=None, boundFilter=None):
"""
Gets the list of services that the Watson IoT Platform can connect to.
The list can include a mixture of services that are either bound or unbound.
Parameters:
-... | def find(self, nameFilter=None, typeFilter=None, bindingModeFilter=None, boundFilter=None):
"""
Gets the list of services that the Watson IoT Platform can connect to.
The list can include a mixture of services that are either bound or unbound.
Parameters:
-... | [
"Gets",
"the",
"list",
"of",
"services",
"that",
"the",
"Watson",
"IoT",
"Platform",
"can",
"connect",
"to",
".",
"The",
"list",
"can",
"include",
"a",
"mixture",
"of",
"services",
"that",
"are",
"either",
"bound",
"or",
"unbound",
".",
"Parameters",
":",
... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/api/services/__init__.py#L207-L232 | [
"def",
"find",
"(",
"self",
",",
"nameFilter",
"=",
"None",
",",
"typeFilter",
"=",
"None",
",",
"bindingModeFilter",
"=",
"None",
",",
"boundFilter",
"=",
"None",
")",
":",
"queryParms",
"=",
"{",
"}",
"if",
"nameFilter",
":",
"queryParms",
"[",
"\"name... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | ServiceBindings.create | Create a new external service.
The service must include all of the details required to connect
and authenticate to the external service in the credentials property.
Parameters:
- serviceName (string) - Name of the service
- serviceType (string) - must be either eventst... | src/wiotp/sdk/api/services/__init__.py | def create(self, serviceBinding):
"""
Create a new external service.
The service must include all of the details required to connect
and authenticate to the external service in the credentials property.
Parameters:
- serviceName (string) - Name of the service
... | def create(self, serviceBinding):
"""
Create a new external service.
The service must include all of the details required to connect
and authenticate to the external service in the credentials property.
Parameters:
- serviceName (string) - Name of the service
... | [
"Create",
"a",
"new",
"external",
"service",
".",
"The",
"service",
"must",
"include",
"all",
"of",
"the",
"details",
"required",
"to",
"connect",
"and",
"authenticate",
"to",
"the",
"external",
"service",
"in",
"the",
"credentials",
"property",
".",
"Paramete... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/api/services/__init__.py#L234-L260 | [
"def",
"create",
"(",
"self",
",",
"serviceBinding",
")",
":",
"if",
"not",
"isinstance",
"(",
"serviceBinding",
",",
"ServiceBindingCreateRequest",
")",
":",
"if",
"serviceBinding",
"[",
"\"type\"",
"]",
"==",
"\"cloudant\"",
":",
"serviceBinding",
"=",
"Clouda... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | ServiceBindings.update | Updates the service with the specified id.
if description is empty, the existing description will be removed.
Parameters:
- serviceId (String), Service Id which is a UUID
- serviceName (string), name of service
- credentials (json), json object of credentials
... | src/wiotp/sdk/api/services/__init__.py | def update(self, serviceId, serviceName, credentials, description):
"""
Updates the service with the specified id.
if description is empty, the existing description will be removed.
Parameters:
- serviceId (String), Service Id which is a UUID
- serviceName (string... | def update(self, serviceId, serviceName, credentials, description):
"""
Updates the service with the specified id.
if description is empty, the existing description will be removed.
Parameters:
- serviceId (String), Service Id which is a UUID
- serviceName (string... | [
"Updates",
"the",
"service",
"with",
"the",
"specified",
"id",
".",
"if",
"description",
"is",
"empty",
"the",
"existing",
"description",
"will",
"be",
"removed",
".",
"Parameters",
":",
"-",
"serviceId",
"(",
"String",
")",
"Service",
"Id",
"which",
"is",
... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/api/services/__init__.py#L262-L286 | [
"def",
"update",
"(",
"self",
",",
"serviceId",
",",
"serviceName",
",",
"credentials",
",",
"description",
")",
":",
"url",
"=",
"\"api/v0002/s2s/services/%s\"",
"%",
"(",
"serviceId",
")",
"serviceBody",
"=",
"{",
"}",
"serviceBody",
"[",
"\"name\"",
"]",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | DeviceTypes.create | Register one or more new device types, each request can contain a maximum of 512KB. | src/wiotp/sdk/api/registry/types.py | def create(self, deviceType):
"""
Register one or more new device types, each request can contain a maximum of 512KB.
"""
r = self._apiClient.post("api/v0002/device/types", deviceType)
if r.status_code == 201:
return DeviceType(apiClient=self._apiClient, **r.json())... | def create(self, deviceType):
"""
Register one or more new device types, each request can contain a maximum of 512KB.
"""
r = self._apiClient.post("api/v0002/device/types", deviceType)
if r.status_code == 201:
return DeviceType(apiClient=self._apiClient, **r.json())... | [
"Register",
"one",
"or",
"more",
"new",
"device",
"types",
"each",
"request",
"can",
"contain",
"a",
"maximum",
"of",
"512KB",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/api/registry/types.py#L139-L149 | [
"def",
"create",
"(",
"self",
",",
"deviceType",
")",
":",
"r",
"=",
"self",
".",
"_apiClient",
".",
"post",
"(",
"\"api/v0002/device/types\"",
",",
"deviceType",
")",
"if",
"r",
".",
"status_code",
"==",
"201",
":",
"return",
"DeviceType",
"(",
"apiClient... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | DeviceClient.publishEvent | Publish an event to Watson IoT Platform.
# Parameters
event (string): Name of this event
msgFormat (string): Format of the data for this event
data (dict): Data for this event
qos (int): MQTT quality of service level to use (`0`, `1`, or `2`)
on_publish(function): A func... | src/wiotp/sdk/device/client.py | def publishEvent(self, event, msgFormat, data, qos=0, on_publish=None):
"""
Publish an event to Watson IoT Platform.
# Parameters
event (string): Name of this event
msgFormat (string): Format of the data for this event
data (dict): Data for this event
qos (int): ... | def publishEvent(self, event, msgFormat, data, qos=0, on_publish=None):
"""
Publish an event to Watson IoT Platform.
# Parameters
event (string): Name of this event
msgFormat (string): Format of the data for this event
data (dict): Data for this event
qos (int): ... | [
"Publish",
"an",
"event",
"to",
"Watson",
"IoT",
"Platform",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/device/client.py#L71-L91 | [
"def",
"publishEvent",
"(",
"self",
",",
"event",
",",
"msgFormat",
",",
"data",
",",
"qos",
"=",
"0",
",",
"on_publish",
"=",
"None",
")",
":",
"topic",
"=",
"\"iot-2/evt/{event}/fmt/{msg_format}\"",
".",
"format",
"(",
"event",
"=",
"event",
",",
"msg_fo... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | Status.serviceStatus | Retrieve the organization-specific status of each of the services offered by the IBM Watson IoT Platform.
In case of failure it throws APIException | src/wiotp/sdk/api/status/__init__.py | def serviceStatus(self):
"""
Retrieve the organization-specific status of each of the services offered by the IBM Watson IoT Platform.
In case of failure it throws APIException
"""
r = self._apiClient.get("api/v0002/service-status")
if r.status_code == 200:
... | def serviceStatus(self):
"""
Retrieve the organization-specific status of each of the services offered by the IBM Watson IoT Platform.
In case of failure it throws APIException
"""
r = self._apiClient.get("api/v0002/service-status")
if r.status_code == 200:
... | [
"Retrieve",
"the",
"organization",
"-",
"specific",
"status",
"of",
"each",
"of",
"the",
"services",
"offered",
"by",
"the",
"IBM",
"Watson",
"IoT",
"Platform",
".",
"In",
"case",
"of",
"failure",
"it",
"throws",
"APIException"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/api/status/__init__.py#L40-L51 | [
"def",
"serviceStatus",
"(",
"self",
")",
":",
"r",
"=",
"self",
".",
"_apiClient",
".",
"get",
"(",
"\"api/v0002/service-status\"",
")",
"if",
"r",
".",
"status_code",
"==",
"200",
":",
"return",
"ServiceStatus",
"(",
"*",
"*",
"r",
".",
"json",
"(",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | Devices.create | Register one or more new devices, each request can contain a maximum of 512KB.
The response body will contain the generated authentication tokens for all devices.
You must make sure to record these tokens when processing the response.
We are not able to retrieve lost authentication tokens
... | src/wiotp/sdk/api/registry/devices.py | def create(self, devices):
"""
Register one or more new devices, each request can contain a maximum of 512KB.
The response body will contain the generated authentication tokens for all devices.
You must make sure to record these tokens when processing the response.
We are not abl... | def create(self, devices):
"""
Register one or more new devices, each request can contain a maximum of 512KB.
The response body will contain the generated authentication tokens for all devices.
You must make sure to record these tokens when processing the response.
We are not abl... | [
"Register",
"one",
"or",
"more",
"new",
"devices",
"each",
"request",
"can",
"contain",
"a",
"maximum",
"of",
"512KB",
".",
"The",
"response",
"body",
"will",
"contain",
"the",
"generated",
"authentication",
"tokens",
"for",
"all",
"devices",
".",
"You",
"mu... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/api/registry/devices.py#L432-L462 | [
"def",
"create",
"(",
"self",
",",
"devices",
")",
":",
"if",
"not",
"isinstance",
"(",
"devices",
",",
"list",
")",
":",
"listOfDevices",
"=",
"[",
"devices",
"]",
"returnAsAList",
"=",
"False",
"else",
":",
"listOfDevices",
"=",
"devices",
"returnAsAList... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | Devices.update | Update an existing device | src/wiotp/sdk/api/registry/devices.py | def update(self, deviceUid, metadata=None, deviceInfo=None, status=None):
"""
Update an existing device
"""
if not isinstance(deviceUid, DeviceUid) and isinstance(deviceUid, dict):
deviceUid = DeviceUid(**deviceUid)
deviceUrl = "api/v0002/device/types/%s/devices/%s"... | def update(self, deviceUid, metadata=None, deviceInfo=None, status=None):
"""
Update an existing device
"""
if not isinstance(deviceUid, DeviceUid) and isinstance(deviceUid, dict):
deviceUid = DeviceUid(**deviceUid)
deviceUrl = "api/v0002/device/types/%s/devices/%s"... | [
"Update",
"an",
"existing",
"device"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/api/registry/devices.py#L464-L480 | [
"def",
"update",
"(",
"self",
",",
"deviceUid",
",",
"metadata",
"=",
"None",
",",
"deviceInfo",
"=",
"None",
",",
"status",
"=",
"None",
")",
":",
"if",
"not",
"isinstance",
"(",
"deviceUid",
",",
"DeviceUid",
")",
"and",
"isinstance",
"(",
"deviceUid",... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | Devices.delete | Delete one or more devices, each request can contain a maximum of 512Kb
It accepts accepts a list of devices (List of Dictionary of Devices)
In case of failure it throws APIException | src/wiotp/sdk/api/registry/devices.py | def delete(self, devices):
"""
Delete one or more devices, each request can contain a maximum of 512Kb
It accepts accepts a list of devices (List of Dictionary of Devices)
In case of failure it throws APIException
"""
if not isinstance(devices, list):
listOfDe... | def delete(self, devices):
"""
Delete one or more devices, each request can contain a maximum of 512Kb
It accepts accepts a list of devices (List of Dictionary of Devices)
In case of failure it throws APIException
"""
if not isinstance(devices, list):
listOfDe... | [
"Delete",
"one",
"or",
"more",
"devices",
"each",
"request",
"can",
"contain",
"a",
"maximum",
"of",
"512Kb",
"It",
"accepts",
"accepts",
"a",
"list",
"of",
"devices",
"(",
"List",
"of",
"Dictionary",
"of",
"Devices",
")",
"In",
"case",
"of",
"failure",
... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/api/registry/devices.py#L482-L498 | [
"def",
"delete",
"(",
"self",
",",
"devices",
")",
":",
"if",
"not",
"isinstance",
"(",
"devices",
",",
"list",
")",
":",
"listOfDevices",
"=",
"[",
"devices",
"]",
"else",
":",
"listOfDevices",
"=",
"devices",
"r",
"=",
"self",
".",
"_apiClient",
".",... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | ConnectionStatus.find | Iterate through all Connectors | src/wiotp/sdk/api/registry/connectionStatus.py | def find(self, status=None, connectedAfter=None):
"""
Iterate through all Connectors
"""
queryParms = {}
if status:
queryParms["status"] = status
if connectedAfter:
queryParms["connectedAfter"] = connectedAfter
return IterableClientStatusL... | def find(self, status=None, connectedAfter=None):
"""
Iterate through all Connectors
"""
queryParms = {}
if status:
queryParms["status"] = status
if connectedAfter:
queryParms["connectedAfter"] = connectedAfter
return IterableClientStatusL... | [
"Iterate",
"through",
"all",
"Connectors"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/api/registry/connectionStatus.py#L81-L91 | [
"def",
"find",
"(",
"self",
",",
"status",
"=",
"None",
",",
"connectedAfter",
"=",
"None",
")",
":",
"queryParms",
"=",
"{",
"}",
"if",
"status",
":",
"queryParms",
"[",
"\"status\"",
"]",
"=",
"status",
"if",
"connectedAfter",
":",
"queryParms",
"[",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | MgmtExtensions.list | List all device management extension packages | src/wiotp/sdk/api/mgmt/extensions.py | def list(self):
"""
List all device management extension packages
"""
url = "api/v0002/mgmt/custom/bundle"
r = self._apiClient.get(url)
if r.status_code == 200:
return r.json()
else:
raise ApiException(r) | def list(self):
"""
List all device management extension packages
"""
url = "api/v0002/mgmt/custom/bundle"
r = self._apiClient.get(url)
if r.status_code == 200:
return r.json()
else:
raise ApiException(r) | [
"List",
"all",
"device",
"management",
"extension",
"packages"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/api/mgmt/extensions.py#L25-L35 | [
"def",
"list",
"(",
"self",
")",
":",
"url",
"=",
"\"api/v0002/mgmt/custom/bundle\"",
"r",
"=",
"self",
".",
"_apiClient",
".",
"get",
"(",
"url",
")",
"if",
"r",
".",
"status_code",
"==",
"200",
":",
"return",
"r",
".",
"json",
"(",
")",
"else",
":"... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | MgmtExtensions.create | Create a new device management extension package
In case of failure it throws APIException | src/wiotp/sdk/api/mgmt/extensions.py | def create(self, dmeData):
"""
Create a new device management extension package
In case of failure it throws APIException
"""
url = "api/v0002/mgmt/custom/bundle"
r = self._apiClient.post(url, dmeData)
if r.status_code == 201:
return r.json()
... | def create(self, dmeData):
"""
Create a new device management extension package
In case of failure it throws APIException
"""
url = "api/v0002/mgmt/custom/bundle"
r = self._apiClient.post(url, dmeData)
if r.status_code == 201:
return r.json()
... | [
"Create",
"a",
"new",
"device",
"management",
"extension",
"package",
"In",
"case",
"of",
"failure",
"it",
"throws",
"APIException"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/api/mgmt/extensions.py#L37-L48 | [
"def",
"create",
"(",
"self",
",",
"dmeData",
")",
":",
"url",
"=",
"\"api/v0002/mgmt/custom/bundle\"",
"r",
"=",
"self",
".",
"_apiClient",
".",
"post",
"(",
"url",
",",
"dmeData",
")",
"if",
"r",
".",
"status_code",
"==",
"201",
":",
"return",
"r",
"... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | MgmtExtensions.delete | Delete a device management extension package
It accepts bundleId (string) as parameters
In case of failure it throws APIException | src/wiotp/sdk/api/mgmt/extensions.py | def delete(self, bundleId):
"""
Delete a device management extension package
It accepts bundleId (string) as parameters
In case of failure it throws APIException
"""
url = "api/v0002/mgmt/custom/bundle/%s" % (bundleId)
r = self._apiClient.delete(url)
if r... | def delete(self, bundleId):
"""
Delete a device management extension package
It accepts bundleId (string) as parameters
In case of failure it throws APIException
"""
url = "api/v0002/mgmt/custom/bundle/%s" % (bundleId)
r = self._apiClient.delete(url)
if r... | [
"Delete",
"a",
"device",
"management",
"extension",
"package",
"It",
"accepts",
"bundleId",
"(",
"string",
")",
"as",
"parameters",
"In",
"case",
"of",
"failure",
"it",
"throws",
"APIException"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/api/mgmt/extensions.py#L50-L62 | [
"def",
"delete",
"(",
"self",
",",
"bundleId",
")",
":",
"url",
"=",
"\"api/v0002/mgmt/custom/bundle/%s\"",
"%",
"(",
"bundleId",
")",
"r",
"=",
"self",
".",
"_apiClient",
".",
"delete",
"(",
"url",
")",
"if",
"r",
".",
"status_code",
"==",
"204",
":",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | MgmtExtensions.update | Update a device management extension package
It accepts bundleId (string) as parameters
In case of failure it throws APIException | src/wiotp/sdk/api/mgmt/extensions.py | def update(self, bundleId, dmeData):
"""
Update a device management extension package
It accepts bundleId (string) as parameters
In case of failure it throws APIException
"""
url = "api/v0002/mgmt/custom/bundle/%s" % (bundleId)
r = self._apiClient.put(url, dmeData... | def update(self, bundleId, dmeData):
"""
Update a device management extension package
It accepts bundleId (string) as parameters
In case of failure it throws APIException
"""
url = "api/v0002/mgmt/custom/bundle/%s" % (bundleId)
r = self._apiClient.put(url, dmeData... | [
"Update",
"a",
"device",
"management",
"extension",
"package",
"It",
"accepts",
"bundleId",
"(",
"string",
")",
"as",
"parameters",
"In",
"case",
"of",
"failure",
"it",
"throws",
"APIException"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/api/mgmt/extensions.py#L78-L90 | [
"def",
"update",
"(",
"self",
",",
"bundleId",
",",
"dmeData",
")",
":",
"url",
"=",
"\"api/v0002/mgmt/custom/bundle/%s\"",
"%",
"(",
"bundleId",
")",
"r",
"=",
"self",
".",
"_apiClient",
".",
"put",
"(",
"url",
",",
"dmeData",
")",
"if",
"r",
".",
"st... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | registerThing | Registers a new thing.
It accepts thingTypeId (string), thingId (string), name (string), description (string), aggregatedObjects (JSON) and metadata (JSON) as parameters
In case of failure it throws APIException | tmp/src/things/things.py | def registerThing(self, thingTypeId, thingId, name = None, description = None, aggregatedObjects = None, metadata=None):
"""
Registers a new thing.
It accepts thingTypeId (string), thingId (string), name (string), description (string), aggregatedObjects (JSON) and metadata (JSON) as parameters
... | def registerThing(self, thingTypeId, thingId, name = None, description = None, aggregatedObjects = None, metadata=None):
"""
Registers a new thing.
It accepts thingTypeId (string), thingId (string), name (string), description (string), aggregatedObjects (JSON) and metadata (JSON) as parameters
... | [
"Registers",
"a",
"new",
"thing",
".",
"It",
"accepts",
"thingTypeId",
"(",
"string",
")",
"thingId",
"(",
"string",
")",
"name",
"(",
"string",
")",
"description",
"(",
"string",
")",
"aggregatedObjects",
"(",
"JSON",
")",
"and",
"metadata",
"(",
"JSON",
... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L74-L101 | [
"def",
"registerThing",
"(",
"self",
",",
"thingTypeId",
",",
"thingId",
",",
"name",
"=",
"None",
",",
"description",
"=",
"None",
",",
"aggregatedObjects",
"=",
"None",
",",
"metadata",
"=",
"None",
")",
":",
"thingsUrl",
"=",
"ApiClient",
".",
"thingsUr... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | getThing | Gets thing details.
It accepts thingTypeId (string), thingId (string)
In case of failure it throws APIException | tmp/src/things/things.py | def getThing(self, thingTypeId, thingId):
"""
Gets thing details.
It accepts thingTypeId (string), thingId (string)
In case of failure it throws APIException
"""
thingUrl = ApiClient.thingUrl % (self.host, thingTypeId, thingId)
r = requests.get(thingUrl, auth=sel... | def getThing(self, thingTypeId, thingId):
"""
Gets thing details.
It accepts thingTypeId (string), thingId (string)
In case of failure it throws APIException
"""
thingUrl = ApiClient.thingUrl % (self.host, thingTypeId, thingId)
r = requests.get(thingUrl, auth=sel... | [
"Gets",
"thing",
"details",
".",
"It",
"accepts",
"thingTypeId",
"(",
"string",
")",
"thingId",
"(",
"string",
")",
"In",
"case",
"of",
"failure",
"it",
"throws",
"APIException"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L103-L128 | [
"def",
"getThing",
"(",
"self",
",",
"thingTypeId",
",",
"thingId",
")",
":",
"thingUrl",
"=",
"ApiClient",
".",
"thingUrl",
"%",
"(",
"self",
".",
"host",
",",
"thingTypeId",
",",
"thingId",
")",
"r",
"=",
"requests",
".",
"get",
"(",
"thingUrl",
",",... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | getThingsForType | Gets details for multiple things of a type
It accepts thingTypeId (string) and parameters
In case of failure it throws APIException | tmp/src/things/things.py | def getThingsForType(self, thingTypeId, parameters = None):
"""
Gets details for multiple things of a type
It accepts thingTypeId (string) and parameters
In case of failure it throws APIException
"""
thingsUrl = ApiClient.thingsUrl % (self.host, thingTypeId)
r = ... | def getThingsForType(self, thingTypeId, parameters = None):
"""
Gets details for multiple things of a type
It accepts thingTypeId (string) and parameters
In case of failure it throws APIException
"""
thingsUrl = ApiClient.thingsUrl % (self.host, thingTypeId)
r = ... | [
"Gets",
"details",
"for",
"multiple",
"things",
"of",
"a",
"type",
"It",
"accepts",
"thingTypeId",
"(",
"string",
")",
"and",
"parameters",
"In",
"case",
"of",
"failure",
"it",
"throws",
"APIException"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L130-L152 | [
"def",
"getThingsForType",
"(",
"self",
",",
"thingTypeId",
",",
"parameters",
"=",
"None",
")",
":",
"thingsUrl",
"=",
"ApiClient",
".",
"thingsUrl",
"%",
"(",
"self",
".",
"host",
",",
"thingTypeId",
")",
"r",
"=",
"requests",
".",
"get",
"(",
"thingsU... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | removeThing | Delete an existing thing.
It accepts thingTypeId (string) and thingId (string) as parameters
In case of failure it throws APIException | tmp/src/things/things.py | def removeThing(self, thingTypeId, thingId):
"""
Delete an existing thing.
It accepts thingTypeId (string) and thingId (string) as parameters
In case of failure it throws APIException
"""
thingUrl = ApiClient.thingUrl % (self.host, thingTypeId, thingId)
r = reque... | def removeThing(self, thingTypeId, thingId):
"""
Delete an existing thing.
It accepts thingTypeId (string) and thingId (string) as parameters
In case of failure it throws APIException
"""
thingUrl = ApiClient.thingUrl % (self.host, thingTypeId, thingId)
r = reque... | [
"Delete",
"an",
"existing",
"thing",
".",
"It",
"accepts",
"thingTypeId",
"(",
"string",
")",
"and",
"thingId",
"(",
"string",
")",
"as",
"parameters",
"In",
"case",
"of",
"failure",
"it",
"throws",
"APIException"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L154-L178 | [
"def",
"removeThing",
"(",
"self",
",",
"thingTypeId",
",",
"thingId",
")",
":",
"thingUrl",
"=",
"ApiClient",
".",
"thingUrl",
"%",
"(",
"self",
".",
"host",
",",
"thingTypeId",
",",
"thingId",
")",
"r",
"=",
"requests",
".",
"delete",
"(",
"thingUrl",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | addDraftThingType | Creates a thing type.
It accepts thingTypeId (string), name (string), description (string), schemaId(string) and metadata(dict) as parameter
In case of failure it throws APIException | tmp/src/things/things.py | def addDraftThingType(self, thingTypeId, name = None, description = None, schemaId = None, metadata = None):
"""
Creates a thing type.
It accepts thingTypeId (string), name (string), description (string), schemaId(string) and metadata(dict) as parameter
In case of failure it throws APIEx... | def addDraftThingType(self, thingTypeId, name = None, description = None, schemaId = None, metadata = None):
"""
Creates a thing type.
It accepts thingTypeId (string), name (string), description (string), schemaId(string) and metadata(dict) as parameter
In case of failure it throws APIEx... | [
"Creates",
"a",
"thing",
"type",
".",
"It",
"accepts",
"thingTypeId",
"(",
"string",
")",
"name",
"(",
"string",
")",
"description",
"(",
"string",
")",
"schemaId",
"(",
"string",
")",
"and",
"metadata",
"(",
"dict",
")",
"as",
"parameter",
"In",
"case",... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L221-L246 | [
"def",
"addDraftThingType",
"(",
"self",
",",
"thingTypeId",
",",
"name",
"=",
"None",
",",
"description",
"=",
"None",
",",
"schemaId",
"=",
"None",
",",
"metadata",
"=",
"None",
")",
":",
"draftThingTypesUrl",
"=",
"ApiClient",
".",
"draftThingTypesUrl",
"... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | updateDraftThingType | Updates a thing type.
It accepts thingTypeId (string), name (string), description (string), schemaId (string) and metadata(JSON) as the parameters
In case of failure it throws APIException | tmp/src/things/things.py | def updateDraftThingType(self, thingTypeId, name, description, schemaId, metadata = None):
"""
Updates a thing type.
It accepts thingTypeId (string), name (string), description (string), schemaId (string) and metadata(JSON) as the parameters
In case of failure it throws APIException
... | def updateDraftThingType(self, thingTypeId, name, description, schemaId, metadata = None):
"""
Updates a thing type.
It accepts thingTypeId (string), name (string), description (string), schemaId (string) and metadata(JSON) as the parameters
In case of failure it throws APIException
... | [
"Updates",
"a",
"thing",
"type",
".",
"It",
"accepts",
"thingTypeId",
"(",
"string",
")",
"name",
"(",
"string",
")",
"description",
"(",
"string",
")",
"schemaId",
"(",
"string",
")",
"and",
"metadata",
"(",
"JSON",
")",
"as",
"the",
"parameters",
"In",... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L248-L272 | [
"def",
"updateDraftThingType",
"(",
"self",
",",
"thingTypeId",
",",
"name",
",",
"description",
",",
"schemaId",
",",
"metadata",
"=",
"None",
")",
":",
"draftThingTypeUrl",
"=",
"ApiClient",
".",
"draftThingTypeUrl",
"%",
"(",
"self",
".",
"host",
",",
"th... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | getDraftThingTypes | Retrieves all existing draft thing types.
It accepts accepts an optional query parameters (Dictionary)
In case of failure it throws APIException | tmp/src/things/things.py | def getDraftThingTypes(self, parameters = None):
"""
Retrieves all existing draft thing types.
It accepts accepts an optional query parameters (Dictionary)
In case of failure it throws APIException
"""
draftThingTypesUrl = ApiClient.draftThingTypesUrl % (self.host)
... | def getDraftThingTypes(self, parameters = None):
"""
Retrieves all existing draft thing types.
It accepts accepts an optional query parameters (Dictionary)
In case of failure it throws APIException
"""
draftThingTypesUrl = ApiClient.draftThingTypesUrl % (self.host)
... | [
"Retrieves",
"all",
"existing",
"draft",
"thing",
"types",
".",
"It",
"accepts",
"accepts",
"an",
"optional",
"query",
"parameters",
"(",
"Dictionary",
")",
"In",
"case",
"of",
"failure",
"it",
"throws",
"APIException"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L274-L294 | [
"def",
"getDraftThingTypes",
"(",
"self",
",",
"parameters",
"=",
"None",
")",
":",
"draftThingTypesUrl",
"=",
"ApiClient",
".",
"draftThingTypesUrl",
"%",
"(",
"self",
".",
"host",
")",
"r",
"=",
"requests",
".",
"get",
"(",
"draftThingTypesUrl",
",",
"auth... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | getDraftThingType | Retrieves all existing draft thing types.
It accepts accepts an optional query parameters (Dictionary)
In case of failure it throws APIException | tmp/src/things/things.py | def getDraftThingType(self, thingTypeId, parameters = None):
"""
Retrieves all existing draft thing types.
It accepts accepts an optional query parameters (Dictionary)
In case of failure it throws APIException
"""
draftThingTypeUrl = ApiClient.draftThingTypeUrl % (self.ho... | def getDraftThingType(self, thingTypeId, parameters = None):
"""
Retrieves all existing draft thing types.
It accepts accepts an optional query parameters (Dictionary)
In case of failure it throws APIException
"""
draftThingTypeUrl = ApiClient.draftThingTypeUrl % (self.ho... | [
"Retrieves",
"all",
"existing",
"draft",
"thing",
"types",
".",
"It",
"accepts",
"accepts",
"an",
"optional",
"query",
"parameters",
"(",
"Dictionary",
")",
"In",
"case",
"of",
"failure",
"it",
"throws",
"APIException"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L296-L320 | [
"def",
"getDraftThingType",
"(",
"self",
",",
"thingTypeId",
",",
"parameters",
"=",
"None",
")",
":",
"draftThingTypeUrl",
"=",
"ApiClient",
".",
"draftThingTypeUrl",
"%",
"(",
"self",
".",
"host",
",",
"thingTypeId",
")",
"r",
"=",
"requests",
".",
"get",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | deleteDraftThingType | Deletes a Thing type.
It accepts thingTypeId (string) as the parameter
In case of failure it throws APIException | tmp/src/things/things.py | def deleteDraftThingType(self, thingTypeId):
"""
Deletes a Thing type.
It accepts thingTypeId (string) as the parameter
In case of failure it throws APIException
"""
draftThingTypeUrl = ApiClient.draftThingTypeUrl % (self.host, thingTypeId)
r = requests.delete(dr... | def deleteDraftThingType(self, thingTypeId):
"""
Deletes a Thing type.
It accepts thingTypeId (string) as the parameter
In case of failure it throws APIException
"""
draftThingTypeUrl = ApiClient.draftThingTypeUrl % (self.host, thingTypeId)
r = requests.delete(dr... | [
"Deletes",
"a",
"Thing",
"type",
".",
"It",
"accepts",
"thingTypeId",
"(",
"string",
")",
"as",
"the",
"parameter",
"In",
"case",
"of",
"failure",
"it",
"throws",
"APIException"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L322-L346 | [
"def",
"deleteDraftThingType",
"(",
"self",
",",
"thingTypeId",
")",
":",
"draftThingTypeUrl",
"=",
"ApiClient",
".",
"draftThingTypeUrl",
"%",
"(",
"self",
".",
"host",
",",
"thingTypeId",
")",
"r",
"=",
"requests",
".",
"delete",
"(",
"draftThingTypeUrl",
",... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | createSchema | Create a schema for the org.
Returns: schemaId (string), response (object).
Throws APIException on failure | tmp/src/things/things.py | def createSchema(self, schemaName, schemaFileName, schemaContents, description=None):
"""
Create a schema for the org.
Returns: schemaId (string), response (object).
Throws APIException on failure
"""
req = ApiClient.allSchemasUrl % (self.host, "/draft")
fields={
... | def createSchema(self, schemaName, schemaFileName, schemaContents, description=None):
"""
Create a schema for the org.
Returns: schemaId (string), response (object).
Throws APIException on failure
"""
req = ApiClient.allSchemasUrl % (self.host, "/draft")
fields={
... | [
"Create",
"a",
"schema",
"for",
"the",
"org",
".",
"Returns",
":",
"schemaId",
"(",
"string",
")",
"response",
"(",
"object",
")",
".",
"Throws",
"APIException",
"on",
"failure"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L446-L468 | [
"def",
"createSchema",
"(",
"self",
",",
"schemaName",
",",
"schemaFileName",
",",
"schemaContents",
",",
"description",
"=",
"None",
")",
":",
"req",
"=",
"ApiClient",
".",
"allSchemasUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
")",
"fields",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | deleteSchema | Delete a schema. Parameter: schemaId (string). Throws APIException on failure. | tmp/src/things/things.py | def deleteSchema(self, schemaId):
"""
Delete a schema. Parameter: schemaId (string). Throws APIException on failure.
"""
req = ApiClient.oneSchemaUrl % (self.host, "/draft", schemaId)
resp = requests.delete(req, auth=self.credentials, verify=self.verify)
if resp.status_c... | def deleteSchema(self, schemaId):
"""
Delete a schema. Parameter: schemaId (string). Throws APIException on failure.
"""
req = ApiClient.oneSchemaUrl % (self.host, "/draft", schemaId)
resp = requests.delete(req, auth=self.credentials, verify=self.verify)
if resp.status_c... | [
"Delete",
"a",
"schema",
".",
"Parameter",
":",
"schemaId",
"(",
"string",
")",
".",
"Throws",
"APIException",
"on",
"failure",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L470-L480 | [
"def",
"deleteSchema",
"(",
"self",
",",
"schemaId",
")",
":",
"req",
"=",
"ApiClient",
".",
"oneSchemaUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"schemaId",
")",
"resp",
"=",
"requests",
".",
"delete",
"(",
"req",
",",
"auth",
"=",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | updateSchema | Update a schema. Throws APIException on failure. | tmp/src/things/things.py | def updateSchema(self, schemaId, schemaDefinition):
"""
Update a schema. Throws APIException on failure.
"""
req = ApiClient.oneSchemaUrl % (self.host, "/draft", schemaId)
body = {"schemaDefinition": schemaDefinition}
resp = requests.put(req, auth=self.credentials, header... | def updateSchema(self, schemaId, schemaDefinition):
"""
Update a schema. Throws APIException on failure.
"""
req = ApiClient.oneSchemaUrl % (self.host, "/draft", schemaId)
body = {"schemaDefinition": schemaDefinition}
resp = requests.put(req, auth=self.credentials, header... | [
"Update",
"a",
"schema",
".",
"Throws",
"APIException",
"on",
"failure",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L482-L494 | [
"def",
"updateSchema",
"(",
"self",
",",
"schemaId",
",",
"schemaDefinition",
")",
":",
"req",
"=",
"ApiClient",
".",
"oneSchemaUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"schemaId",
")",
"body",
"=",
"{",
"\"schemaDefinition\"",
":",
"sc... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | getSchemaContent | Get the content for a schema. Parameters: schemaId (string), draft (boolean). Throws APIException on failure. | tmp/src/things/things.py | def getSchemaContent(self, schemaId, draft=False):
"""
Get the content for a schema. Parameters: schemaId (string), draft (boolean). Throws APIException on failure.
"""
if draft:
req = ApiClient.oneSchemaContentUrl % (self.host, "/draft", schemaId)
else:
... | def getSchemaContent(self, schemaId, draft=False):
"""
Get the content for a schema. Parameters: schemaId (string), draft (boolean). Throws APIException on failure.
"""
if draft:
req = ApiClient.oneSchemaContentUrl % (self.host, "/draft", schemaId)
else:
... | [
"Get",
"the",
"content",
"for",
"a",
"schema",
".",
"Parameters",
":",
"schemaId",
"(",
"string",
")",
"draft",
"(",
"boolean",
")",
".",
"Throws",
"APIException",
"on",
"failure",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L496-L509 | [
"def",
"getSchemaContent",
"(",
"self",
",",
"schemaId",
",",
"draft",
"=",
"False",
")",
":",
"if",
"draft",
":",
"req",
"=",
"ApiClient",
".",
"oneSchemaContentUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"schemaId",
")",
"else",
":",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | updateSchemaContent | Updates the content for a schema. Parameters: schemaId (string). Throws APIException on failure. | tmp/src/things/things.py | def updateSchemaContent(self, schemaId, schemaFile):
"""
Updates the content for a schema. Parameters: schemaId (string). Throws APIException on failure.
"""
req = ApiClient.oneSchemaContentUrl % (self.host, "/draft", schemaId)
body = {"schemaFile": schemaFile}
resp = re... | def updateSchemaContent(self, schemaId, schemaFile):
"""
Updates the content for a schema. Parameters: schemaId (string). Throws APIException on failure.
"""
req = ApiClient.oneSchemaContentUrl % (self.host, "/draft", schemaId)
body = {"schemaFile": schemaFile}
resp = re... | [
"Updates",
"the",
"content",
"for",
"a",
"schema",
".",
"Parameters",
":",
"schemaId",
"(",
"string",
")",
".",
"Throws",
"APIException",
"on",
"failure",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L511-L523 | [
"def",
"updateSchemaContent",
"(",
"self",
",",
"schemaId",
",",
"schemaFile",
")",
":",
"req",
"=",
"ApiClient",
".",
"oneSchemaContentUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"schemaId",
")",
"body",
"=",
"{",
"\"schemaFile\"",
":",
"... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | updateEventType | Updates an event type.
Parameters: eventTypeId (string), name (string), schemaId (string), description (string, optional).
Throws APIException on failure. | tmp/src/things/things.py | def updateEventType(self, eventTypeId, name, schemaId, description=None):
"""
Updates an event type.
Parameters: eventTypeId (string), name (string), schemaId (string), description (string, optional).
Throws APIException on failure.
"""
req = ApiClient.oneEventTypesUrl % ... | def updateEventType(self, eventTypeId, name, schemaId, description=None):
"""
Updates an event type.
Parameters: eventTypeId (string), name (string), schemaId (string), description (string, optional).
Throws APIException on failure.
"""
req = ApiClient.oneEventTypesUrl % ... | [
"Updates",
"an",
"event",
"type",
".",
"Parameters",
":",
"eventTypeId",
"(",
"string",
")",
"name",
"(",
"string",
")",
"schemaId",
"(",
"string",
")",
"description",
"(",
"string",
"optional",
")",
".",
"Throws",
"APIException",
"on",
"failure",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L575-L591 | [
"def",
"updateEventType",
"(",
"self",
",",
"eventTypeId",
",",
"name",
",",
"schemaId",
",",
"description",
"=",
"None",
")",
":",
"req",
"=",
"ApiClient",
".",
"oneEventTypesUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"eventTypeId",
")",... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | deleteEventType | Deletes an event type. Parameters: eventTypeId (string). Throws APIException on failure. | tmp/src/things/things.py | def deleteEventType(self, eventTypeId):
"""
Deletes an event type. Parameters: eventTypeId (string). Throws APIException on failure.
"""
req = ApiClient.oneEventTypeUrl % (self.host, "/draft", eventTypeId)
resp = requests.delete(req, auth=self.credentials, verify=self.verify)
... | def deleteEventType(self, eventTypeId):
"""
Deletes an event type. Parameters: eventTypeId (string). Throws APIException on failure.
"""
req = ApiClient.oneEventTypeUrl % (self.host, "/draft", eventTypeId)
resp = requests.delete(req, auth=self.credentials, verify=self.verify)
... | [
"Deletes",
"an",
"event",
"type",
".",
"Parameters",
":",
"eventTypeId",
"(",
"string",
")",
".",
"Throws",
"APIException",
"on",
"failure",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L593-L603 | [
"def",
"deleteEventType",
"(",
"self",
",",
"eventTypeId",
")",
":",
"req",
"=",
"ApiClient",
".",
"oneEventTypeUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"eventTypeId",
")",
"resp",
"=",
"requests",
".",
"delete",
"(",
"req",
",",
"aut... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | getEventType | Gets an event type. Parameters: eventTypeId (string), draft (boolean). Throws APIException on failure. | tmp/src/things/things.py | def getEventType(self, eventTypeId, draft=False):
"""
Gets an event type. Parameters: eventTypeId (string), draft (boolean). Throws APIException on failure.
"""
if draft:
req = ApiClient.oneEventTypeUrl % (self.host, "/draft", eventTypeId)
else:
req = Ap... | def getEventType(self, eventTypeId, draft=False):
"""
Gets an event type. Parameters: eventTypeId (string), draft (boolean). Throws APIException on failure.
"""
if draft:
req = ApiClient.oneEventTypeUrl % (self.host, "/draft", eventTypeId)
else:
req = Ap... | [
"Gets",
"an",
"event",
"type",
".",
"Parameters",
":",
"eventTypeId",
"(",
"string",
")",
"draft",
"(",
"boolean",
")",
".",
"Throws",
"APIException",
"on",
"failure",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L605-L618 | [
"def",
"getEventType",
"(",
"self",
",",
"eventTypeId",
",",
"draft",
"=",
"False",
")",
":",
"if",
"draft",
":",
"req",
"=",
"ApiClient",
".",
"oneEventTypeUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"eventTypeId",
")",
"else",
":",
"... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | createPhysicalInterface | Create a physical interface.
Parameters:
- name (string)
- description (string, optional)
Returns: physical interface id, response.
Throws APIException on failure. | tmp/src/things/things.py | def createPhysicalInterface(self, name, description=None):
"""
Create a physical interface.
Parameters:
- name (string)
- description (string, optional)
Returns: physical interface id, response.
Throws APIException on failure.
"""
req = ApiClie... | def createPhysicalInterface(self, name, description=None):
"""
Create a physical interface.
Parameters:
- name (string)
- description (string, optional)
Returns: physical interface id, response.
Throws APIException on failure.
"""
req = ApiClie... | [
"Create",
"a",
"physical",
"interface",
".",
"Parameters",
":",
"-",
"name",
"(",
"string",
")",
"-",
"description",
"(",
"string",
"optional",
")",
"Returns",
":",
"physical",
"interface",
"id",
"response",
".",
"Throws",
"APIException",
"on",
"failure",
".... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L647-L666 | [
"def",
"createPhysicalInterface",
"(",
"self",
",",
"name",
",",
"description",
"=",
"None",
")",
":",
"req",
"=",
"ApiClient",
".",
"allPhysicalInterfacesUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
")",
"body",
"=",
"{",
"\"name\"",
":",
"name... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | updatePhysicalInterface | Update a physical interface.
Parameters:
- physicalInterfaceId (string)
- name (string)
- schemaId (string)
- description (string, optional)
Throws APIException on failure. | tmp/src/things/things.py | def updatePhysicalInterface(self, physicalInterfaceId, name, schemaId, description=None):
"""
Update a physical interface.
Parameters:
- physicalInterfaceId (string)
- name (string)
- schemaId (string)
- description (string, optional)
Throws APIExc... | def updatePhysicalInterface(self, physicalInterfaceId, name, schemaId, description=None):
"""
Update a physical interface.
Parameters:
- physicalInterfaceId (string)
- name (string)
- schemaId (string)
- description (string, optional)
Throws APIExc... | [
"Update",
"a",
"physical",
"interface",
".",
"Parameters",
":",
"-",
"physicalInterfaceId",
"(",
"string",
")",
"-",
"name",
"(",
"string",
")",
"-",
"schemaId",
"(",
"string",
")",
"-",
"description",
"(",
"string",
"optional",
")",
"Throws",
"APIException"... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L668-L688 | [
"def",
"updatePhysicalInterface",
"(",
"self",
",",
"physicalInterfaceId",
",",
"name",
",",
"schemaId",
",",
"description",
"=",
"None",
")",
":",
"req",
"=",
"ApiClient",
".",
"onePhysicalInterfacesUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | deletePhysicalInterface | Delete a physical interface.
Parameters: physicalInterfaceId (string).
Throws APIException on failure. | tmp/src/things/things.py | def deletePhysicalInterface(self, physicalInterfaceId):
"""
Delete a physical interface.
Parameters: physicalInterfaceId (string).
Throws APIException on failure.
"""
req = ApiClient.onePhysicalInterfaceUrl % (self.host, "/draft", physicalInterfaceId)
resp = reque... | def deletePhysicalInterface(self, physicalInterfaceId):
"""
Delete a physical interface.
Parameters: physicalInterfaceId (string).
Throws APIException on failure.
"""
req = ApiClient.onePhysicalInterfaceUrl % (self.host, "/draft", physicalInterfaceId)
resp = reque... | [
"Delete",
"a",
"physical",
"interface",
".",
"Parameters",
":",
"physicalInterfaceId",
"(",
"string",
")",
".",
"Throws",
"APIException",
"on",
"failure",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L690-L702 | [
"def",
"deletePhysicalInterface",
"(",
"self",
",",
"physicalInterfaceId",
")",
":",
"req",
"=",
"ApiClient",
".",
"onePhysicalInterfaceUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"physicalInterfaceId",
")",
"resp",
"=",
"requests",
".",
"delete... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | getPhysicalInterface | Get a physical interface.
Parameters:
- physicalInterfaceId (string)
- draft (boolean)
Throws APIException on failure. | tmp/src/things/things.py | def getPhysicalInterface(self, physicalInterfaceId, draft=False):
"""
Get a physical interface.
Parameters:
- physicalInterfaceId (string)
- draft (boolean)
Throws APIException on failure.
"""
if draft:
req = ApiClient.onePhysicalInterfaceU... | def getPhysicalInterface(self, physicalInterfaceId, draft=False):
"""
Get a physical interface.
Parameters:
- physicalInterfaceId (string)
- draft (boolean)
Throws APIException on failure.
"""
if draft:
req = ApiClient.onePhysicalInterfaceU... | [
"Get",
"a",
"physical",
"interface",
".",
"Parameters",
":",
"-",
"physicalInterfaceId",
"(",
"string",
")",
"-",
"draft",
"(",
"boolean",
")",
"Throws",
"APIException",
"on",
"failure",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L704-L722 | [
"def",
"getPhysicalInterface",
"(",
"self",
",",
"physicalInterfaceId",
",",
"draft",
"=",
"False",
")",
":",
"if",
"draft",
":",
"req",
"=",
"ApiClient",
".",
"onePhysicalInterfaceUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"physicalInterface... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | createEvent | Create an event mapping for a physical interface.
Parameters:
physicalInterfaceId (string) - value returned by the platform when creating the physical interface
eventTypeId (string) - value returned by the platform when creating the event type
eventId (string) - matches the event i... | tmp/src/things/things.py | def createEvent(self, physicalInterfaceId, eventTypeId, eventId):
"""
Create an event mapping for a physical interface.
Parameters:
physicalInterfaceId (string) - value returned by the platform when creating the physical interface
eventTypeId (string) - value returned by the ... | def createEvent(self, physicalInterfaceId, eventTypeId, eventId):
"""
Create an event mapping for a physical interface.
Parameters:
physicalInterfaceId (string) - value returned by the platform when creating the physical interface
eventTypeId (string) - value returned by the ... | [
"Create",
"an",
"event",
"mapping",
"for",
"a",
"physical",
"interface",
".",
"Parameters",
":",
"physicalInterfaceId",
"(",
"string",
")",
"-",
"value",
"returned",
"by",
"the",
"platform",
"when",
"creating",
"the",
"physical",
"interface",
"eventTypeId",
"(",... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L751-L768 | [
"def",
"createEvent",
"(",
"self",
",",
"physicalInterfaceId",
",",
"eventTypeId",
",",
"eventId",
")",
":",
"req",
"=",
"ApiClient",
".",
"allEventsUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"physicalInterfaceId",
")",
"body",
"=",
"{",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | deleteEvent | Delete an event mapping from a physical interface.
Parameters: physicalInterfaceId (string), eventId (string).
Throws APIException on failure. | tmp/src/things/things.py | def deleteEvent(self, physicalInterfaceId, eventId):
"""
Delete an event mapping from a physical interface.
Parameters: physicalInterfaceId (string), eventId (string).
Throws APIException on failure.
"""
req = ApiClient.oneEventUrl % (self.host, "/draft", physicalInterfac... | def deleteEvent(self, physicalInterfaceId, eventId):
"""
Delete an event mapping from a physical interface.
Parameters: physicalInterfaceId (string), eventId (string).
Throws APIException on failure.
"""
req = ApiClient.oneEventUrl % (self.host, "/draft", physicalInterfac... | [
"Delete",
"an",
"event",
"mapping",
"from",
"a",
"physical",
"interface",
".",
"Parameters",
":",
"physicalInterfaceId",
"(",
"string",
")",
"eventId",
"(",
"string",
")",
".",
"Throws",
"APIException",
"on",
"failure",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L770-L782 | [
"def",
"deleteEvent",
"(",
"self",
",",
"physicalInterfaceId",
",",
"eventId",
")",
":",
"req",
"=",
"ApiClient",
".",
"oneEventUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"physicalInterfaceId",
",",
"eventId",
")",
"resp",
"=",
"requests",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | getLogicalInterfaces | Get all logical interfaces for an org.
Parameters: draft (boolean).
Returns:
- list of ids
- response object
Throws APIException on failure. | tmp/src/things/things.py | def getLogicalInterfaces(self, draft=False, name=None, schemaId=None):
"""
Get all logical interfaces for an org.
Parameters: draft (boolean).
Returns:
- list of ids
- response object
Throws APIException on failure.
"""
if draft:
... | def getLogicalInterfaces(self, draft=False, name=None, schemaId=None):
"""
Get all logical interfaces for an org.
Parameters: draft (boolean).
Returns:
- list of ids
- response object
Throws APIException on failure.
"""
if draft:
... | [
"Get",
"all",
"logical",
"interfaces",
"for",
"an",
"org",
".",
"Parameters",
":",
"draft",
"(",
"boolean",
")",
".",
"Returns",
":",
"-",
"list",
"of",
"ids",
"-",
"response",
"object",
"Throws",
"APIException",
"on",
"failure",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L791-L819 | [
"def",
"getLogicalInterfaces",
"(",
"self",
",",
"draft",
"=",
"False",
",",
"name",
"=",
"None",
",",
"schemaId",
"=",
"None",
")",
":",
"if",
"draft",
":",
"req",
"=",
"ApiClient",
".",
"allLogicalInterfacesUrl",
"%",
"(",
"self",
".",
"host",
",",
"... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | updateLogicalInterface | Updates a logical interface.
Parameters: logicalInterfaceId (string), name (string), schemaId (string), description (string, optional).
Throws APIException on failure. | tmp/src/things/things.py | def updateLogicalInterface(self, logicalInterfaceId, name, schemaId, description=None):
"""
Updates a logical interface.
Parameters: logicalInterfaceId (string), name (string), schemaId (string), description (string, optional).
Throws APIException on failure.
"""
req = Ap... | def updateLogicalInterface(self, logicalInterfaceId, name, schemaId, description=None):
"""
Updates a logical interface.
Parameters: logicalInterfaceId (string), name (string), schemaId (string), description (string, optional).
Throws APIException on failure.
"""
req = Ap... | [
"Updates",
"a",
"logical",
"interface",
".",
"Parameters",
":",
"logicalInterfaceId",
"(",
"string",
")",
"name",
"(",
"string",
")",
"schemaId",
"(",
"string",
")",
"description",
"(",
"string",
"optional",
")",
".",
"Throws",
"APIException",
"on",
"failure",... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L842-L858 | [
"def",
"updateLogicalInterface",
"(",
"self",
",",
"logicalInterfaceId",
",",
"name",
",",
"schemaId",
",",
"description",
"=",
"None",
")",
":",
"req",
"=",
"ApiClient",
".",
"oneLogicalInterfaceUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | deleteLogicalInterface | Deletes a logical interface.
Parameters: logicalInterfaceId (string).
Throws APIException on failure. | tmp/src/things/things.py | def deleteLogicalInterface(self, logicalInterfaceId):
"""
Deletes a logical interface.
Parameters: logicalInterfaceId (string).
Throws APIException on failure.
"""
req = ApiClient.oneLogicalInterfaceUrl % (self.host, "/draft", logicalInterfaceId)
resp = requests.d... | def deleteLogicalInterface(self, logicalInterfaceId):
"""
Deletes a logical interface.
Parameters: logicalInterfaceId (string).
Throws APIException on failure.
"""
req = ApiClient.oneLogicalInterfaceUrl % (self.host, "/draft", logicalInterfaceId)
resp = requests.d... | [
"Deletes",
"a",
"logical",
"interface",
".",
"Parameters",
":",
"logicalInterfaceId",
"(",
"string",
")",
".",
"Throws",
"APIException",
"on",
"failure",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L860-L872 | [
"def",
"deleteLogicalInterface",
"(",
"self",
",",
"logicalInterfaceId",
")",
":",
"req",
"=",
"ApiClient",
".",
"oneLogicalInterfaceUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"logicalInterfaceId",
")",
"resp",
"=",
"requests",
".",
"delete",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | getLogicalInterface | Gets a logical interface.
Parameters:
- logicalInterfaceId (string)
- draft (boolean)
Throws APIException on failure. | tmp/src/things/things.py | def getLogicalInterface(self, logicalInterfaceId, draft=False):
"""
Gets a logical interface.
Parameters:
- logicalInterfaceId (string)
- draft (boolean)
Throws APIException on failure.
"""
if draft:
req = ApiClient.oneLogicalInterfaceUrl %... | def getLogicalInterface(self, logicalInterfaceId, draft=False):
"""
Gets a logical interface.
Parameters:
- logicalInterfaceId (string)
- draft (boolean)
Throws APIException on failure.
"""
if draft:
req = ApiClient.oneLogicalInterfaceUrl %... | [
"Gets",
"a",
"logical",
"interface",
".",
"Parameters",
":",
"-",
"logicalInterfaceId",
"(",
"string",
")",
"-",
"draft",
"(",
"boolean",
")",
"Throws",
"APIException",
"on",
"failure",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L874-L891 | [
"def",
"getLogicalInterface",
"(",
"self",
",",
"logicalInterfaceId",
",",
"draft",
"=",
"False",
")",
":",
"if",
"draft",
":",
"req",
"=",
"ApiClient",
".",
"oneLogicalInterfaceUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"logicalInterfaceId",... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | getRuleForLogicalInterface | Gets a rule for a logical interface.
Parameters:
- logicalInterfaceId (string)
- ruleId (string)
- draft (boolean)
Throws APIException on failure. | tmp/src/things/things.py | def getRuleForLogicalInterface(self, logicalInterfaceId, ruleId, draft=False):
"""
Gets a rule for a logical interface.
Parameters:
- logicalInterfaceId (string)
- ruleId (string)
- draft (boolean)
Throws APIException on failure.
"""
if draft... | def getRuleForLogicalInterface(self, logicalInterfaceId, ruleId, draft=False):
"""
Gets a rule for a logical interface.
Parameters:
- logicalInterfaceId (string)
- ruleId (string)
- draft (boolean)
Throws APIException on failure.
"""
if draft... | [
"Gets",
"a",
"rule",
"for",
"a",
"logical",
"interface",
".",
"Parameters",
":",
"-",
"logicalInterfaceId",
"(",
"string",
")",
"-",
"ruleId",
"(",
"string",
")",
"-",
"draft",
"(",
"boolean",
")",
"Throws",
"APIException",
"on",
"failure",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L912-L930 | [
"def",
"getRuleForLogicalInterface",
"(",
"self",
",",
"logicalInterfaceId",
",",
"ruleId",
",",
"draft",
"=",
"False",
")",
":",
"if",
"draft",
":",
"req",
"=",
"ApiClient",
".",
"oneRuleForLogicalInterfaceUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | addRuleToLogicalInterface | Adds a rule to a logical interface.
Parameters:
- logicalInterfaceId (string)
- name (string)
- condition (string)
- (description (string, optional)
Returns: rule id (string), response (object).
Throws APIException on failure. | tmp/src/things/things.py | def addRuleToLogicalInterface(self, logicalInterfaceId, name, condition, description=None, alias=None):
"""
Adds a rule to a logical interface.
Parameters:
- logicalInterfaceId (string)
- name (string)
- condition (string)
- (description (string, optional)... | def addRuleToLogicalInterface(self, logicalInterfaceId, name, condition, description=None, alias=None):
"""
Adds a rule to a logical interface.
Parameters:
- logicalInterfaceId (string)
- name (string)
- condition (string)
- (description (string, optional)... | [
"Adds",
"a",
"rule",
"to",
"a",
"logical",
"interface",
".",
"Parameters",
":",
"-",
"logicalInterfaceId",
"(",
"string",
")",
"-",
"name",
"(",
"string",
")",
"-",
"condition",
"(",
"string",
")",
"-",
"(",
"description",
"(",
"string",
"optional",
")",... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L932-L953 | [
"def",
"addRuleToLogicalInterface",
"(",
"self",
",",
"logicalInterfaceId",
",",
"name",
",",
"condition",
",",
"description",
"=",
"None",
",",
"alias",
"=",
"None",
")",
":",
"req",
"=",
"ApiClient",
".",
"allRulesForLogicalInterfaceUrl",
"%",
"(",
"self",
"... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | updateRuleOnLogicalInterface | Updates a rule on a logical interface..
Parameters:
- logicalInterfaceId (string),
- ruleId (string)
- name (string)
- condition (string)
- description (string, optional)
Returns: response (object).
Throws APIException on failure. | tmp/src/things/things.py | def updateRuleOnLogicalInterface(self, logicalInterfaceId, ruleId, name, condition, description=None):
"""
Updates a rule on a logical interface..
Parameters:
- logicalInterfaceId (string),
- ruleId (string)
- name (string)
- condition (string)
-... | def updateRuleOnLogicalInterface(self, logicalInterfaceId, ruleId, name, condition, description=None):
"""
Updates a rule on a logical interface..
Parameters:
- logicalInterfaceId (string),
- ruleId (string)
- name (string)
- condition (string)
-... | [
"Updates",
"a",
"rule",
"on",
"a",
"logical",
"interface",
"..",
"Parameters",
":",
"-",
"logicalInterfaceId",
"(",
"string",
")",
"-",
"ruleId",
"(",
"string",
")",
"-",
"name",
"(",
"string",
")",
"-",
"condition",
"(",
"string",
")",
"-",
"description... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L955-L977 | [
"def",
"updateRuleOnLogicalInterface",
"(",
"self",
",",
"logicalInterfaceId",
",",
"ruleId",
",",
"name",
",",
"condition",
",",
"description",
"=",
"None",
")",
":",
"req",
"=",
"ApiClient",
".",
"oneRuleForLogicalInterfaceUrl",
"%",
"(",
"self",
".",
"host",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | deleteRuleOnLogicalInterface | Deletes a rule from a logical interface
Parameters:
- logicalInterfaceId (string),
- ruleId (string)
Returns: response (object)
Throws APIException on failure | tmp/src/things/things.py | def deleteRuleOnLogicalInterface(self, logicalInterfaceId, ruleId):
"""
Deletes a rule from a logical interface
Parameters:
- logicalInterfaceId (string),
- ruleId (string)
Returns: response (object)
Throws APIException on failure
"""
req = Api... | def deleteRuleOnLogicalInterface(self, logicalInterfaceId, ruleId):
"""
Deletes a rule from a logical interface
Parameters:
- logicalInterfaceId (string),
- ruleId (string)
Returns: response (object)
Throws APIException on failure
"""
req = Api... | [
"Deletes",
"a",
"rule",
"from",
"a",
"logical",
"interface",
"Parameters",
":",
"-",
"logicalInterfaceId",
"(",
"string",
")",
"-",
"ruleId",
"(",
"string",
")",
"Returns",
":",
"response",
"(",
"object",
")",
"Throws",
"APIException",
"on",
"failure"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L979-L994 | [
"def",
"deleteRuleOnLogicalInterface",
"(",
"self",
",",
"logicalInterfaceId",
",",
"ruleId",
")",
":",
"req",
"=",
"ApiClient",
".",
"oneRuleForLogicalInterfaceUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"logicalInterfaceId",
",",
"ruleId",
")",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | addPhysicalInterfaceToDeviceType | Adds a physical interface to a device type.
Parameters:
- typeId (string) - the device type
- physicalInterfaceId (string) - the id returned by the platform on creation of the physical interface
Throws APIException on failure. | tmp/src/things/things.py | def addPhysicalInterfaceToDeviceType(self, typeId, physicalInterfaceId):
"""
Adds a physical interface to a device type.
Parameters:
- typeId (string) - the device type
- physicalInterfaceId (string) - the id returned by the platform on creation of the physical interface
... | def addPhysicalInterfaceToDeviceType(self, typeId, physicalInterfaceId):
"""
Adds a physical interface to a device type.
Parameters:
- typeId (string) - the device type
- physicalInterfaceId (string) - the id returned by the platform on creation of the physical interface
... | [
"Adds",
"a",
"physical",
"interface",
"to",
"a",
"device",
"type",
".",
"Parameters",
":",
"-",
"typeId",
"(",
"string",
")",
"-",
"the",
"device",
"type",
"-",
"physicalInterfaceId",
"(",
"string",
")",
"-",
"the",
"id",
"returned",
"by",
"the",
"platfo... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L1003-L1019 | [
"def",
"addPhysicalInterfaceToDeviceType",
"(",
"self",
",",
"typeId",
",",
"physicalInterfaceId",
")",
":",
"req",
"=",
"ApiClient",
".",
"oneDeviceTypePhysicalInterfaceUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"typeId",
")",
"body",
"=",
"{"... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | getPhysicalInterfaceOnDeviceType | Gets the physical interface associated with a device type.
Parameters:
- typeId (string) - the device type
- draft (boolean)
Throws APIException on failure. | tmp/src/things/things.py | def getPhysicalInterfaceOnDeviceType(self, typeId, draft=False):
"""
Gets the physical interface associated with a device type.
Parameters:
- typeId (string) - the device type
- draft (boolean)
Throws APIException on failure.
"""
if draft:
... | def getPhysicalInterfaceOnDeviceType(self, typeId, draft=False):
"""
Gets the physical interface associated with a device type.
Parameters:
- typeId (string) - the device type
- draft (boolean)
Throws APIException on failure.
"""
if draft:
... | [
"Gets",
"the",
"physical",
"interface",
"associated",
"with",
"a",
"device",
"type",
".",
"Parameters",
":",
"-",
"typeId",
"(",
"string",
")",
"-",
"the",
"device",
"type",
"-",
"draft",
"(",
"boolean",
")",
"Throws",
"APIException",
"on",
"failure",
"."
... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L1021-L1039 | [
"def",
"getPhysicalInterfaceOnDeviceType",
"(",
"self",
",",
"typeId",
",",
"draft",
"=",
"False",
")",
":",
"if",
"draft",
":",
"req",
"=",
"ApiClient",
".",
"oneDeviceTypePhysicalInterfaceUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"typeId",... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | getLogicalInterfacesOnDeviceType | Get all logical interfaces for a device type.
Parameters:
- typeId (string)
- draft (boolean)
Returns:
- list of logical interface ids
- HTTP response object
Throws APIException on failure. | tmp/src/things/things.py | def getLogicalInterfacesOnDeviceType(self, typeId, draft=False):
"""
Get all logical interfaces for a device type.
Parameters:
- typeId (string)
- draft (boolean)
Returns:
- list of logical interface ids
- HTTP response object
Throws AP... | def getLogicalInterfacesOnDeviceType(self, typeId, draft=False):
"""
Get all logical interfaces for a device type.
Parameters:
- typeId (string)
- draft (boolean)
Returns:
- list of logical interface ids
- HTTP response object
Throws AP... | [
"Get",
"all",
"logical",
"interfaces",
"for",
"a",
"device",
"type",
".",
"Parameters",
":",
"-",
"typeId",
"(",
"string",
")",
"-",
"draft",
"(",
"boolean",
")",
"Returns",
":",
"-",
"list",
"of",
"logical",
"interface",
"ids",
"-",
"HTTP",
"response",
... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L1059-L1079 | [
"def",
"getLogicalInterfacesOnDeviceType",
"(",
"self",
",",
"typeId",
",",
"draft",
"=",
"False",
")",
":",
"if",
"draft",
":",
"req",
"=",
"ApiClient",
".",
"allDeviceTypeLogicalInterfacesUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"typeId",... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | addLogicalInterfaceToDeviceType | Adds a logical interface to a device type.
Parameters:
- typeId (string) - the device type
- logicalInterfaceId (string) - the id returned by the platform on creation of the logical interface
- description (string) - optional (not used)
Throws APIException on failure. | tmp/src/things/things.py | def addLogicalInterfaceToDeviceType(self, typeId, logicalInterfaceId):
"""
Adds a logical interface to a device type.
Parameters:
- typeId (string) - the device type
- logicalInterfaceId (string) - the id returned by the platform on creation of the logical interface
... | def addLogicalInterfaceToDeviceType(self, typeId, logicalInterfaceId):
"""
Adds a logical interface to a device type.
Parameters:
- typeId (string) - the device type
- logicalInterfaceId (string) - the id returned by the platform on creation of the logical interface
... | [
"Adds",
"a",
"logical",
"interface",
"to",
"a",
"device",
"type",
".",
"Parameters",
":",
"-",
"typeId",
"(",
"string",
")",
"-",
"the",
"device",
"type",
"-",
"logicalInterfaceId",
"(",
"string",
")",
"-",
"the",
"id",
"returned",
"by",
"the",
"platform... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L1081-L1101 | [
"def",
"addLogicalInterfaceToDeviceType",
"(",
"self",
",",
"typeId",
",",
"logicalInterfaceId",
")",
":",
"req",
"=",
"ApiClient",
".",
"allDeviceTypeLogicalInterfacesUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"typeId",
")",
"body",
"=",
"{",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | removeLogicalInterfaceFromDeviceType | Removes a logical interface from a device type.
Parameters:
- typeId (string) - the device type
- logicalInterfaceId (string) - the id returned by the platform on creation of the logical interface
Throws APIException on failure. | tmp/src/things/things.py | def removeLogicalInterfaceFromDeviceType(self, typeId, logicalInterfaceId):
"""
Removes a logical interface from a device type.
Parameters:
- typeId (string) - the device type
- logicalInterfaceId (string) - the id returned by the platform on creation of the logical inter... | def removeLogicalInterfaceFromDeviceType(self, typeId, logicalInterfaceId):
"""
Removes a logical interface from a device type.
Parameters:
- typeId (string) - the device type
- logicalInterfaceId (string) - the id returned by the platform on creation of the logical inter... | [
"Removes",
"a",
"logical",
"interface",
"from",
"a",
"device",
"type",
".",
"Parameters",
":",
"-",
"typeId",
"(",
"string",
")",
"-",
"the",
"device",
"type",
"-",
"logicalInterfaceId",
"(",
"string",
")",
"-",
"the",
"id",
"returned",
"by",
"the",
"pla... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L1103-L1117 | [
"def",
"removeLogicalInterfaceFromDeviceType",
"(",
"self",
",",
"typeId",
",",
"logicalInterfaceId",
")",
":",
"req",
"=",
"ApiClient",
".",
"oneDeviceTypeLogicalInterfaceUrl",
"%",
"(",
"self",
".",
"host",
",",
"typeId",
",",
"logicalInterfaceId",
")",
"resp",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | getMappingsOnDeviceType | Get all the mappings for a device type.
Parameters:
- typeId (string) - the device type
- draft (boolean) - draft or active
Throws APIException on failure. | tmp/src/things/things.py | def getMappingsOnDeviceType(self, typeId, draft=False):
"""
Get all the mappings for a device type.
Parameters:
- typeId (string) - the device type
- draft (boolean) - draft or active
Throws APIException on failure.
"""
if draft:
req = ... | def getMappingsOnDeviceType(self, typeId, draft=False):
"""
Get all the mappings for a device type.
Parameters:
- typeId (string) - the device type
- draft (boolean) - draft or active
Throws APIException on failure.
"""
if draft:
req = ... | [
"Get",
"all",
"the",
"mappings",
"for",
"a",
"device",
"type",
".",
"Parameters",
":",
"-",
"typeId",
"(",
"string",
")",
"-",
"the",
"device",
"type",
"-",
"draft",
"(",
"boolean",
")",
"-",
"draft",
"or",
"active",
"Throws",
"APIException",
"on",
"fa... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L1119-L1137 | [
"def",
"getMappingsOnDeviceType",
"(",
"self",
",",
"typeId",
",",
"draft",
"=",
"False",
")",
":",
"if",
"draft",
":",
"req",
"=",
"ApiClient",
".",
"allDeviceTypeMappingsUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"typeId",
")",
"else",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | getMappingsOnDeviceTypeForLogicalInterface | Gets the mappings for a logical interface from a device type.
Parameters:
- typeId (string) - the device type
- logicalInterfaceId (string) - the platform returned id of the logical interface
Throws APIException on failure. | tmp/src/things/things.py | def getMappingsOnDeviceTypeForLogicalInterface(self, typeId, logicalInterfaceId, draft=False):
"""
Gets the mappings for a logical interface from a device type.
Parameters:
- typeId (string) - the device type
- logicalInterfaceId (string) - the platform returned id of the... | def getMappingsOnDeviceTypeForLogicalInterface(self, typeId, logicalInterfaceId, draft=False):
"""
Gets the mappings for a logical interface from a device type.
Parameters:
- typeId (string) - the device type
- logicalInterfaceId (string) - the platform returned id of the... | [
"Gets",
"the",
"mappings",
"for",
"a",
"logical",
"interface",
"from",
"a",
"device",
"type",
".",
"Parameters",
":",
"-",
"typeId",
"(",
"string",
")",
"-",
"the",
"device",
"type",
"-",
"logicalInterfaceId",
"(",
"string",
")",
"-",
"the",
"platform",
... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L1189-L1207 | [
"def",
"getMappingsOnDeviceTypeForLogicalInterface",
"(",
"self",
",",
"typeId",
",",
"logicalInterfaceId",
",",
"draft",
"=",
"False",
")",
":",
"if",
"draft",
":",
"req",
"=",
"ApiClient",
".",
"oneDeviceTypeMappingUrl",
"%",
"(",
"self",
".",
"host",
",",
"... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | validateDeviceTypeConfiguration | Validate the device type configuration.
Parameters:
- typeId (string) - the platform device type
Throws APIException on failure. | tmp/src/things/things.py | def validateDeviceTypeConfiguration(self, typeId):
"""
Validate the device type configuration.
Parameters:
- typeId (string) - the platform device type
Throws APIException on failure.
"""
req = ApiClient.draftDeviceTypeUrl % (self.host, typeId)
body = ... | def validateDeviceTypeConfiguration(self, typeId):
"""
Validate the device type configuration.
Parameters:
- typeId (string) - the platform device type
Throws APIException on failure.
"""
req = ApiClient.draftDeviceTypeUrl % (self.host, typeId)
body = ... | [
"Validate",
"the",
"device",
"type",
"configuration",
".",
"Parameters",
":",
"-",
"typeId",
"(",
"string",
")",
"-",
"the",
"platform",
"device",
"type",
"Throws",
"APIException",
"on",
"failure",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L1249-L1264 | [
"def",
"validateDeviceTypeConfiguration",
"(",
"self",
",",
"typeId",
")",
":",
"req",
"=",
"ApiClient",
".",
"draftDeviceTypeUrl",
"%",
"(",
"self",
".",
"host",
",",
"typeId",
")",
"body",
"=",
"{",
"\"operation\"",
":",
"\"validate-configuration\"",
"}",
"r... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | validateLogicalInterfaceConfiguration | Validate the logical interface configuration.
Parameters:
- logicalInterfaceId (string)
Throws APIException on failure. | tmp/src/things/things.py | def validateLogicalInterfaceConfiguration(self, logicalInterfaceId):
"""
Validate the logical interface configuration.
Parameters:
- logicalInterfaceId (string)
Throws APIException on failure.
"""
req = ApiClient.oneLogicalInterfaceUrl % (self.host, "/draft", ... | def validateLogicalInterfaceConfiguration(self, logicalInterfaceId):
"""
Validate the logical interface configuration.
Parameters:
- logicalInterfaceId (string)
Throws APIException on failure.
"""
req = ApiClient.oneLogicalInterfaceUrl % (self.host, "/draft", ... | [
"Validate",
"the",
"logical",
"interface",
"configuration",
".",
"Parameters",
":",
"-",
"logicalInterfaceId",
"(",
"string",
")",
"Throws",
"APIException",
"on",
"failure",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L1300-L1315 | [
"def",
"validateLogicalInterfaceConfiguration",
"(",
"self",
",",
"logicalInterfaceId",
")",
":",
"req",
"=",
"ApiClient",
".",
"oneLogicalInterfaceUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"logicalInterfaceId",
")",
"body",
"=",
"{",
"\"operati... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | getDeviceStateForLogicalInterface | Gets the state for a logical interface for a device.
Parameters:
- typeId (string) - the platform device type
- deviceId (string) - the platform device id
- logicalInterfaceId (string) - the platform returned id of the logical interface
Throws APIException on failure. | tmp/src/things/things.py | def getDeviceStateForLogicalInterface(self, typeId, deviceId, logicalInterfaceId):
"""
Gets the state for a logical interface for a device.
Parameters:
- typeId (string) - the platform device type
- deviceId (string) - the platform device id
- logicalInterface... | def getDeviceStateForLogicalInterface(self, typeId, deviceId, logicalInterfaceId):
"""
Gets the state for a logical interface for a device.
Parameters:
- typeId (string) - the platform device type
- deviceId (string) - the platform device id
- logicalInterface... | [
"Gets",
"the",
"state",
"for",
"a",
"logical",
"interface",
"for",
"a",
"device",
".",
"Parameters",
":",
"-",
"typeId",
"(",
"string",
")",
"-",
"the",
"platform",
"device",
"type",
"-",
"deviceId",
"(",
"string",
")",
"-",
"the",
"platform",
"device",
... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L1351-L1366 | [
"def",
"getDeviceStateForLogicalInterface",
"(",
"self",
",",
"typeId",
",",
"deviceId",
",",
"logicalInterfaceId",
")",
":",
"req",
"=",
"ApiClient",
".",
"deviceStateUrl",
"%",
"(",
"self",
".",
"host",
",",
"typeId",
",",
"deviceId",
",",
"logicalInterfaceId"... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | getThingStateForLogicalInterface | Gets the state for a logical interface for a thing.
Parameters:
- thingTypeId (string) - the platform thing type
- thingId (string) - the platform thing id
- logicalInterfaceId (string) - the platform returned id of the logical interface
Throws APIException on failure... | tmp/src/things/things.py | def getThingStateForLogicalInterface(self, thingTypeId, thingId, logicalInterfaceId):
"""
Gets the state for a logical interface for a thing.
Parameters:
- thingTypeId (string) - the platform thing type
- thingId (string) - the platform thing id
- logicalInter... | def getThingStateForLogicalInterface(self, thingTypeId, thingId, logicalInterfaceId):
"""
Gets the state for a logical interface for a thing.
Parameters:
- thingTypeId (string) - the platform thing type
- thingId (string) - the platform thing id
- logicalInter... | [
"Gets",
"the",
"state",
"for",
"a",
"logical",
"interface",
"for",
"a",
"thing",
".",
"Parameters",
":",
"-",
"thingTypeId",
"(",
"string",
")",
"-",
"the",
"platform",
"thing",
"type",
"-",
"thingId",
"(",
"string",
")",
"-",
"the",
"platform",
"thing",... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L1425-L1440 | [
"def",
"getThingStateForLogicalInterface",
"(",
"self",
",",
"thingTypeId",
",",
"thingId",
",",
"logicalInterfaceId",
")",
":",
"req",
"=",
"ApiClient",
".",
"thingStateUrl",
"%",
"(",
"self",
".",
"host",
",",
"thingTypeId",
",",
"thingId",
",",
"logicalInterf... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | resetThingStateForLogicalInterface | Perform an operation against the thing state for a logical interface
Parameters:
- thingTypeId (string)
- thingId (string)
- logicalInterfaceId (string)
Throws APIException on failure. | tmp/src/things/things.py | def resetThingStateForLogicalInterface(self, thingTypeId, thingId , logicalInterfaceId):
"""
Perform an operation against the thing state for a logical interface
Parameters:
- thingTypeId (string)
- thingId (string)
- logicalInterfaceId (string)
Throws AP... | def resetThingStateForLogicalInterface(self, thingTypeId, thingId , logicalInterfaceId):
"""
Perform an operation against the thing state for a logical interface
Parameters:
- thingTypeId (string)
- thingId (string)
- logicalInterfaceId (string)
Throws AP... | [
"Perform",
"an",
"operation",
"against",
"the",
"thing",
"state",
"for",
"a",
"logical",
"interface",
"Parameters",
":",
"-",
"thingTypeId",
"(",
"string",
")",
"-",
"thingId",
"(",
"string",
")",
"-",
"logicalInterfaceId",
"(",
"string",
")",
"Throws",
"API... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L1442-L1459 | [
"def",
"resetThingStateForLogicalInterface",
"(",
"self",
",",
"thingTypeId",
",",
"thingId",
",",
"logicalInterfaceId",
")",
":",
"req",
"=",
"ApiClient",
".",
"thingStateUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"\"",
",",
"thingTypeId",
",",
"thingId",
",... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | getLogicalInterfacesOnThingType | Get all logical interfaces for a thing type.
Parameters:
- thingTypeId (string)
- draft (boolean)
Returns:
- list of logical interface ids
- HTTP response object
Throws APIException on failure. | tmp/src/things/things.py | def getLogicalInterfacesOnThingType(self, thingTypeId, draft=False):
"""
Get all logical interfaces for a thing type.
Parameters:
- thingTypeId (string)
- draft (boolean)
Returns:
- list of logical interface ids
- HTTP response object
T... | def getLogicalInterfacesOnThingType(self, thingTypeId, draft=False):
"""
Get all logical interfaces for a thing type.
Parameters:
- thingTypeId (string)
- draft (boolean)
Returns:
- list of logical interface ids
- HTTP response object
T... | [
"Get",
"all",
"logical",
"interfaces",
"for",
"a",
"thing",
"type",
".",
"Parameters",
":",
"-",
"thingTypeId",
"(",
"string",
")",
"-",
"draft",
"(",
"boolean",
")",
"Returns",
":",
"-",
"list",
"of",
"logical",
"interface",
"ids",
"-",
"HTTP",
"respons... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L1468-L1488 | [
"def",
"getLogicalInterfacesOnThingType",
"(",
"self",
",",
"thingTypeId",
",",
"draft",
"=",
"False",
")",
":",
"if",
"draft",
":",
"req",
"=",
"ApiClient",
".",
"allThingTypeLogicalInterfacesUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"thing... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | addLogicalInterfaceToThingType | Adds a logical interface to a thing type.
Parameters:
- thingTypeId (string) - the thing type
- logicalInterfaceId (string) - the id returned by the platform on creation of the logical interface
Throws APIException on failure. | tmp/src/things/things.py | def addLogicalInterfaceToThingType(self, thingTypeId, logicalInterfaceId, schemaId = None, name = None):
"""
Adds a logical interface to a thing type.
Parameters:
- thingTypeId (string) - the thing type
- logicalInterfaceId (string) - the id returned by the platform on cr... | def addLogicalInterfaceToThingType(self, thingTypeId, logicalInterfaceId, schemaId = None, name = None):
"""
Adds a logical interface to a thing type.
Parameters:
- thingTypeId (string) - the thing type
- logicalInterfaceId (string) - the id returned by the platform on cr... | [
"Adds",
"a",
"logical",
"interface",
"to",
"a",
"thing",
"type",
".",
"Parameters",
":",
"-",
"thingTypeId",
"(",
"string",
")",
"-",
"the",
"thing",
"type",
"-",
"logicalInterfaceId",
"(",
"string",
")",
"-",
"the",
"id",
"returned",
"by",
"the",
"platf... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L1490-L1509 | [
"def",
"addLogicalInterfaceToThingType",
"(",
"self",
",",
"thingTypeId",
",",
"logicalInterfaceId",
",",
"schemaId",
"=",
"None",
",",
"name",
"=",
"None",
")",
":",
"req",
"=",
"ApiClient",
".",
"allThingTypeLogicalInterfacesUrl",
"%",
"(",
"self",
".",
"host"... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | removeLogicalInterfaceFromThingType | Removes a logical interface from a thing type.
Parameters:
- thingTypeId (string) - the thing type
- logicalInterfaceId (string) - the id returned by the platform on creation of the logical interface
Throws APIException on failure. | tmp/src/things/things.py | def removeLogicalInterfaceFromThingType(self, thingTypeId, logicalInterfaceId):
"""
Removes a logical interface from a thing type.
Parameters:
- thingTypeId (string) - the thing type
- logicalInterfaceId (string) - the id returned by the platform on creation of the logica... | def removeLogicalInterfaceFromThingType(self, thingTypeId, logicalInterfaceId):
"""
Removes a logical interface from a thing type.
Parameters:
- thingTypeId (string) - the thing type
- logicalInterfaceId (string) - the id returned by the platform on creation of the logica... | [
"Removes",
"a",
"logical",
"interface",
"from",
"a",
"thing",
"type",
".",
"Parameters",
":",
"-",
"thingTypeId",
"(",
"string",
")",
"-",
"the",
"thing",
"type",
"-",
"logicalInterfaceId",
"(",
"string",
")",
"-",
"the",
"id",
"returned",
"by",
"the",
"... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L1511-L1525 | [
"def",
"removeLogicalInterfaceFromThingType",
"(",
"self",
",",
"thingTypeId",
",",
"logicalInterfaceId",
")",
":",
"req",
"=",
"ApiClient",
".",
"oneThingTypeLogicalInterfaceUrl",
"%",
"(",
"self",
".",
"host",
",",
"thingTypeId",
",",
"logicalInterfaceId",
")",
"r... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | getMappingsOnThingType | Get all the mappings for a thing type.
Parameters:
- thingTypeId (string) - the thing type
- draft (boolean) - draft or active
Throws APIException on failure. | tmp/src/things/things.py | def getMappingsOnThingType(self, thingTypeId, draft=False):
"""
Get all the mappings for a thing type.
Parameters:
- thingTypeId (string) - the thing type
- draft (boolean) - draft or active
Throws APIException on failure.
"""
if draft:
... | def getMappingsOnThingType(self, thingTypeId, draft=False):
"""
Get all the mappings for a thing type.
Parameters:
- thingTypeId (string) - the thing type
- draft (boolean) - draft or active
Throws APIException on failure.
"""
if draft:
... | [
"Get",
"all",
"the",
"mappings",
"for",
"a",
"thing",
"type",
".",
"Parameters",
":",
"-",
"thingTypeId",
"(",
"string",
")",
"-",
"the",
"thing",
"type",
"-",
"draft",
"(",
"boolean",
")",
"-",
"draft",
"or",
"active",
"Throws",
"APIException",
"on",
... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L1527-L1545 | [
"def",
"getMappingsOnThingType",
"(",
"self",
",",
"thingTypeId",
",",
"draft",
"=",
"False",
")",
":",
"if",
"draft",
":",
"req",
"=",
"ApiClient",
".",
"allThingTypeMappingsUrl",
"%",
"(",
"self",
".",
"host",
",",
"\"/draft\"",
",",
"thingTypeId",
")",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | getMappingsOnThingTypeForLogicalInterface | Gets the mappings for a logical interface from a thing type.
Parameters:
- thingTypeId (string) - the thing type
- logicalInterfaceId (string) - the platform returned id of the logical interface
Throws APIException on failure. | tmp/src/things/things.py | def getMappingsOnThingTypeForLogicalInterface(self, thingTypeId, logicalInterfaceId, draft=False):
"""
Gets the mappings for a logical interface from a thing type.
Parameters:
- thingTypeId (string) - the thing type
- logicalInterfaceId (string) - the platform returned id... | def getMappingsOnThingTypeForLogicalInterface(self, thingTypeId, logicalInterfaceId, draft=False):
"""
Gets the mappings for a logical interface from a thing type.
Parameters:
- thingTypeId (string) - the thing type
- logicalInterfaceId (string) - the platform returned id... | [
"Gets",
"the",
"mappings",
"for",
"a",
"logical",
"interface",
"from",
"a",
"thing",
"type",
".",
"Parameters",
":",
"-",
"thingTypeId",
"(",
"string",
")",
"-",
"the",
"thing",
"type",
"-",
"logicalInterfaceId",
"(",
"string",
")",
"-",
"the",
"platform",... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L1597-L1615 | [
"def",
"getMappingsOnThingTypeForLogicalInterface",
"(",
"self",
",",
"thingTypeId",
",",
"logicalInterfaceId",
",",
"draft",
"=",
"False",
")",
":",
"if",
"draft",
":",
"req",
"=",
"ApiClient",
".",
"oneThingTypeMappingUrl",
"%",
"(",
"self",
".",
"host",
",",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | updateMappingsOnDeviceType | Add mappings for a thing type.
Parameters:
- thingTypeId (string) - the thing type
- logicalInterfaceId (string) - the id of the application interface these mappings are for
- notificationStrategy (string) - the notification strategy to use for these mappings
- ma... | tmp/src/things/things.py | def updateMappingsOnDeviceType(self, thingTypeId, logicalInterfaceId, mappingsObject, notificationStrategy = "never"):
"""
Add mappings for a thing type.
Parameters:
- thingTypeId (string) - the thing type
- logicalInterfaceId (string) - the id of the application interfac... | def updateMappingsOnDeviceType(self, thingTypeId, logicalInterfaceId, mappingsObject, notificationStrategy = "never"):
"""
Add mappings for a thing type.
Parameters:
- thingTypeId (string) - the thing type
- logicalInterfaceId (string) - the id of the application interfac... | [
"Add",
"mappings",
"for",
"a",
"thing",
"type",
".",
"Parameters",
":",
"-",
"thingTypeId",
"(",
"string",
")",
"-",
"the",
"thing",
"type",
"-",
"logicalInterfaceId",
"(",
"string",
")",
"-",
"the",
"id",
"of",
"the",
"application",
"interface",
"these",
... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/tmp/src/things/things.py#L1617-L1649 | [
"def",
"updateMappingsOnDeviceType",
"(",
"self",
",",
"thingTypeId",
",",
"logicalInterfaceId",
",",
"mappingsObject",
",",
"notificationStrategy",
"=",
"\"never\"",
")",
":",
"req",
"=",
"ApiClient",
".",
"oneThingTypeMappingUrl",
"%",
"(",
"self",
".",
"host",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | AbstractClient.connect | Connect the client to IBM Watson IoT Platform using the underlying Paho MQTT client
# Raises
ConnectionException: If there is a problem establishing the connection. | src/wiotp/sdk/client.py | def connect(self):
"""
Connect the client to IBM Watson IoT Platform using the underlying Paho MQTT client
# Raises
ConnectionException: If there is a problem establishing the connection.
"""
self.logger.debug(
"Connecting... (address = %s, port = %s,... | def connect(self):
"""
Connect the client to IBM Watson IoT Platform using the underlying Paho MQTT client
# Raises
ConnectionException: If there is a problem establishing the connection.
"""
self.logger.debug(
"Connecting... (address = %s, port = %s,... | [
"Connect",
"the",
"client",
"to",
"IBM",
"Watson",
"IoT",
"Platform",
"using",
"the",
"underlying",
"Paho",
"MQTT",
"client",
"#",
"Raises",
"ConnectionException",
":",
"If",
"there",
"is",
"a",
"problem",
"establishing",
"the",
"connection",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/client.py#L222-L249 | [
"def",
"connect",
"(",
"self",
")",
":",
"self",
".",
"logger",
".",
"debug",
"(",
"\"Connecting... (address = %s, port = %s, clientId = %s, username = %s)\"",
"%",
"(",
"self",
".",
"address",
",",
"self",
".",
"port",
",",
"self",
".",
"clientId",
",",
"self",... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | AbstractClient.disconnect | Disconnect the client from IBM Watson IoT Platform | src/wiotp/sdk/client.py | def disconnect(self):
"""
Disconnect the client from IBM Watson IoT Platform
"""
# self.logger.info("Closing connection to the IBM Watson IoT Platform")
self.client.disconnect()
# If we don't call loop_stop() it appears we end up with a zombie thread which continues to pr... | def disconnect(self):
"""
Disconnect the client from IBM Watson IoT Platform
"""
# self.logger.info("Closing connection to the IBM Watson IoT Platform")
self.client.disconnect()
# If we don't call loop_stop() it appears we end up with a zombie thread which continues to pr... | [
"Disconnect",
"the",
"client",
"from",
"IBM",
"Watson",
"IoT",
"Platform"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/client.py#L251-L260 | [
"def",
"disconnect",
"(",
"self",
")",
":",
"# self.logger.info(\"Closing connection to the IBM Watson IoT Platform\")",
"self",
".",
"client",
".",
"disconnect",
"(",
")",
"# If we don't call loop_stop() it appears we end up with a zombie thread which continues to process",
"# network... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | AbstractClient._onLog | Called when the client has log information.
See [paho.mqtt.python#on_log](https://github.com/eclipse/paho.mqtt.python#on_log) for more information
# Parameters
mqttc (paho.mqtt.client.Client): The client instance for this callback
obj (object): The private user data a... | src/wiotp/sdk/client.py | def _onLog(self, mqttc, obj, level, string):
"""
Called when the client has log information.
See [paho.mqtt.python#on_log](https://github.com/eclipse/paho.mqtt.python#on_log) for more information
# Parameters
mqttc (paho.mqtt.client.Client): The client instanc... | def _onLog(self, mqttc, obj, level, string):
"""
Called when the client has log information.
See [paho.mqtt.python#on_log](https://github.com/eclipse/paho.mqtt.python#on_log) for more information
# Parameters
mqttc (paho.mqtt.client.Client): The client instanc... | [
"Called",
"when",
"the",
"client",
"has",
"log",
"information",
".",
"See",
"[",
"paho",
".",
"mqtt",
".",
"python#on_log",
"]",
"(",
"https",
":",
"//",
"github",
".",
"com",
"/",
"eclipse",
"/",
"paho",
".",
"mqtt",
".",
"python#on_log",
")",
"for",
... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/client.py#L262-L276 | [
"def",
"_onLog",
"(",
"self",
",",
"mqttc",
",",
"obj",
",",
"level",
",",
"string",
")",
":",
"self",
".",
"logger",
".",
"debug",
"(",
"\"%d %s\"",
"%",
"(",
"level",
",",
"string",
")",
")"
] | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | AbstractClient._onConnect | Called when the broker responds to our connection request.
The value of rc determines success or not:
0: Connection successful
1: Connection refused - incorrect protocol version
2: Connection refused - invalid client identifier
3: Connection refused - server unav... | src/wiotp/sdk/client.py | def _onConnect(self, mqttc, userdata, flags, rc):
"""
Called when the broker responds to our connection request.
The value of rc determines success or not:
0: Connection successful
1: Connection refused - incorrect protocol version
2: Connection refused - inv... | def _onConnect(self, mqttc, userdata, flags, rc):
"""
Called when the broker responds to our connection request.
The value of rc determines success or not:
0: Connection successful
1: Connection refused - incorrect protocol version
2: Connection refused - inv... | [
"Called",
"when",
"the",
"broker",
"responds",
"to",
"our",
"connection",
"request",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/client.py#L278-L321 | [
"def",
"_onConnect",
"(",
"self",
",",
"mqttc",
",",
"userdata",
",",
"flags",
",",
"rc",
")",
":",
"if",
"rc",
"==",
"0",
":",
"self",
".",
"connectEvent",
".",
"set",
"(",
")",
"self",
".",
"logger",
".",
"info",
"(",
"\"Connected successfully: %s\""... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | AbstractClient._onDisconnect | Called when the client disconnects from IBM Watson IoT Platform.
See [paho.mqtt.python#on_disconnect](https://github.com/eclipse/paho.mqtt.python#on_disconnect) for more information
# Parameters
mqttc (paho.mqtt.client.Client): The client instance for this callback
obj ... | src/wiotp/sdk/client.py | def _onDisconnect(self, mqttc, obj, rc):
"""
Called when the client disconnects from IBM Watson IoT Platform.
See [paho.mqtt.python#on_disconnect](https://github.com/eclipse/paho.mqtt.python#on_disconnect) for more information
# Parameters
mqttc (paho.mqtt.clien... | def _onDisconnect(self, mqttc, obj, rc):
"""
Called when the client disconnects from IBM Watson IoT Platform.
See [paho.mqtt.python#on_disconnect](https://github.com/eclipse/paho.mqtt.python#on_disconnect) for more information
# Parameters
mqttc (paho.mqtt.clien... | [
"Called",
"when",
"the",
"client",
"disconnects",
"from",
"IBM",
"Watson",
"IoT",
"Platform",
".",
"See",
"[",
"paho",
".",
"mqtt",
".",
"python#on_disconnect",
"]",
"(",
"https",
":",
"//",
"github",
".",
"com",
"/",
"eclipse",
"/",
"paho",
".",
"mqtt",... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/client.py#L323-L343 | [
"def",
"_onDisconnect",
"(",
"self",
",",
"mqttc",
",",
"obj",
",",
"rc",
")",
":",
"# Clear the event to indicate we're no longer connected",
"self",
".",
"connectEvent",
".",
"clear",
"(",
")",
"if",
"rc",
"!=",
"0",
":",
"self",
".",
"logger",
".",
"error... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | AbstractClient._onPublish | Called when a message from the client has been successfully sent to IBM Watson IoT Platform.
See [paho.mqtt.python#on_publish](https://github.com/eclipse/paho.mqtt.python#on_publish) for more information
# Parameters
mqttc (paho.mqtt.client.Client): The client instance for this... | src/wiotp/sdk/client.py | def _onPublish(self, mqttc, obj, mid):
"""
Called when a message from the client has been successfully sent to IBM Watson IoT Platform.
See [paho.mqtt.python#on_publish](https://github.com/eclipse/paho.mqtt.python#on_publish) for more information
# Parameters
mq... | def _onPublish(self, mqttc, obj, mid):
"""
Called when a message from the client has been successfully sent to IBM Watson IoT Platform.
See [paho.mqtt.python#on_publish](https://github.com/eclipse/paho.mqtt.python#on_publish) for more information
# Parameters
mq... | [
"Called",
"when",
"a",
"message",
"from",
"the",
"client",
"has",
"been",
"successfully",
"sent",
"to",
"IBM",
"Watson",
"IoT",
"Platform",
".",
"See",
"[",
"paho",
".",
"mqtt",
".",
"python#on_publish",
"]",
"(",
"https",
":",
"//",
"github",
".",
"com"... | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/client.py#L345-L365 | [
"def",
"_onPublish",
"(",
"self",
",",
"mqttc",
",",
"obj",
",",
"mid",
")",
":",
"with",
"self",
".",
"_messagesLock",
":",
"if",
"mid",
"in",
"self",
".",
"_onPublishCallbacks",
":",
"midOnPublish",
"=",
"self",
".",
"_onPublishCallbacks",
".",
"get",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | ApplicationClient.subscribeToDeviceEvents | Subscribe to device event messages
# Parameters
typeId (string): typeId for the subscription, optional. Defaults to all device types (MQTT `+` wildcard)
deviceId (string): deviceId for the subscription, optional. Defaults to all devices (MQTT `+` wildcard)
eventId (string): eventId fo... | src/wiotp/sdk/application/client.py | def subscribeToDeviceEvents(self, typeId="+", deviceId="+", eventId="+", msgFormat="+", qos=0):
"""
Subscribe to device event messages
# Parameters
typeId (string): typeId for the subscription, optional. Defaults to all device types (MQTT `+` wildcard)
deviceId (string): device... | def subscribeToDeviceEvents(self, typeId="+", deviceId="+", eventId="+", msgFormat="+", qos=0):
"""
Subscribe to device event messages
# Parameters
typeId (string): typeId for the subscription, optional. Defaults to all device types (MQTT `+` wildcard)
deviceId (string): device... | [
"Subscribe",
"to",
"device",
"event",
"messages"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/application/client.py#L90-L114 | [
"def",
"subscribeToDeviceEvents",
"(",
"self",
",",
"typeId",
"=",
"\"+\"",
",",
"deviceId",
"=",
"\"+\"",
",",
"eventId",
"=",
"\"+\"",
",",
"msgFormat",
"=",
"\"+\"",
",",
"qos",
"=",
"0",
")",
":",
"if",
"self",
".",
"_config",
".",
"isQuickstart",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | ApplicationClient.subscribeToDeviceStatus | Subscribe to device status messages
# Parameters
typeId (string): typeId for the subscription, optional. Defaults to all device types (MQTT `+` wildcard)
deviceId (string): deviceId for the subscription, optional. Defaults to all devices (MQTT `+` wildcard)
# Returns
int: If ... | src/wiotp/sdk/application/client.py | def subscribeToDeviceStatus(self, typeId="+", deviceId="+"):
"""
Subscribe to device status messages
# Parameters
typeId (string): typeId for the subscription, optional. Defaults to all device types (MQTT `+` wildcard)
deviceId (string): deviceId for the subscription, optional.... | def subscribeToDeviceStatus(self, typeId="+", deviceId="+"):
"""
Subscribe to device status messages
# Parameters
typeId (string): typeId for the subscription, optional. Defaults to all device types (MQTT `+` wildcard)
deviceId (string): deviceId for the subscription, optional.... | [
"Subscribe",
"to",
"device",
"status",
"messages"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/application/client.py#L116-L135 | [
"def",
"subscribeToDeviceStatus",
"(",
"self",
",",
"typeId",
"=",
"\"+\"",
",",
"deviceId",
"=",
"\"+\"",
")",
":",
"if",
"self",
".",
"_config",
".",
"isQuickstart",
"(",
")",
"and",
"deviceId",
"==",
"\"+\"",
":",
"self",
".",
"logger",
".",
"warning"... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | ApplicationClient.subscribeToDeviceCommands | Subscribe to device command messages
# Parameters
typeId (string): typeId for the subscription, optional. Defaults to all device types (MQTT `+` wildcard)
deviceId (string): deviceId for the subscription, optional. Defaults to all devices (MQTT `+` wildcard)
commandId (string): comman... | src/wiotp/sdk/application/client.py | def subscribeToDeviceCommands(self, typeId="+", deviceId="+", commandId="+", msgFormat="+"):
"""
Subscribe to device command messages
# Parameters
typeId (string): typeId for the subscription, optional. Defaults to all device types (MQTT `+` wildcard)
deviceId (string): deviceI... | def subscribeToDeviceCommands(self, typeId="+", deviceId="+", commandId="+", msgFormat="+"):
"""
Subscribe to device command messages
# Parameters
typeId (string): typeId for the subscription, optional. Defaults to all device types (MQTT `+` wildcard)
deviceId (string): deviceI... | [
"Subscribe",
"to",
"device",
"command",
"messages"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/application/client.py#L137-L159 | [
"def",
"subscribeToDeviceCommands",
"(",
"self",
",",
"typeId",
"=",
"\"+\"",
",",
"deviceId",
"=",
"\"+\"",
",",
"commandId",
"=",
"\"+\"",
",",
"msgFormat",
"=",
"\"+\"",
")",
":",
"if",
"self",
".",
"_config",
".",
"isQuickstart",
"(",
")",
":",
"self... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | ApplicationClient.publishCommand | Publish a command to a device
# Parameters
typeId (string) : The type of the device this command is to be published to
deviceId (string): The id of the device this command is to be published to
command (string) : The name of the command
msgFormat (string) : The format of the com... | src/wiotp/sdk/application/client.py | def publishCommand(self, typeId, deviceId, commandId, msgFormat, data=None, qos=0, on_publish=None):
"""
Publish a command to a device
# Parameters
typeId (string) : The type of the device this command is to be published to
deviceId (string): The id of the device this command is... | def publishCommand(self, typeId, deviceId, commandId, msgFormat, data=None, qos=0, on_publish=None):
"""
Publish a command to a device
# Parameters
typeId (string) : The type of the device this command is to be published to
deviceId (string): The id of the device this command is... | [
"Publish",
"a",
"command",
"to",
"a",
"device"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/application/client.py#L165-L214 | [
"def",
"publishCommand",
"(",
"self",
",",
"typeId",
",",
"deviceId",
",",
"commandId",
",",
"msgFormat",
",",
"data",
"=",
"None",
",",
"qos",
"=",
"0",
",",
"on_publish",
"=",
"None",
")",
":",
"if",
"self",
".",
"_config",
".",
"isQuickstart",
"(",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | ApplicationClient._onUnsupportedMessage | Internal callback for messages that have not been handled by any of the specific internal callbacks, these
messages are not passed on to any user provided callback | src/wiotp/sdk/application/client.py | def _onUnsupportedMessage(self, client, userdata, message):
"""
Internal callback for messages that have not been handled by any of the specific internal callbacks, these
messages are not passed on to any user provided callback
"""
self.logger.warning(
"Received messa... | def _onUnsupportedMessage(self, client, userdata, message):
"""
Internal callback for messages that have not been handled by any of the specific internal callbacks, these
messages are not passed on to any user provided callback
"""
self.logger.warning(
"Received messa... | [
"Internal",
"callback",
"for",
"messages",
"that",
"have",
"not",
"been",
"handled",
"by",
"any",
"of",
"the",
"specific",
"internal",
"callbacks",
"these",
"messages",
"are",
"not",
"passed",
"on",
"to",
"any",
"user",
"provided",
"callback"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/application/client.py#L216-L223 | [
"def",
"_onUnsupportedMessage",
"(",
"self",
",",
"client",
",",
"userdata",
",",
"message",
")",
":",
"self",
".",
"logger",
".",
"warning",
"(",
"\"Received messaging on unsupported topic '%s' on topic '%s'\"",
"%",
"(",
"message",
".",
"payload",
",",
"message",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | ApplicationClient._onDeviceEvent | Internal callback for device event messages, parses source device from topic string and
passes the information on to the registerd device event callback | src/wiotp/sdk/application/client.py | def _onDeviceEvent(self, client, userdata, pahoMessage):
"""
Internal callback for device event messages, parses source device from topic string and
passes the information on to the registerd device event callback
"""
try:
event = Event(pahoMessage, self._messageCodec... | def _onDeviceEvent(self, client, userdata, pahoMessage):
"""
Internal callback for device event messages, parses source device from topic string and
passes the information on to the registerd device event callback
"""
try:
event = Event(pahoMessage, self._messageCodec... | [
"Internal",
"callback",
"for",
"device",
"event",
"messages",
"parses",
"source",
"device",
"from",
"topic",
"string",
"and",
"passes",
"the",
"information",
"on",
"to",
"the",
"registerd",
"device",
"event",
"callback"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/application/client.py#L225-L236 | [
"def",
"_onDeviceEvent",
"(",
"self",
",",
"client",
",",
"userdata",
",",
"pahoMessage",
")",
":",
"try",
":",
"event",
"=",
"Event",
"(",
"pahoMessage",
",",
"self",
".",
"_messageCodecs",
")",
"self",
".",
"logger",
".",
"debug",
"(",
"\"Received event ... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | ApplicationClient._onDeviceStatus | Internal callback for device status messages, parses source device from topic string and
passes the information on to the registerd device status callback | src/wiotp/sdk/application/client.py | def _onDeviceStatus(self, client, userdata, pahoMessage):
"""
Internal callback for device status messages, parses source device from topic string and
passes the information on to the registerd device status callback
"""
try:
status = Status(pahoMessage)
s... | def _onDeviceStatus(self, client, userdata, pahoMessage):
"""
Internal callback for device status messages, parses source device from topic string and
passes the information on to the registerd device status callback
"""
try:
status = Status(pahoMessage)
s... | [
"Internal",
"callback",
"for",
"device",
"status",
"messages",
"parses",
"source",
"device",
"from",
"topic",
"string",
"and",
"passes",
"the",
"information",
"on",
"to",
"the",
"registerd",
"device",
"status",
"callback"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/application/client.py#L253-L264 | [
"def",
"_onDeviceStatus",
"(",
"self",
",",
"client",
",",
"userdata",
",",
"pahoMessage",
")",
":",
"try",
":",
"status",
"=",
"Status",
"(",
"pahoMessage",
")",
"self",
".",
"logger",
".",
"debug",
"(",
"\"Received %s action from %s\"",
"%",
"(",
"status",... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | ApplicationClient._onAppStatus | Internal callback for application command messages, parses source application from topic string and
passes the information on to the registerd applicaion status callback | src/wiotp/sdk/application/client.py | def _onAppStatus(self, client, userdata, pahoMessage):
"""
Internal callback for application command messages, parses source application from topic string and
passes the information on to the registerd applicaion status callback
"""
try:
status = Status(pahoMessage)
... | def _onAppStatus(self, client, userdata, pahoMessage):
"""
Internal callback for application command messages, parses source application from topic string and
passes the information on to the registerd applicaion status callback
"""
try:
status = Status(pahoMessage)
... | [
"Internal",
"callback",
"for",
"application",
"command",
"messages",
"parses",
"source",
"application",
"from",
"topic",
"string",
"and",
"passes",
"the",
"information",
"on",
"to",
"the",
"registerd",
"applicaion",
"status",
"callback"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/application/client.py#L266-L277 | [
"def",
"_onAppStatus",
"(",
"self",
",",
"client",
",",
"userdata",
",",
"pahoMessage",
")",
":",
"try",
":",
"status",
"=",
"Status",
"(",
"pahoMessage",
")",
"self",
".",
"logger",
".",
"debug",
"(",
"\"Received %s action from %s\"",
"%",
"(",
"status",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | parseEnvVars | Parse environment variables into a Python dictionary suitable for passing to the
device client constructor as the `options` parameter
- `WIOTP_IDENTITY_ORGID`
- `WIOTP_IDENTITY_TYPEID`
- `WIOTP_IDENTITY_DEVICEID`
- `WIOTP_AUTH_TOKEN`
- `WIOTP_OPTIONS_DOMAIN` (optional)
- `WIOTP_OPTIONS_LOGL... | src/wiotp/sdk/device/config.py | def parseEnvVars():
"""
Parse environment variables into a Python dictionary suitable for passing to the
device client constructor as the `options` parameter
- `WIOTP_IDENTITY_ORGID`
- `WIOTP_IDENTITY_TYPEID`
- `WIOTP_IDENTITY_DEVICEID`
- `WIOTP_AUTH_TOKEN`
- `WIOTP_OPTIONS_DOMAIN` (opt... | def parseEnvVars():
"""
Parse environment variables into a Python dictionary suitable for passing to the
device client constructor as the `options` parameter
- `WIOTP_IDENTITY_ORGID`
- `WIOTP_IDENTITY_TYPEID`
- `WIOTP_IDENTITY_DEVICEID`
- `WIOTP_AUTH_TOKEN`
- `WIOTP_OPTIONS_DOMAIN` (opt... | [
"Parse",
"environment",
"variables",
"into",
"a",
"Python",
"dictionary",
"suitable",
"for",
"passing",
"to",
"the",
"device",
"client",
"constructor",
"as",
"the",
"options",
"parameter"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/device/config.py#L144-L230 | [
"def",
"parseEnvVars",
"(",
")",
":",
"# Identify",
"orgId",
"=",
"os",
".",
"getenv",
"(",
"\"WIOTP_IDENTITY_ORGID\"",
",",
"None",
")",
"typeId",
"=",
"os",
".",
"getenv",
"(",
"\"WIOTP_IDENTITY_TYPEID\"",
",",
"None",
")",
"deviceId",
"=",
"os",
".",
"g... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | LEC.get | Retrieves the last cached message for specified event from a specific device. | src/wiotp/sdk/api/lec/__init__.py | def get(self, deviceUid, eventId):
"""
Retrieves the last cached message for specified event from a specific device.
"""
if not isinstance(deviceUid, DeviceUid) and isinstance(deviceUid, dict):
deviceUid = DeviceUid(**deviceUid)
url = "api/v0002/device/types/%s/devi... | def get(self, deviceUid, eventId):
"""
Retrieves the last cached message for specified event from a specific device.
"""
if not isinstance(deviceUid, DeviceUid) and isinstance(deviceUid, dict):
deviceUid = DeviceUid(**deviceUid)
url = "api/v0002/device/types/%s/devi... | [
"Retrieves",
"the",
"last",
"cached",
"message",
"for",
"specified",
"event",
"from",
"a",
"specific",
"device",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/api/lec/__init__.py#L51-L65 | [
"def",
"get",
"(",
"self",
",",
"deviceUid",
",",
"eventId",
")",
":",
"if",
"not",
"isinstance",
"(",
"deviceUid",
",",
"DeviceUid",
")",
"and",
"isinstance",
"(",
"deviceUid",
",",
"dict",
")",
":",
"deviceUid",
"=",
"DeviceUid",
"(",
"*",
"*",
"devi... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | LEC.getAll | Retrieves a list of the last cached message for all events from a specific device. | src/wiotp/sdk/api/lec/__init__.py | def getAll(self, deviceUid):
"""
Retrieves a list of the last cached message for all events from a specific device.
"""
if not isinstance(deviceUid, DeviceUid) and isinstance(deviceUid, dict):
deviceUid = DeviceUid(**deviceUid)
url = "api/v0002/device/types/%s/devic... | def getAll(self, deviceUid):
"""
Retrieves a list of the last cached message for all events from a specific device.
"""
if not isinstance(deviceUid, DeviceUid) and isinstance(deviceUid, dict):
deviceUid = DeviceUid(**deviceUid)
url = "api/v0002/device/types/%s/devic... | [
"Retrieves",
"a",
"list",
"of",
"the",
"last",
"cached",
"message",
"for",
"all",
"events",
"from",
"a",
"specific",
"device",
"."
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/api/lec/__init__.py#L67-L84 | [
"def",
"getAll",
"(",
"self",
",",
"deviceUid",
")",
":",
"if",
"not",
"isinstance",
"(",
"deviceUid",
",",
"DeviceUid",
")",
"and",
"isinstance",
"(",
"deviceUid",
",",
"dict",
")",
":",
"deviceUid",
"=",
"DeviceUid",
"(",
"*",
"*",
"deviceUid",
")",
... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
test | IterableList._makeApiCall | Retrieve bulk devices
It accepts accepts a list of parameters
In case of failure it throws Exception | src/wiotp/sdk/api/common.py | def _makeApiCall(self, parameters=None):
"""
Retrieve bulk devices
It accepts accepts a list of parameters
In case of failure it throws Exception
"""
r = self._apiClient.get(self._url, parameters)
if r.status_code == 200:
return r.json()
else:
... | def _makeApiCall(self, parameters=None):
"""
Retrieve bulk devices
It accepts accepts a list of parameters
In case of failure it throws Exception
"""
r = self._apiClient.get(self._url, parameters)
if r.status_code == 200:
return r.json()
else:
... | [
"Retrieve",
"bulk",
"devices",
"It",
"accepts",
"accepts",
"a",
"list",
"of",
"parameters",
"In",
"case",
"of",
"failure",
"it",
"throws",
"Exception"
] | ibm-watson-iot/iot-python | python | https://github.com/ibm-watson-iot/iot-python/blob/195f05adce3fba4ec997017e41e02ebd85c0c4cc/src/wiotp/sdk/api/common.py#L130-L140 | [
"def",
"_makeApiCall",
"(",
"self",
",",
"parameters",
"=",
"None",
")",
":",
"r",
"=",
"self",
".",
"_apiClient",
".",
"get",
"(",
"self",
".",
"_url",
",",
"parameters",
")",
"if",
"r",
".",
"status_code",
"==",
"200",
":",
"return",
"r",
".",
"j... | 195f05adce3fba4ec997017e41e02ebd85c0c4cc |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.