Search code examples
eventsgroovygoogle-calendar-apimissingmethodexception

reading Google calendar values


I have set an event successfully using

myEntry.setTitle(new PlainTextConstruct("TEST"))
myEntry.setContent(new PlainTextConstruct("See how much text will fit in there"))

Then I have successfully read the event record.

This works

myTitle = ret.getTitle().getPlainText()

But this throws an error

myTitle = ret.getContent().getPlainText()

groovy.lang.MissingMethodException: No signature of method:
com.google.gdata.data.TextContent.getPlainText()

No better if I make it

myTitle = req.getContent().toString()

Any ideas what I have missed??


Solution

  • Try:

    myContent = ret.getTextContent()
    

    or:

    myContent = ret.getPlainTextContent()