سؤال

تتيح Google Wave اثنين أو أكثر من المشاركين التحدث بشكل خاص داخل موجة. عند إضافة الروبوت الخاص بي إلى الموجة، أدرك الحدث Wavelet_Self_Dded واستدعاء الطريقة أدناه. ومع ذلك، لا يحدث شيء.

يمكنني معرفة أنه يتم تنفيذ التعليمات البرمجية بسبب تصحيحات التصحيح والمعلومات في السجلات. هل هناك أي سبب لماذا لا يبدأ الروبوت بخير خاص عند إضافته؟

def start_private_wavelet(properties, context):
    """Start a private conversation between the robot and some participants."""
    participants = []
    participants.append('my-username@googlewave.com')
    participants.append('my-robot@appspot.com')

    logging.debug('Getting wave info')

    root_wavelet = context.GetRootWavelet()
    root_wave_id = root_wavelet.GetWaveId()
    root_wave = context.GetWaveById(root_wave_id)

    logging.debug('Creating private wave in %s' % root_wave_id)

    private_wavelet = root_wave.CreateWavelet(participants)
    message = private_wavelet.CreateBlip()
    message.GetDocument().SetText("This is a private conversation...")

    logging.debug('Private wave created')
هل كانت مفيدة؟

المحلول

يتم إنشاء تحويل خاص من خلال الطاوي

لذلك، باستخدام Python API، أعتقد أنك تبحث عن OpBasedWave.CreateWavelet.

participants = []
participants.append('other-user@googlewave.com')
participants.append('self-robot@appspot.com') # Remember to add your robot!

private_wavelet = root_wave.CreateWavelet(participants)
message = private_wavelet.CreateBlip()
message.GetDocument().SetText("Hi there, this is just a secret!")
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top