-
Notifications
You must be signed in to change notification settings - Fork 3
/
api.json
84 lines (71 loc) · 1.49 KB
/
api.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// Base Information
// Listener->Server
// ID included to respond to a specific client
{
"idTo": 3, //#|0,
"type": "message|registration|info",
"message|registration|info": {}
}
// Controller->Server
// ID included to respond to a specific client
{
"idTo": 0,
"type": "message|registration",
"message|registration": {}
}
// Server -> Pebble
// channel is included in case requested channel is taken.
// in this case, assign a random one and send an informative
// message to the client.
{
"status": {
"connected": true,
"channel":"ABCD",
"message": null,
"connectedTo": []
}
}
// Server -> Mac
// Channel is included in case requested channel is taken.
// In this case, assign a random one and send an informative
// message to the client.
{
"status": {
"connected": true,
"channel":"ABCD",
"message": null,
"connectedTo": ["Pebble 2CB1"]
}
}
// Pebble -> Server
// Channel is included to request a specific channel.
// If already taken, assign a random channel that isn't
// taken.
{
"registration": {
"isListener": false,
"channel": "ABCD"
}
}
{
"message": {
"app": "iTunes",
"command": "next_track"
}
}
// Mac -> Server
{
"registration": {
"isListener": true,
"channel": "ABCD",
}
}
{
"message" : {
"title": "",
"subtitle": "",
"seek": "",
"volume": 0.76,
"anything":"else"
}
}