You may want to list a user’s meetings in your application. You can choose the meetings to list and the information to display based on your application design. This illustration shows one example of a meeting list:
To list a user’s meetings using the XML API, call report-my-meetings with or without a filter. Without a filter, report-my-meetings returns all of a user’s meetings:
https://example.com/api/xml?action=report-my-meetings
You can add filter-expired=false to return only meetings that are currently in progress and scheduled in the future:
https://example.com/api/xml?action=report-my-meetings&filter-expired=false
Even with a filter, the response is likely to have multiple meeting elements that you need to iterate through and extract data from. A meeting element looks like this:
<meeting sco-id="2007063179" type="meeting" icon="meeting" permission-id="host" active-participants="0"> <name>September All Hands Meeting</name> <description>For all company employees</description> <domain-name>example.com</domain-name> <url-path>/sept15/</url-path> <date-begin>2006-09-15T09:00:00.000-07:00</date-begin> <date-end>2006-09-15T18:00:00.000-07:00</date-end> <expired>false</expired> <duration>09:00:00.000</duration> </meeting>
Get the meeting list
To get the meeting list in Java, write a method like getMyMeetings, which lists a user’s meetings with a filter as an argument. If you don’t want to use a filter, you can pass null as the filter argument. A meeting is a SCO, so getMyMeetings calls the getSco method to extract values from the response and store them in an instance of SCO.java.
public List getMyMeetings(String filter) throws XMLApiException { try { Element meetingDoc = request("report-my-meetings", filter); List list = XPath.selectNodes(meetingDoc, "//meeting"); Iterator meetings = list.iterator(); List result = new ArrayList(); while (meetings.hasNext()) { Element m = (Element) meetings.next(); SCO meeting = getSco(m); result.add(meeting); } return result; } catch (JDOMException jde) { throw new XMLApiException(PARSE_ERROR, jde); } }
The SCO object encapsulates data about the SCO so you can easily retrieve it from a web page (for example, HTML or JSP) in your application.