mirror of
https://github.com/OpenMTC/OpenMTC.git
synced 2025-01-17 18:29:52 +00:00
14 lines
329 B
Python
14 lines
329 B
Python
|
# Example 7: Update OneM2MRequest
|
||
|
|
||
|
from openmtc_onem2m.transport import OneM2MRequest
|
||
|
from openmtc_onem2m.model import AE
|
||
|
|
||
|
my_app = AE(App_ID="myApp", labels=["keyword1", "keyword2"])
|
||
|
|
||
|
request = OneM2MRequest("update", to="onem2m", pc=my_app.labels)
|
||
|
|
||
|
print request.to
|
||
|
#>>> onem2m
|
||
|
print request.pc
|
||
|
#>>> [u'keyword1', u'keyword2']
|