@@ -52,6 +52,51 @@ <h2>Remove Indexes</h2>
52
52
< p > You can now check if the new package_index was removed by repeating List Indexes.</ p >
53
53
54
54
55
+ < h1 > Tools</ h1 >
56
+ < p > A tool is an executable that can be used to program a board.</ p >
57
+
58
+ < p > tools are saved in the folder < code > ~/.arduino-create</ code > with a structure like < code > {packager}/{name}/{version}</ code > </ p >
59
+
60
+ < h2 > List Available Tools</ h2 >
61
+ < p > You can list the available tools that could be installed from an index with this simple GET. (Remember to add
62
+ indexes)</ p >
63
+ < textarea cols ="100 " id ="toolsAvailable ">
64
+ fetch('http://localhost:8991/v2/pkgs/tools/available')
65
+ </ textarea > < br >
66
+ < textarea cols ="100 " rows ="10 " id ="toolsAvailableRes "> </ textarea > < br >
67
+ < button onclick ="tryCode('toolsAvailable', 'toolsAvailableRes'); "> Try</ button >
68
+
69
+ < h2 > List Installed Tools</ h2 >
70
+ < p > You can list the tools installed in the system with this simple GET</ p >
71
+ < textarea cols ="100 " id ="toolsList ">
72
+ fetch('http://localhost:8991/v2/pkgs/tools/installed')
73
+ </ textarea > < br >
74
+ < textarea cols ="100 " rows ="10 " id ="toolsListRes "> </ textarea > < br >
75
+ < button onclick ="tryCode('toolsList', 'toolsListRes'); "> Try</ button >
76
+
77
+
78
+ < h2 > Install a tool from an index file</ h2 >
79
+ < p > You can install one of the available tools with a PUT request</ p >
80
+ < textarea cols ="100 " rows ="5 " id ="toolsInstall ">
81
+ fetch('http://localhost:8991/v2/pkgs/tools/installed', {
82
+ method: "PUT",
83
+ body: '{"name":"sketchUploader","version":"1.6.2+1.0","packager":"Intel"}'
84
+ })
85
+ </ textarea > < br >
86
+ < textarea cols ="100 " rows ="10 " id ="toolsInstallRes "> </ textarea > < br >
87
+ < button onclick ="tryCode('toolsInstall', 'toolsInstallRes'); "> Try</ button >
88
+
89
+
90
+ < h2 > Remove an installed tool</ h2 >
91
+ < p > You can remove one of the installed tools with a DELETE request</ p >
92
+ < textarea cols ="100 " rows ="5 " id ="toolsRemove ">
93
+ fetch('http://localhost:8991/v2/pkgs/tools/installed/Intel/sketchUploader/1.6.2+1.0', {
94
+ method: "DELETE",
95
+ })
96
+ </ textarea > < br >
97
+ < textarea cols ="100 " rows ="10 " id ="toolsRemoveRes "> </ textarea > < br >
98
+ < button onclick ="tryCode('toolsRemove', 'toolsRemoveRes'); "> Try</ button >
99
+
55
100
</ body >
56
101
57
102
< script >
0 commit comments