18 lines
473 B
Java
18 lines
473 B
Java
/* © SRSoftware 2026 */
|
|
package de.srsoftware.cal.api;
|
|
|
|
import java.net.URL;
|
|
import java.util.Map;
|
|
import org.json.JSONObject;
|
|
|
|
/**
|
|
* Links are additional content that may be added to appointments
|
|
* @param url the URL of the link
|
|
* @param desciption some information about the target of the link
|
|
*/
|
|
public record Link(URL url, String desciption) {
|
|
public JSONObject json() {
|
|
return new JSONObject(Map.of("description", desciption(), "url", url().toString()));
|
|
}
|
|
}
|