谷歌Wave沙盒

发布于 2024-07-27 16:56:26 字数 268 浏览 7 评论 0原文

有人在为 Google Wave 开发机器人和/或小工具吗?

我参与沙箱开发已有几天了,我有兴趣了解其他人对 Google Wave API

我也想知道大家都在做什么。 请分享您的意见和评论!

Is anyone developing robots and/or gadgets for 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.

I was also wondering what everyone has been working on. Please share your opinions and comments!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

2024-08-03 16:56:26

我还没有尝试过这些小工具,但从我对它们的观察来看,它们看起来非常简单。 它们以类似模板的方式实现,您可以轻松地在其中保留状态,从而允许更复杂的事情,例如 RSVP 列表甚至游戏。

机器人是我最感兴趣的,而且我只能说它们真的很容易开发! 就像几乎没有任何努力一样! 哎呀,我将在这里为您编写一个代码:

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()

现在我正在开发一个 Google App Engine 项目,该项目将是一款协作文本冒险游戏。 对于这个游戏,我制作了一个机器人,可以让你在 Wave 上玩它。 它使用 Wave 的 blip 线程来让您在任意点等处对游戏进行分支。有关详细信息,请查看 Google 代码项目页面(向下滚动一点查看屏幕截图。)

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.

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. For this game I made a bot that lets you play it on 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.)

嘿嘿嘿 2024-08-03 16:56:26

前往 Google Wave 开发者并阅读博客、论坛,您的所有问题都将得到解答,包括最近发布了一篇有关 Wave 应用程序库的文章。 您还会发现其他开发人员可以在沙盒中一起玩。

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. You will also find other developers to play in the sandbox with.

南渊 2024-08-03 16:56:26

我一直在使用 Wave API 开发小工具。 它非常容易使用。 大多数情况下,您可以在 XML 文件中使用 javascript。 您只需要为 XML 文件添加适当的标签即可。 下面是一个小工具的示例,这个特定的小工具从 Slashdot 检索热门标题并将其显示在波浪的顶部。 您可以在此处此处
替代文本 http://www.m1cr0sux0r.com/xml.jpg

I have been working on Gadgets, using the Wave API. It's pretty easy to work with. For the most part, you can use javascript inside an XML file. You just need to have the proper tags for the XML file. 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. You can learn more about Gadgets here and here.
alt text http://www.m1cr0sux0r.com/xml.jpg

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文