Hello,
I have managed to create a card from my web application (in JAVA)
try (CloseableHttpClient httpClient = HttpClients.createDefault()) {
HttpPost post = new HttpPost("https://api.trello.com/1/cards");
List<NameValuePair> urlParameters = new ArrayList<>();
urlParameters.add(new BasicNameValuePair("key", "#######"));
urlParameters.add(new BasicNameValuePair("token", "#######"));
urlParameters.add(new BasicNameValuePair("idList", "#######"));
urlParameters.add(new BasicNameValuePair("name", "my title"));
urlParameters.add(new BasicNameValuePair("desc", "my description"));
urlParameters.add(new BasicNameValuePair("due", "2020-08-01"));
post.setEntity(new UrlEncodedFormEntity(urlParameters, "UTF-8"));
try (CloseableHttpResponse response = httpClient.execute(post)) {
responseCode = response.getStatusLine().getStatusCode();
}
}
Do you have an example how can I attach also images in the card in JAVA?
@Yaylitzis I've never been able to make actual file uploads work, it seems that even natively file uploads are actually just represented as links.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.