mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-20 14:54:31 +01:00
update API to v1
This commit is contained in:
parent
efc07a1c0e
commit
29e79c8157
@ -123,6 +123,10 @@ public abstract class InstallerJDialog<T> extends JDialog {
|
||||
contribTable.getCellEditor().stopCellEditing();
|
||||
}
|
||||
updateIndexFilter(filters, categoryFilter);
|
||||
if (contribModel.getRowCount() == 1) {
|
||||
// TODO: understand why it doesn't work
|
||||
//contribTable.addRowSelectionInterval(0, 0);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -205,9 +205,8 @@ public class Platform {
|
||||
// this method is less useful in Windows < WIN10 since you need drivers to be already installed
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
URLConnection con;
|
||||
try {
|
||||
URL jsonUrl = new URL("http", "api-builder.arduino.cc", 80, "/builder/boards/0x"+vid+"/0x"+pid);
|
||||
URL jsonUrl = new URL("http", "api-builder.arduino.cc", 80, "/builder/v1/boards/0x"+vid+"/0x"+pid);
|
||||
URLConnection connection = jsonUrl.openConnection();
|
||||
connection.connect();
|
||||
HttpURLConnection httpConnection = (HttpURLConnection) connection;
|
||||
@ -219,8 +218,9 @@ public class Platform {
|
||||
BoardCloudAPIid board = mapper.readValue(is, BoardCloudAPIid.class);
|
||||
// Launch a popup with a link to boardmanager#board.getName()
|
||||
// replace spaces with &
|
||||
String boardNameReplaced = board.getName().replaceAll(" ", "&");
|
||||
String message = I18n.format(tr("{0}Install{1} the package to use your {2}"), "<a href=\"http://boardsmanager/all#"+boardNameReplaced+"\">", "</a>", board.getName());
|
||||
String realBoardName = board.getName().replaceAll("\\(.*?\\)", "").trim();
|
||||
String boardNameReplaced = realBoardName.replaceAll(" ", "&");
|
||||
String message = I18n.format(tr("{0}Install{1} the package to use your {2}"), "<a href=\"http://boardsmanager/all#"+boardNameReplaced+"\">", "</a>", realBoardName);
|
||||
BaseNoGui.setBoardManagerLink(message);
|
||||
} catch (Exception e) {
|
||||
// No connection no problem, fail silently
|
||||
|
Loading…
x
Reference in New Issue
Block a user