I don't think you need to tweak the API. Just add one handler script
for the web application and one for the Wave robot in your app.yaml.

- url: /_wave/.*
  script: friendly_robot.py

- url: .*
  script: main.py

Andi


On Sun, Sep 13, 2009 at 7:13 PM, Nash-t <[email protected]> wrote:
>
> @Daniel
>  Are you from Google? I didn't have to do any of that and
> smw.appspot.org seems to run fine as a gwave robot and regular
> application (and uses xmpp).
>
> I have a public wave you can try it out. Here is  a  FAQ entry with
> some details.
>
> http://www.sanmateowaveforms.com/Home/faq2/howtouseawaveformongooglewave
>
> Did anyone else have to make modifications like this to get it to
> work?
>
> -Tim
>
>
> On Sep 12, 9:56 pm, Daniel Faust <[email protected]> wrote:
>> Yes, this is possible.
>>
>> [email protected] does this, it uses HTML to allow signed-up users
>> configure their settings, save them in the datastore, and also use the
>> new xmpp functionality.
>>
>> You need to tweak the API a bit:
>>
>> Your main py file will contain
>>
>> if __name__ == '__main__':
>>   appHandler = [('/', WebHome)]
>>   appHandler.append(('/about', WebAbout))
>>   appHandler.append(('/message', WebMessage))
>>   appHandler.append(('/settings', WebSettings))
>>   appHandler.append(('/subscribe', WebSubscribe))
>>   appHandler.append(('/unsubscribe', WebUnsubscribe))
>>   appHandler.append(('/jid', WebJid))
>>   appHandler.append(('/wave', WebWave))
>>   appHandler.append(('/_ah/xmpp/message/chat/', XMPPHandler))
>>   botInstance = robot.Robot('XMPP', '5', image_url = 'http://wave-
>> xmpp.appspot.com/public/image.png', profile_url = 'http://wave-
>> xmpp.appspot.com/public/profile.htm')
>>   botInstance.RegisterHandler(events.WAVELET_SELF_ADDED,
>> OnRobotAdded)
>>   botInstance.RegisterHandler(events.BLIP_SUBMITTED,
>> OnBlipSubmitted)
>>   botInstance.RegisterHandler(events.FORM_BUTTON_CLICKED,
>> OnFormButtonClicked)
>>   botInstance.Run(appHandler, debug=True)
>>
>> while in the waveapi/robot.py you need to chage the Run procedure as
>> follows:
>>
>>   def Run(self, myHandlers, debug=False):
>>     """Sets up the webapp handlers for this robot and starts
>> listening.
>>
>>     Args:
>>       debug: Optional variable that defaults to False and is passed
>> through
>>           to the webapp application to determine if it should show
>> debug info.
>>     """
>>     # App Engine expects to construct a class with no arguments, so we
>>     # pass a lambda that constructs the appropriate handler with
>>     # arguments from the enclosing scope.
>>     myHandlers.append(('/_wave/capabilities.xml', lambda:
>> RobotCapabilitiesHandler(self)))
>>     myHandlers.append(('/_wave/robot/profile', lambda:
>> RobotProfileHandler(self)))
>>     myHandlers.append(('/_wave/robot/jsonrpc', lambda:
>> RobotEventHandler(self)))
>>     app = webapp.WSGIApplication(myHandlers, debug=debug)
>>     '''
>>     app = webapp.WSGIApplication([
>>         ('/_wave/capabilities.xml', lambda: RobotCapabilitiesHandler
>> (self)),
>>         ('/_wave/robot/profile', lambda: RobotProfileHandler(self)),
>>         ('/_wave/robot/jsonrpc', lambda: RobotEventHandler(self)),
>>     ], debug=debug)
>>     '''
>>     run_wsgi_app(app)
> >
>

--~--~---------~--~----~------------~-------~--~----~
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