Hello everyone,
I want to first start out by saying I'm sorry if I am posting in the wrong group.
For this script, my goal is to accomplish this, any wave that I am on (account 1), will add participant (account 2).
As I am still really new to the Wave API and to Python, I decided to use some of the examples source codes to accomplish this (and to get the hang of how it all works so I can develop future things.)
I chose to use this because it already had a way to do "for each wave I'm on..."
My problem is this, no matter how I try to implement the functions to add participants, it just doesn't work, I don't seem to see any errors, but it just doesn't work (sorry if I'm not being as specific as I should be).
My first attempt was to use wavelet.Participant.add, which requires doing wavelet.Participant(), which requires "roles" and I could not find out how to get this.
So, I decided to use ops.wavelet_add_participant, which requires ops.OperationQueue().
I'm not recieveing any errors at all, but nothing is working.
The code I implemented:
search_results = self._service.search(query=query, num_results=num_results)
for digest in search_results.digests:
the_wavelet = self._service.fetch_wavelet(digest.wave_id)
wave_id = the_wavelet.wave_id
wavelet_id = the_wavelet.wavelet_id
participant_id = 'x...@xx.xx'
the_wave_oq = ops.OperationQueue()
the_wave_oq.wavelet_add_participant(wave_id, wavelet_id, participant_id)
self._service.submit(the_wavelet)
I also noticed that the_wavelet which gets info from _service.fetch_wave doesn't contain anything... However: the_wavelet.wave_id and the_wavelet.wavelet_id contain correct values.
Am I missing anything or doing anything wrong?
Thank you very much everyone!