|
|
@ -150,7 +150,7 @@ public class BaseAppointment implements Appointment { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public JSONObject json() { |
|
|
|
public JSONObject json(String urlTemplate) { |
|
|
|
var json = new JSONObject(); |
|
|
|
var json = new JSONObject(); |
|
|
|
json.put("attachments", attachments.stream().map(Attachment::json).toList()); |
|
|
|
json.put("attachments", attachments.stream().map(Attachment::json).toList()); |
|
|
|
json.put("coords", nullable(coords).map(Coords::json).orElse(null)); |
|
|
|
json.put("coords", nullable(coords).map(Coords::json).orElse(null)); |
|
|
@ -162,7 +162,7 @@ public class BaseAppointment implements Appointment { |
|
|
|
json.put("tags", tags()); |
|
|
|
json.put("tags", tags()); |
|
|
|
json.put("title", title()); |
|
|
|
json.put("title", title()); |
|
|
|
json.put("links", links().stream().map(Link::json).toList()); |
|
|
|
json.put("links", links().stream().map(Link::json).toList()); |
|
|
|
|
|
|
|
json.put("url",urlTemplate.replace("{}",""+id())); |
|
|
|
return json; |
|
|
|
return json; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|