To support importing wave data from wave.google.com to your own wave server, we have added an option to the ROBOT_FETCH_WAVE method in the Wave Data API (see example below) to get the raw deltas from a wavelet. These raw deltas provide the wave's complete history. They're exported "as-is" and we expect there will be a little work to postprocess them into a form suitable for import into your own wave server. You can try it out the new raw deltas option as follows: First, authenticate with OAuth to get an access token. You can do that at the OAuth Playground (http://googlecodesamples.com/oauth_playground/):
Download and unzip the python robot client library in a fresh directory with the commands: curl -O http://wave-robot-python-client.googlecode.com/files/wave-robot-api-v2-20101202.zipunzip wave-robot-api-v2-20101202.zipstart python in this directory and run the following commands: import waveservicew = waveservice.WaveService()w.set_access_token("oauth_token=1%2F...&oauth_token_secret=...") # the access token string from abovef = w.fetch_wavelet('googlewave.com!w+tYBKatJxA', raw_deltas_from_version=0) # this wave is publicf.raw_deltas # prints the base64 encoded raw deltasThe WaveService() method takes an optional use_sandbox=True argument, if you want to access waves from WaveSandbox.com. Replace the wave id above with the id of the wave which you want to export.Each raw delta is returned as a base 64 encoding of the binary representation of ProtocolAppliedWaveletDelta protocol buffer. You can use the ParseRawDelta program to parse the base 64 string. The deltas have no signatures and no history hashes.Some caveats:
FYI, we have also implemented a ROBOT_FETCH_WAVE option to return a raw snapshot of a wavelet. Unfortunately, the data is in an internal undocumented format and we may not be able to publish a specification for that, so please try to make do with the raw deltas, at least for now. |
