KeyEvent - TakayukiHoshi1984/DeviceConnect-Spec GitHub Wiki
ããã€ã¹ã®ããŒã€ãã³ããæäœãããããšãéç¥ããæ©èœã
API | æŠèŠ |
---|---|
GET /gotapi/keyEvent/onDown | ããã€ã¹ã®ããŒãæŒããããšãã®æ å ±ãååŸããã |
PUT /gotapi/keyEvent/onDown | ããã€ã¹ã®ããŒãæŒãããããšãéç¥ããã€ãã³ããéå§ããã |
DELETE /gotapi/keyEvent/onDown | ããã€ã¹ã®ããŒãæŒãããããšãéç¥ããã€ãã³ããåæ¢ããã |
GET /gotapi/keyEvent/onKeyChange | ããã€ã¹ã®ããŒãæŒãããæãããã¯é¢ãããæã®æ å ±ãååŸããã |
PUT /gotapi/keyEvent/onKeyChange | ããã€ã¹ã®ããŒãæŒãããããŸãã¯é¢ãããããšãéç¥ããã€ãã³ããéå§ããã |
DELETE /gotapi/keyEvent/onKeyChange | ããã€ã¹ã®ããŒãæŒãããããŸãã¯é¢ãããããšãéç¥ããã€ãã³ããåæ¢ããã |
GET /gotapi/keyEvent/onUp | ããã€ã¹ã®ããŒãé¢ããããšãã®æ å ±ãååŸããã |
PUT /gotapi/keyEvent/onUp | ããã€ã¹ã®ããŒãé¢ãããããšãéç¥ããã€ãã³ããéå§ããã |
DELETE /gotapi/keyEvent/onUp | ããã€ã¹ã®ããŒãé¢ãããããšãéç¥ããã€ãã³ããåæ¢ããã |
one-shot
ããã€ã¹ã®ããŒãæŒããããšãã®æ å ±ãååŸããã
ãã©ã°ã€ã³åŽã§ãã£ãã·ã¥ããŠããææ°ã®ã€ãã³ãã¡ãã»ãŒãžã1ã€ååŸããã
ç©çå | ããŒã¿å | å¿ é | 説æ |
---|---|---|---|
serviceId | string | Yes | ãµãŒãã¹IDãååŸå¯Ÿè±¡ã¹ããŒãããã€ã¹ |
è«çå | ç©çå | ããŒã¿å | å¿ é | 説æ | |
---|---|---|---|---|---|
åŠççµæ | result | integer | Yes | 0:æ£åžžå¿ç 0以å€:ç°åžžå¿ç |
|
ã·ã¹ãã å | product | string | Yes | DeviceConnectã·ã¹ãã ã®ååã | |
ã·ã¹ãã ããŒãžã§ã³ | version | string | Yes | DeviceConnectã·ã¹ãã ã®ããŒãžã§ã³åã | |
眲å | hmac | string | No | ã¬ã¹ãã³ã¹ã«å¯Ÿãã眲åã ã¢ããªã±ãŒã·ã§ã³åŽããäºåã«HMACããŒãå ±æãããŠããå Žåã¯å¿ é ã | |
KeyEvent | keyevent | object | Yes | KeyEventã®ãªããžã§ã¯ãã | |
é¢ãããKeyã®ID | id | integer | Yes | ãã§ã«æšæºåãããŠããKeyã®IDãããå Žåã¯ããã¡ããå©çšããããšã | |
é¢ãããKeyã®Config | config | string | No | ç¹ã«Configããªãå Žåã¯ç©ºæåãè¿ãããšã |
{ "result" : 0, "product" : "Example System", "version" : "1.0.0", "keyevent" : { "config" : "5", "id" : 149 } }
event
ããã€ã¹ã®ããŒãæŒãããããšãéç¥ããã€ãã³ããéå§ããã
ã¹ããŒãããã€ã¹ã§ãµããŒãããŠããªããã©ã¡ãŒã¿ãããå Žåã«ã¯ã ãã®ãã©ã¡ãŒã¿ãçç¥ããã
ç©çå | ããŒã¿å | å¿ é | 説æ |
---|---|---|---|
serviceId | string | Yes | ãµãŒãã¹IDãååŸå¯Ÿè±¡ã¹ããŒãããã€ã¹ |
interval | long | No | ããã€ã¹ãã©ã°ã€ã³ãã€ãã³ããéä¿¡ããééã |
è«çå | ç©çå | ããŒã¿å | å¿ é | 説æ |
---|---|---|---|---|
åŠççµæ | result | integer | Yes | 0:æ£åžžå¿ç 0以å€:ç°åžžå¿ç |
ã·ã¹ãã å | product | string | Yes | DeviceConnectã·ã¹ãã ã®ååã |
ã·ã¹ãã ããŒãžã§ã³ | version | string | Yes | DeviceConnectã·ã¹ãã ã®ããŒãžã§ã³åã |
眲å | hmac | string | No | ã¬ã¹ãã³ã¹ã«å¯Ÿãã眲åã ã¢ããªã±ãŒã·ã§ã³åŽããäºåã«HMACããŒãå ±æãããŠããå Žåã¯å¿ é ã |
{ "result" : 0, "product" : "Example System", "version" : "1.0.0" }
è«çå | ç©çå | ããŒã¿å | å¿ é | 説æ | |
---|---|---|---|---|---|
ãµãŒãã¹ID | serviceId | string | Yes | ã€ãã³ããéä¿¡ãããµãŒãã¹ã®ID | |
ãããã¡ã€ã«å | profile | string | Yes | ãããã¡ã€ã«åã | |
ã€ã³ã¿ãŒãã§ãŒã¹å | interface | string | Yes | ã€ã³ã¿ãŒãã§ãŒã¹åã | |
ã¢ããªãã¥ãŒãå | attribute | string | Yes | ã¢ããªãã¥ãŒãåã | |
KeyEvent | keyevent | object | Yes | KeyEventã®ãªããžã§ã¯ãã | |
é¢ãããKeyã®ID | id | integer | Yes | ãã§ã«æšæºåãããŠããKeyã®IDãããå Žåã¯ããã¡ããå©çšããããšã | |
é¢ãããKeyã®Config | config | string | No | ç¹ã«Configããªãå Žåã¯ç©ºæåãè¿ãããšã |
{ "serviceId" : "Host.exampleId.localhost.deviceconnect.org", "profile" : "keyevent", "attribute" : "ondown", "keyevent" : { "config" : "5", "id" : 149 } }
event
ããã€ã¹ã®ããŒãæŒãããããšãéç¥ããã€ãã³ããåæ¢ããã
ã¹ããŒãããã€ã¹ã§ãµããŒãããŠããªããã©ã¡ãŒã¿ãããå Žåã«ã¯ã ãã®ãã©ã¡ãŒã¿ãçç¥ããã
ç©çå | ããŒã¿å | å¿ é | 説æ |
---|---|---|---|
serviceId | string | Yes | ãµãŒãã¹IDãååŸå¯Ÿè±¡ã¹ããŒãããã€ã¹ |
è«çå | ç©çå | ããŒã¿å | å¿ é | 説æ |
---|---|---|---|---|
åŠççµæ | result | integer | Yes | 0:æ£åžžå¿ç 0以å€:ç°åžžå¿ç |
ã·ã¹ãã å | product | string | Yes | DeviceConnectã·ã¹ãã ã®ååã |
ã·ã¹ãã ããŒãžã§ã³ | version | string | Yes | DeviceConnectã·ã¹ãã ã®ããŒãžã§ã³åã |
眲å | hmac | string | No | ã¬ã¹ãã³ã¹ã«å¯Ÿãã眲åã ã¢ããªã±ãŒã·ã§ã³åŽããäºåã«HMACããŒãå ±æãããŠããå Žåã¯å¿ é ã |
{ "result" : 0, "product" : "Example System", "version" : "1.0.0" }
one-shot
ããã€ã¹ã®ããŒãæŒãããæãããã¯é¢ãããæã®æ å ±ãååŸããã
ãã©ã°ã€ã³åŽã§ãã£ãã·ã¥ããŠããææ°ã®ã€ãã³ãã¡ãã»ãŒãžã1ã€ååŸããã
ç©çå | ããŒã¿å | å¿ é | 説æ |
---|---|---|---|
serviceId | string | Yes | ãµãŒãã¹IDãååŸå¯Ÿè±¡ã¹ããŒãããã€ã¹ |
è«çå | ç©çå | ããŒã¿å | å¿ é | 説æ | |
---|---|---|---|---|---|
åŠççµæ | result | integer | Yes | 0:æ£åžžå¿ç 0以å€:ç°åžžå¿ç |
|
ã·ã¹ãã å | product | string | Yes | DeviceConnectã·ã¹ãã ã®ååã | |
ã·ã¹ãã ããŒãžã§ã³ | version | string | Yes | DeviceConnectã·ã¹ãã ã®ããŒãžã§ã³åã | |
眲å | hmac | string | No | ã¬ã¹ãã³ã¹ã«å¯Ÿãã眲åã ã¢ããªã±ãŒã·ã§ã³åŽããäºåã«HMACããŒãå ±æãããŠããå Žåã¯å¿ é ã | |
KeyEvent | keyevent | object | Yes | KeyEventã®ãªããžã§ã¯ãã | |
æŒãããããããã¯é¢ãããæã®ç¶æ | state | string | Yes | up:Keyãé¢ãããã down:KeyãæŒãããã |
|
æŒãããããããã¯é¢ãããæã®Keyã®ID | id | integer | Yes | ãã§ã«æšæºåãããŠããKeyã®IDãããå Žåã¯ããã¡ããå©çšããããšã | |
æŒãããããããã¯é¢ãããæã®Keyã®Config | config | string | No | ç¹ã«Configããªãå Žåã¯ç©ºæåãè¿ãããšã |
{ "result" : 0, "product" : "Example System", "version" : "1.0.0", "keyevent" : { "state" : "up", "config" : "5", "id" : 149 } }
event
ããã€ã¹ã®ããŒãæŒãããããŸãã¯é¢ãããããšãéç¥ããã€ãã³ããéå§ããã
ã¹ããŒãããã€ã¹ã§ãµããŒãããŠããªããã©ã¡ãŒã¿ãããå Žåã«ã¯ã ãã®ãã©ã¡ãŒã¿ãçç¥ããã
ç©çå | ããŒã¿å | å¿ é | 説æ |
---|---|---|---|
serviceId | string | Yes | ãµãŒãã¹IDãååŸå¯Ÿè±¡ã¹ããŒãããã€ã¹ |
è«çå | ç©çå | ããŒã¿å | å¿ é | 説æ |
---|---|---|---|---|
åŠççµæ | result | integer | Yes | 0:æ£åžžå¿ç 0以å€:ç°åžžå¿ç |
ã·ã¹ãã å | product | string | Yes | DeviceConnectã·ã¹ãã ã®ååã |
ã·ã¹ãã ããŒãžã§ã³ | version | string | Yes | DeviceConnectã·ã¹ãã ã®ããŒãžã§ã³åã |
眲å | hmac | string | No | ã¬ã¹ãã³ã¹ã«å¯Ÿãã眲åã ã¢ããªã±ãŒã·ã§ã³åŽããäºåã«HMACããŒãå ±æãããŠããå Žåã¯å¿ é ã |
{ "result" : 0, "product" : "Example System", "version" : "1.0.0" }
è«çå | ç©çå | ããŒã¿å | å¿ é | 説æ | |
---|---|---|---|---|---|
ãµãŒãã¹ID | serviceId | string | Yes | ã€ãã³ããéä¿¡ãããµãŒãã¹ã®ID | |
ãããã¡ã€ã«å | profile | string | Yes | ãããã¡ã€ã«åã | |
ã€ã³ã¿ãŒãã§ãŒã¹å | interface | string | Yes | ã€ã³ã¿ãŒãã§ãŒã¹åã | |
ã¢ããªãã¥ãŒãå | attribute | string | Yes | ã¢ããªãã¥ãŒãåã | |
KeyEvent | keyevent | object | Yes | KeyEventã®ãªããžã§ã¯ãã | |
æŒãããããããã¯é¢ãããæã®ç¶æ | state | string | Yes | up:Keyãé¢ãããã down:KeyãæŒãããã |
|
æŒãããããããã¯é¢ãããæã®Keyã®ID | id | integer | Yes | ãã§ã«æšæºåãããŠããKeyã®IDãããå Žåã¯ããã¡ããå©çšããããšã | |
æŒãããããããã¯é¢ãããæã®Keyã®Config | config | string | No | ç¹ã«Configããªãå Žåã¯ç©ºæåãè¿ãããšã |
{ "serviceId" : "Host.exampleId.localhost.deviceconnect.org", "profile" : "keyevent", "attribute" : "onkeychange", "keyevent" : { "state" : "up", "config" : "5", "id" : 149 } }
event
ããã€ã¹ã®ããŒãæŒãããããŸãã¯é¢ãããããšãéç¥ããã€ãã³ããåæ¢ããã
ã¹ããŒãããã€ã¹ã§ãµããŒãããŠããªããã©ã¡ãŒã¿ãããå Žåã«ã¯ã ãã®ãã©ã¡ãŒã¿ãçç¥ããã
ç©çå | ããŒã¿å | å¿ é | 説æ |
---|---|---|---|
serviceId | string | Yes | ãµãŒãã¹IDãååŸå¯Ÿè±¡ã¹ããŒãããã€ã¹ |
è«çå | ç©çå | ããŒã¿å | å¿ é | 説æ |
---|---|---|---|---|
åŠççµæ | result | integer | Yes | 0:æ£åžžå¿ç 0以å€:ç°åžžå¿ç |
ã·ã¹ãã å | product | string | Yes | DeviceConnectã·ã¹ãã ã®ååã |
ã·ã¹ãã ããŒãžã§ã³ | version | string | Yes | DeviceConnectã·ã¹ãã ã®ããŒãžã§ã³åã |
眲å | hmac | string | No | ã¬ã¹ãã³ã¹ã«å¯Ÿãã眲åã ã¢ããªã±ãŒã·ã§ã³åŽããäºåã«HMACããŒãå ±æãããŠããå Žåã¯å¿ é ã |
{ "result" : 0, "product" : "Example System", "version" : "1.0.0" }
one-shot
ããã€ã¹ã®ããŒãé¢ããããšãã®æ å ±ãååŸããã
ãã©ã°ã€ã³åŽã§ãã£ãã·ã¥ããŠããææ°ã®ã€ãã³ãã¡ãã»ãŒãžã1ã€ååŸããã
ç©çå | ããŒã¿å | å¿ é | 説æ |
---|---|---|---|
serviceId | string | Yes | ãµãŒãã¹IDãååŸå¯Ÿè±¡ã¹ããŒãããã€ã¹ |
è«çå | ç©çå | ããŒã¿å | å¿ é | 説æ | |
---|---|---|---|---|---|
åŠççµæ | result | integer | Yes | 0:æ£åžžå¿ç 0以å€:ç°åžžå¿ç |
|
ã·ã¹ãã å | product | string | Yes | DeviceConnectã·ã¹ãã ã®ååã | |
ã·ã¹ãã ããŒãžã§ã³ | version | string | Yes | DeviceConnectã·ã¹ãã ã®ããŒãžã§ã³åã | |
眲å | hmac | string | No | ã¬ã¹ãã³ã¹ã«å¯Ÿãã眲åã ã¢ããªã±ãŒã·ã§ã³åŽããäºåã«HMACããŒãå ±æãããŠããå Žåã¯å¿ é ã | |
KeyEvent | keyevent | object | Yes | KeyEventã®ãªããžã§ã¯ãã | |
æŒãããKeyã®ID | id | integer | Yes | ãã§ã«æšæºåãããŠããKeyã®IDãããå Žåã¯ããã¡ããå©çšããããšã | |
æŒãããKeyã®Config | config | string | No | ç¹ã«Configããªãå Žåã¯ç©ºæåãè¿ãããšã |
{ "result" : 0, "product" : "Example System", "version" : "1.0.0", "keyevent" : { "config" : "play", "id" : 672 } }
event
ããã€ã¹ã®ããŒãé¢ãããããšãéç¥ããã€ãã³ããéå§ããã
ã¹ããŒãããã€ã¹ã§ãµããŒãããŠããªããã©ã¡ãŒã¿ãããå Žåã«ã¯ã ãã®ãã©ã¡ãŒã¿ãçç¥ããã
ç©çå | ããŒã¿å | å¿ é | 説æ |
---|---|---|---|
serviceId | string | Yes | ãµãŒãã¹IDãååŸå¯Ÿè±¡ã¹ããŒãããã€ã¹ |
interval | long | No | ããã€ã¹ãã©ã°ã€ã³ãã€ãã³ããéä¿¡ããééã |
è«çå | ç©çå | ããŒã¿å | å¿ é | 説æ |
---|---|---|---|---|
åŠççµæ | result | integer | Yes | 0:æ£åžžå¿ç 0以å€:ç°åžžå¿ç |
ã·ã¹ãã å | product | string | Yes | DeviceConnectã·ã¹ãã ã®ååã |
ã·ã¹ãã ããŒãžã§ã³ | version | string | Yes | DeviceConnectã·ã¹ãã ã®ããŒãžã§ã³åã |
眲å | hmac | string | No | ã¬ã¹ãã³ã¹ã«å¯Ÿãã眲åã ã¢ããªã±ãŒã·ã§ã³åŽããäºåã«HMACããŒãå ±æãããŠããå Žåã¯å¿ é ã |
{ "result" : 0, "product" : "Example System", "version" : "1.0.0" }
è«çå | ç©çå | ããŒã¿å | å¿ é | 説æ | |
---|---|---|---|---|---|
ãµãŒãã¹ID | serviceId | string | Yes | ã€ãã³ããéä¿¡ãããµãŒãã¹ã®ID | |
ãããã¡ã€ã«å | profile | string | Yes | ãããã¡ã€ã«åã | |
ã€ã³ã¿ãŒãã§ãŒã¹å | interface | string | Yes | ã€ã³ã¿ãŒãã§ãŒã¹åã | |
ã¢ããªãã¥ãŒãå | attribute | string | Yes | ã¢ããªãã¥ãŒãåã | |
KeyEvent | keyevent | object | Yes | KeyEventã®ãªããžã§ã¯ãã | |
æŒãããKeyã®ID | id | integer | Yes | ãã§ã«æšæºåãããŠããKeyã®IDãããå Žåã¯ããã¡ããå©çšããããšã | |
æŒãããKeyã®Config | config | string | No | ç¹ã«Configããªãå Žåã¯ç©ºæåãè¿ãããšã |
{ "serviceId" : "Host.exampleId.localhost.deviceconnect.org", "profile" : "keyevent", "attribute" : "onup", "keyevent" : { "config" : "play", "id" : 672 } }
event
ããã€ã¹ã®ããŒãé¢ãããããšãéç¥ããã€ãã³ããåæ¢ããã
ã¹ããŒãããã€ã¹ã§ãµããŒãããŠããªããã©ã¡ãŒã¿ãããå Žåã«ã¯ã ãã®ãã©ã¡ãŒã¿ãçç¥ããã
ç©çå | ããŒã¿å | å¿ é | 説æ |
---|---|---|---|
serviceId | string | Yes | ãµãŒãã¹IDãååŸå¯Ÿè±¡ã¹ããŒãããã€ã¹ |
è«çå | ç©çå | ããŒã¿å | å¿ é | 説æ |
---|---|---|---|---|
åŠççµæ | result | integer | Yes | 0:æ£åžžå¿ç 0以å€:ç°åžžå¿ç |
ã·ã¹ãã å | product | string | Yes | DeviceConnectã·ã¹ãã ã®ååã |
ã·ã¹ãã ããŒãžã§ã³ | version | string | Yes | DeviceConnectã·ã¹ãã ã®ããŒãžã§ã³åã |
眲å | hmac | string | No | ã¬ã¹ãã³ã¹ã«å¯Ÿãã眲åã ã¢ããªã±ãŒã·ã§ã³åŽããäºåã«HMACããŒãå ±æãããŠããå Žåã¯å¿ é ã |
{ "result" : 0, "product" : "Example System", "version" : "1.0.0" }