1 / 10

Wave Actionscript API (wave-as-client)

Wave Actionscript API (wave-as-client). Sung Wu 2009/06/07. Agenda. Intro Architecture API Code example. A Flex library for accessing Google Wave Gadget API AS3 Opensource. http://code.google.com/p/wave-as-client. Introduction. Architecture. Browser. Wave Gadget. Your swf.

azia
Download Presentation

Wave Actionscript API (wave-as-client)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Wave Actionscript API(wave-as-client) Sung Wu 2009/06/07

  2. Agenda • Intro • Architecture • API • Code example

  3. A Flex library for accessing Google Wave Gadget API AS3 Opensource http://code.google.com/p/wave-as-client Introduction

  4. Architecture Browser Wave Gadget Your swf ExternalInterface.call Wave-as-client library Wave Gadget Javascript API callback

  5. Wave Actionscript Gadget API • Wave • getParticipants() • getViewer() • getHost() • getState() • getTime() • setParticipantCallback() • setStateCallback() • isInWaveContainer() • isPlayback() • WaveState • getKeys() • getStringValue(key, opt_default) • submitDelta(delta) • WaveParticipant • getId() • getDisplayName() • getThumbnailUrl() • This diagram is inspired by diagram in Google I/O presentation: • http://code.google.com/events/io/sessions/ProgrammingWithAndForGoogleWave.html

  6. Design Decisions • Uses wave’s gadget javascript API • For state callback and participant callback, do ExternalInterface.registerCallback() • Assumes that there is only one state at a time to make things simple

  7. Code sample: state callback private function init():void { // remember that you can only create // one instance of Wave in the application. var wave = new Wave();                         wave.setStateCallback(stateCallback);}/** * @param state - WaveState object */private function stateCallback(state:Object):void { // you can use wave.getState() to get current state. Alert.show("stateCallback being called.");}

  8. Code Sample: changeState // submit a key-vlaue pair of <"testkey", time>var delta:Object = {};delta.testkey = new Date().getTime();wave.getState().submitDelta(delta);// you should get stateCallback after you submitDelta.

  9. Resource • Project site: http://code.google.com/p/wave-as-cleint • Blog: http://nextgenapp.blogspot.com • Contact: Sung Wu apiswswsw@gmail.com

  10. Status • 2009/06/07: Most of the major functionalities are working. It is tested on Wave developer sandbox.

More Related