简体   繁体   English

Google Wave Sandbox

[英]Google Wave Sandbox

Is anyone developing robots and/or gadgets for Google Wave ? 是否有人为Google Wave开发机器人和/或小工具?

I have been a part of the sandbox development for a few days and I was interested in seeing what others have thought about the Google Wave APIs . 我已经成为沙盒开发的一部分了几天,我有兴趣了解其他人对Google Wave API的看法。

I was also wondering what everyone has been working on. 我也想知道每个人都在做什么。 Please share your opinions and comments! 请分享您的意见和评论!

Go to Google Wave developers and read the blogs, forums and all your questions will be answered including a recent post for a gallery of Wave apps. 转到Google Wave开发人员并阅读博客,论坛以及所有问题都将得到解答,其中包括Wave应用程序库的最新帖子。 You will also find other developers to play in the sandbox with. 您还可以找到其他开发人员在沙盒中玩。

I haven't tried the gadgets, but from the little I've looked at them, they seem pretty straight-forward. 我没有尝试过这些小工具,但从我看过它们的那些小东西来看,它们看起来非常简单。 They're implemented in a template-ish way and you can easily keep states in them, allowing more complex things such as RSVP lists and even games. 它们以模板方式实现,您可以轻松地在其中保存状态,允许更复杂的事情,如RSVP列表甚至游戏。

Robots are what I'm most interested in, and well, all I can say is that they're really easy to develop! 机器人是我最感兴趣的,好吧,我只能说它们很容易开发! Like barely any effort at all! 就像几乎没有任何努力! Heck, I'll code one for you right here: 哎呀,我会在这里为你编码:

import waveapi.events
import waveapi.robot

def OnBlipSubmitted(properties, context):
    # Get the blip that was just submitted.
    blip = context.GetBlipById(properties['blipId'])
    # Respond to the blip (i.e. create a child blip)
    blip.CreateChild().GetDocument().SetText('That\'s so funny!')

def OnRobotAdded(properties, context):
    # Add a message to the end of the wavelet.
    wavelet = context.GetRootWavelet()
    wavelet.CreateBlip().GetDocument().SetText('Heeeeey everybody!')

if __name__ == '__main__':
    # Register the robot.
    bot = waveapi.robot.Robot(
        'The Annoying Bot',
        image_url='http://example.com/annoying-image.gif',
        version='1.0',
        profile_url='http://example.com/')
    bot.RegisterHandler(waveapi.events.BLIP_SUBMITTED, OnBlipSubmitted)
    bot.RegisterHandler(waveapi.events.WAVELET_SELF_ADDED, OnRobotAdded)
    bot.Run()

Right now I'm working on a Google App Engine project that's going to be a collaborative text adventure game. 现在我正在开发一个Google App Engine项目,这个项目将成为一个协作文本冒险游戏。 For this game I made a bot that lets you play it on Wave. 对于这个游戏,我制作了一个机器人,让你在Wave上播放它。 It uses Wave's threading of blips to let you branch the game at any point etc. For more info, have a look at the Google Code project page (scroll down a little bit for a screenshot.) 它使用Wave的blips线程来让你在任何时候分支游戏等。有关更多信息,请查看Google Code项目页面 (向下滚动一下以获取屏幕截图。)

I have been working on Gadgets, using the Wave API . 我一直在使用Wave API处理小工具。 It's pretty easy to work with. 这很容易使用。 For the most part, you can use javascript inside an XML file. 在大多数情况下,您可以在XML文件中使用javascript。 You just need to have the proper tags for the XML file. 您只需要为XML文件提供适当的标记即可。 Below is a sample of what a Gadget would look like, this particular gadget retrieves the top headlines from Slashdot and displays them at the top of the Wave. 下面是Gadget的样子,这个特殊的小工具从Slashdot中检索顶部标题,并将其显示在Wave的顶部。 You can learn more about Gadgets here and here . 您可以在此处此处了解有关小工具的更多信息。 alt text http://www.m1cr0sux0r.com/xml.jpg 替代文字http://www.m1cr0sux0r.com/xml.jpg

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM