Te presentamos 

Prezi AI.

Tu nuevo asistente de presentaciones.

Perfecciona, mejora y adapta tus contenidos, busca imágenes relevantes y edita elementos visuales más rápido que nunca.

Cargando…
Transcripción

http://geo-bot.appspot.com/_wave/robot/jsonrpc

Context

ROOT

SELF

PARENT

CHILDREN

SIBLINGS

ALL

@Capability(contexts = {Context.ALL})

@Override

public void onWaveletSelfAdded(WaveletSelfAddedEvent event) {

// ...

}

Filters

Operations

Active

Proxying-For

Google Wave

Robots

Wave

Events

Operations

Robot

"events": [

{

"type": "WAVELET_SELF_ADDED",

"modifiedBy": "pamela.fox@wavesandbox.com",

"timestamp": 1269400482868,

"properties": {

"blipId": "b+FYYeTpCXJ"

}

}

],

"wavelet": {

"creationTime": 1269400451853,

"lastModifiedTime": 1269400482868,

"version": 14,

"participants": [

"pamela.fox@wavesandbox.com",

"wave-skimmy@appspot.com"

],

"creator": "pamela.fox@wavesandbox.com",

"rootBlipId": "b+FYYeTpCXJ",

"title": "Dear Diary,",

"waveId": "wavesandbox.com!w+FYYeTpCXI",

"waveletId": "wavesandbox.com!conv+root"

},

{"params": {

"blipId": "b+FYYeTpCXJ",

"waveletId": "wavesandbox.com!conv+root",

"waveId": "wavesandbox.com!w+FYYeTpCXI",

"modifyAction": {

"modifyHow": "REPLACE",

"elements": [

{

"type": "IMAGE",

"properties": {

"url": "http://wave-skimmy.appspot.com/smile.gif"

}

}

]

},

"modifyQuery": {

"textMatch": ":)",

"maxRes": -1

}

},

"method": "document.modify",

"id": "op2"

}

package skimmy;

import com.google.wave.api.*;

import com.google.wave.api.event.*;

import java.util.*;

public class SkimmyServlet extends AbstractRobot {

public static String animBase = "http://wave-skimmy.appspot.com/";

public static String animExt = ".gif";

public static HashMap<String, String> replacements = new HashMap();

public static void main() {

replacements.put(":)", new String("smile"));

replacements.put(":(", "frown");

replacements.put("<3", "heart");

}

@Override

protected String getRobotName() {

return "Parroty";

}

@Override

protected String getRobotAvatarUrl() {

return "http://code.google.com/apis/wave/extensions/robots/images/robot_avatar.png";

}

@Override

protected String getRobotProfilePageUrl() {

return "http://code.google.com/apis/wave/extensions/robots/java-tutorial.html";

}

@Override

public void onWaveletSelfAdded(WaveletSelfAddedEvent event) {

processBlip(event.getBlip());

}

@Override

public void onBlipSubmitted(BlipSubmittedEvent event) {

processBlip(event.getBlip());

}

public void processBlip(Blip blip) {

Set set = replacements.entrySet();

Iterator i = set.iterator();

while(i.hasNext()) {

Map.Entry me = (Map.Entry)i.next();

String ascii = (String) me.getKey();

String filename = (String)me.getValue();

String url = animBase + filename + animExt;

blip.all(ascii).replace(new Image(url, filename));

}

}

}

Events

wavelet.appendBlip

wavelet.setTitle

wavelet.participant.add

wavelet.datadoc.set

wavelet.modifyTag

blip.createChild

blip.delete

document.appendMarkup

document.inlineBlip.insert

document.modify

robot.createWavelet

robot.fetchWave

robot.notifyCapabilitiesHash

WAVELET_BLIP_CREATED

WAVELET_BLIP_REMOVED

WAVELET_PARTICIPANTS_CHANGED

WAVELET_SELF_ADDED

WAVELET_SELF_REMOVED

WAVELET_TITLE_CHANGED

BLIP_CONTRIBUTORS_CHANGED

BLIP_SUBMITTED

DOCUMENT_CHANGED

FORM_BUTTON_CLICKED

GADGET_STATE_CHANGED

ANNOTATED_TEXT_CHANGED

wavelet.proxyFor("douwe").reply("Taking the Ferry..");

@Capability(filter = "\\[\\[.*\\]\\]")

@Override

public void onDocumentChanged(DocumentChangedEvent event) {

...

}

@Override

protected ParticipantProfile getCustomProfile(String name) {

if (name.equals("douwe")) {

return new ParticipantProfile("Douwe",

"http://a1.twimg.com/77215846/square.png",

"http://twitter.com/dosinga");

}

}

public MyRobot() {

myRobot.setupOAuth(CONSUMER_KEY, CONSUMER_SECRET, "http://sandbox.gmodules.com/api/rpc");

}

Wavelet wave = robot.newWave("wavesandbox.com",

Arrays.asList("someguy@wavesandbox.com"));

wave = robot.fetchWave("wavesandbox.com!w+QjPzTWBUI",

"wavesandbox.com!conv+root");

wave.getRootBlip().append("New data");

Buggy

Forum Botty

Descubre cómo crear presentaciones más dinámicas e interesantes con Prezi