Te presentamos
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.
Búsquedas populares
http://geo-bot.appspot.com/_wave/robot/jsonrpc
ROOT
SELF
PARENT
CHILDREN
SIBLINGS
ALL
@Capability(contexts = {Context.ALL})
@Override
public void onWaveletSelfAdded(WaveletSelfAddedEvent event) {
// ...
}
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));
}
}
}
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