Links are stored as annotations. You should search through the annotations for keys that are either "link/manual" or "link/auto". More information on annotations is here: http://code.google.com/apis/wave/extensions/robots/index.html#Annotations
- pamela On Tue, Dec 15, 2009 at 9:15 AM, Dean C <[email protected]> wrote: > It seems I had to delete the bot from the wave, and re-add it to the > wave to trigger it using the new version. It now appears to be working > correctly. But one follow up question: I want to extract any links the > user posts on a blip. Should I be looking for <a...>link</a> syntax in > the blip? > > On Dec 14, 1:38 am, MiloDC <[email protected]> wrote: > > Blip blip = e.getBlip(); > > TextView textView = blip.getDocument(); > > textView.delete(); > > textView.append("test"); > > > > On Dec 12, 6:52 am, Dean C <[email protected]> wrote: > > > > > > > > > I am trying to get my robot to take a users blip and edit the text. > > > For testing purposes I'm simply trying to replace all the text that > > > they typed with my own. I am using the following code: > > > > > public void processEvents(RobotMessageBundle bundle) > > > { > > > // get the wavelet > > > Wavelet wavelet = bundle.getWavelet(); > > > > > // otherwise iterate through our bundle of events > > > for (Event e: bundle.getEvents()) > > > { > > > if (e.getType() == EventType.BLIP_SUBMITTED) > > > { > > > // get the creator of the blip > > > String blipSubmitter = e.getBlip().getCreator(); > > > > > // get the blip > > > Blip blip = e.getBlip(); > > > TextView textView = blip.getDocument(); > > > > > // get what the user entered > > > String userInput = textView.getText(); > > > > > textView.replace("test"); > > > > > } > > > } > > > } > > > > > Unfortunately, it's simply not replacing the users input with my test > > > string. Any ideas why? I am sure it is something obvious and simple :) > > -- > > You received this message because you are subscribed to the Google Groups > "Google Wave API" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-wave-api%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-wave-api?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Google Wave API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en.
