In
an application, you first need to collect from the user the information
needed to create or update the meeting, such as the meeting name,
date, time, and so on. With that information, use a method such
as
updateSco
that calls the
sco-update
action.
In
sco-update
, be sure to set the
type
of
the SCO to
meeting
. As an option, you can also
set a language code for the meeting room, such as
lang=en
,
for example:
https://example.com/api/xml?action=sco-update&folder-id=2006258750
&description=nov&name=Nov%20All%20Hands%20Meeting&type=meeting&lang=en
&date-begin=2006-11-11T09:00&date-end=2006-11-11T17:00
The
updateSCO
method shows how to implement
the
sco-update
call in Java, once you collect information
about the meeting from the user:
public String updateSCO(String action, SCO sco) throws XMLApiException {
try {
StringBuffer sb = new StringBuffer();
Map data = sco.getUpdateFields();
if (CREATE.equals(action))
sb.append("folder-id=" + sco.getFolderId());
else
sb.append("sco-id=" + sco.getId());
Iterator iter = data.keySet().iterator();
while (iter.hasNext()) {
String key = (String) iter.next();
if (key.indexOf("sco-id") != -1)
continue;
if (key.indexOf("folder-id") != -1)
continue;
String value = (String) data.get(key);
sb.append("&" + key + "=" + value);
}
if (null == data.get("type"))
throw new XMLApiException("SCO type not defined");
Element e = request("sco-update", sb.toString());
XPath scoId = XPath.newInstance("//results/sco/@sco-id");
if (scoId.valueOf(e) == null)
return null;
else
return scoId.valueOf(e);
} catch (JDOMException jde) {
throw new XMLApiException(PARSE_ERROR, jde);
} catch (ParseException pe) {
throw new XMLApiException(PARSE_ERROR, pe);
}
}