Ok so I tried to use this but then my bot didn't even work anymore
(show it's name, icon or do actions that I did not change). I then
deleted the code and changed it back but even now the same thing
happens. It was working yesterday now even if I go to
myname.appspot.com/_wave/capabilities.xml It says 500 server error.
WHAT DID I DO?!?

On Nov 27, 3:49 am, hvt_kg <[email protected]> wrote:
> Hi Bryan,
>
> I have not experience with python. But  i think line below can help
> you:
> .....
> for (Event event : robotMessageBundle.getEvents()) {
>                         TextView document = event.getBlip().getDocument();
>                         if (event.getType() == EventType.BLIP_SUBMITTED) {
>                                         String sender = 
> event.getModifiedBy();}
>
> ......
> thanks,
> Alex
>
> On Nov 27, 12:08 pm, Bryan <[email protected]> wrote:
>
> > Hello,
> > I am using the python sdk to make a robot and currently I have:
>
> > from waveapi import events
> > from waveapi import model
> > from waveapi import robot
>
> > def OnParticipantsChanged(properties, context):
> >   """Invoked when any participants have been added/removed."""
> >   added = properties['participantsAdded']
> >   for p in added:
> >     Notify(context)
>
> > def OnRobotAdded(properties, context):
> >   """Invoked when the robot has been added."""
> >   root_wavelet = context.GetRootWavelet()
> >   root_wavelet.CreateBlip().GetDocument().SetText("I'm alive!")
>
> > def OnBlipSubmitted(properties, context):
> >   """Invoked when any blip we are interested in is submitted."""
> >   root_wavelet = context.GetRootWavelet()
> >   root_wavelet.CreateBlip().GetDocument().SetText("I'm alive!")
>
> > def Notify(context):
> >   root_wavelet = context.GetRootWavelet()
> >   root_wavelet.CreateBlip().GetDocument().SetText("New Comment")
>
> > if __name__ == '__main__':
> >   myRobot = robot.Robot('Push Notifications Bot',
> >       image_url='http://clappsapps.net/icon.png',
> >       version='9',
> >       profile_url='http://clappswavebot.appspot.com/profile')
> >   myRobot.RegisterHandler(events.WAVELET_PARTICIPANTS_CHANGED,
> > OnParticipantsChanged)
> >   myRobot.RegisterHandler(events.WAVELET_SELF_ADDED, OnRobotAdded)
> >   myRobot.RegisterHandler(events.BLIP_SUBMITTED, OnBlipSubmitted)
> >   myRobot.Run()
>
> > as my code.
> > Basically a very small change to the tutorial. What I want to do is
> > get the text and the user name of the person who submitted the blip in
> > the OnBlipSubmitted method. How exactly would I go about doing this.
> > Ive been looking through samples and documentation but I can't seem to
> > find anything that works.
>
> > Thank you,
> > Bryan

--

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.


Reply via email to