-
Notifications
You must be signed in to change notification settings - Fork 38
/
mappings.json
242 lines (223 loc) · 7.51 KB
/
mappings.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
{
"_commands": [
"setup",
"list",
"call",
"get",
"device",
"identify",
"flash",
"subscribe",
"compile",
"monitor",
"login",
"logout",
"help"
],
"call": {
"maps": [ "function", "call" ],
"usage": "spark call device_id function_name argument",
"does": [
"Calls a function registered on one of your Devices",
"",
"More information about registering a variable available here: ",
"http://docs.spark.io/#/firmware/data-and-control-spark-variable"
],
"related": [
"list - shows your devices, and what variables and functions are available",
"get - retrieves a variable value from one of your Devices"
]
},
"get": {
"maps": [ "variable", "get" ],
"usage": "spark get device_id variable_name",
"does": [
"Retrieves a variable value from your device",
"",
"More information about registering a variable available here: ",
"http://docs.spark.io/#/firmware/data-and-control-spark-variable"
],
"related": [
"list - shows your devices, and what variables and functions are available",
"call - runs a registered function on one of your devices"
]
},
"help": {
"maps": [ "help" ],
"usage": [
"spark help",
"spark help command_name"
],
"does": [
"Provides extra details and options for a given command"
]
},
"setup": {
"maps": [ "setup" ],
"usage": "spark setup",
"does": [
"Guides you through setting up an account, claiming a new device, and getting it on your network"
]
},
"identify": {
"maps": [ "serial", "identify" ],
"usage": "spark identify",
"does": [
"When your device is in connected via USB and in listening mode (flashing blue)",
"this asks your device for its device ID"
]
},
"list": {
"maps": [ "cloud", "list" ],
"usage": "spark list",
"does": [
"Displays a list of your devices, as well as their variables and functions"
]
},
"core": {
"_commands": [ "add", "remove", "rename" ],
"add": {
"maps": [ "cloud", "claim" ],
"usage": "spark core add core_id",
"does": "claims a core to your account"
},
"remove": {
"maps": [ "cloud", "remove" ],
"usage": "spark core remove core_id",
"does": "releases a core from your account"
},
"rename": {
"maps": [ "cloud", "name" ],
"usage": "spark core rename core_id name",
"does": "changes the friendly name of your core"
}
},
"device": {
"_commands": [ "add", "remove", "rename" ],
"add": {
"maps": [ "cloud", "claim" ],
"usage": "spark device add device_id",
"does": "claims a device to your account"
},
"remove": {
"maps": [ "cloud", "remove" ],
"usage": "spark device remove device_id",
"does": "releases a device from your account"
},
"rename": {
"maps": [ "cloud", "name" ],
"usage": "spark device rename device_id name",
"does": "changes the friendly name of your device"
}
},
"flash": {
"maps": [ "flash", "*" ],
"usage": [
"spark flash [--usb or device_id] firmware.bin",
"spark flash [--usb or device_id] source_folder",
"spark flash [--usb or device_id] file1.ino file2.cpp file2.h file3.cpp"
],
"does": [
"flash remotely pushes a compiled firmware binary to one of your devices over the air, or directly",
"over USB / dfu. If you send it one or more source files, or a directory of source, it will compile",
"that remotely first, and push the compiled binary to your device instead, or in the case of code errors",
"will show you the errors from the server.",
"",
"You can also substitute \"tinker\", \"voodoo\", or \"cc3000\" to flash the provided app.",
"",
"spark flash --usb tinker",
"spark flash my_device tinker"
]
},
"subscribe": {
"maps": [ "subscribe" ],
"does": [
"Subscribes to published events on the cloud, and pipes them to the console. Special device name \"mine\" will subscribe to events from just your devices."
],
"usage": [
"spark subscribe",
"spark subscribe mine",
"spark subscribe event_name",
"spark subscribe event_name mine",
"spark subscribe event_name device_id"
]
},
"compile": {
"maps": [ "cloud", "compile" ],
"usage": [
"spark compile firmware.bin",
"spark compile source_folder",
"spark compile file1.ino file2.cpp file2.h file3.cpp"
],
"does": [
"Compiles one or more source files or a directory of source to a firmware binary for your device,",
"or in the case of code errors will display those instead."
]
},
"monitor": {
"maps": [ "variable", "monitor" ],
"usage": [
"spark monitor variable_name [--time]",
"spark monitor device_name variable_name [--time]",
"spark monitor device_name variable_name delay_value [--time]"
],
"does": [
"Repeatedly queries the Spark API every delay_value milliseconds",
"for the value of the given variable on one or more devices."
]
},
"login": {
"maps": [ "cloud", "login" ],
"usage": "spark login",
"does": [
"Login and save an access token for interacting with your account on the Spark Cloud."
]
},
"logout": {
"maps": [ "cloud", "logout" ],
"usage": "spark logout",
"does": [
"Logout and optionally revoke the access token for your CLI session."
]
},
"publish": {
"maps": [ "publish" ],
"usage": [
"spark publish event_name",
"spark publish event_name some_data"
],
"does": [
"Note! This command is part of a limited experimental beta, but should become available",
"available during the summer. The API endpoints or format may change before it's released.",
"",
"Publishes an event to the cloud that can be received by your devices or other subscribers"
]
},
"nyan": {
"maps": [ "cloud", "nyan" ],
"usage": [
"spark cloud nyan",
"spark cloud nyan my_device_id on",
"spark cloud nyan my_device_id off",
"spark cloud nyan all on",
"spark cloud nyan [on/off]",
"spark cloud nyan [device_id/all] [on/off]"
],
"does": [
"That's weird, huh, I guess the description for this mysterious command is missing..."
]
},
"--version": {
"maps": [ "help", "version" ],
"usage": [
"spark --version",
"spark help version"
],
"does": [
"Shows the current version of the CLI"
]
},
"_templates": {
"help": null
}
}