Added the submissions list method

5 views
Skip to first unread message

Michel Jonker

unread,
Jun 7, 2011, 3:55:32 PM6/7/11
to Google Moderator API
I found that the Moderator class did have list methods for series,
votes and topics.
The submissions innerclass missed this operation, so I added it to my
local source code, I applied the same construct as I found it in the
other inner classes.

Now this piece of code works :

HttpTransport transport = new NetHttpTransport();
JsonFactory jsonfactory = new GsonFactory();
Moderator moderator = new Moderator("MyModeratorApp", transport,
jsonfactory);

try{

List Sumblist = moderator.submissions.list(570414, 64);
SubmissionList submissionList = Sumblist.execute();

for (Iterator iterator = submissionList.items.iterator();
iterator.hasNext();) {
Submission subm = (Submission) iterator.next();

System.out.println(subm.text);
System.out.println(subm.attachmentUrl);
System.out.println("\n");

}

} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Reply all
Reply to author
Forward
0 new messages