From ec86a6a749532daba44cb5c0c7270eec51fd3ba5 Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Tue, 5 Feb 2013 18:33:45 -0500 Subject: [PATCH] Remove lurk mode from web client and API examples See #796. (imported from commit e238ce571c3f30d8312b630df7048ad1d9cad6d2) --- examples/print-messages | 10 +++------- examples/print-next-message | 10 +++------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/examples/print-messages b/examples/print-messages index 5373af9..0ee25f5 100755 --- a/examples/print-messages +++ b/examples/print-messages @@ -25,9 +25,9 @@ import sys from os import path import optparse -usage = """print-messages --user= [--stream=] [options] +usage = """print-messages --user= [options] -Prints out each message received by the indicated user, or on the indicated public stream. +Prints out each message received by the indicated user. Example: print-messages --user=tabbott@humbughq.com --site=https://zephyr.humbughq.com """ @@ -36,7 +36,6 @@ import humbug parser = optparse.OptionParser(usage=usage) parser.add_option_group(humbug.generate_option_group(parser)) -parser.add_option('--stream', default=None) (options, args) = parser.parse_args() client = humbug.init_from_options(options) @@ -44,7 +43,4 @@ client = humbug.init_from_options(options) def print_message(message): print message -get_messages_options = {} -if options.stream is not None: - get_messages_options['stream_name'] = options.stream -client.call_on_each_message(print_message, get_messages_options) +client.call_on_each_message(print_message) diff --git a/examples/print-next-message b/examples/print-next-message index 6d6f601..04ae7b1 100755 --- a/examples/print-next-message +++ b/examples/print-next-message @@ -25,9 +25,9 @@ import sys from os import path import optparse -usage = """print-next-message --user= [--stream=] [options] +usage = """print-next-message --user= [options] -Prints out the next message received by the indicated user, or on the indicated public stream. +Prints out the next message received by the user. Example: print-next-messages --user=tabbott@humbughq.com --site=https://zephyr.humbughq.com """ @@ -36,12 +36,8 @@ import humbug parser = optparse.OptionParser(usage=usage) parser.add_option_group(humbug.generate_option_group(parser)) -parser.add_option('--stream', default=None) (options, args) = parser.parse_args() client = humbug.init_from_options(options) -get_messages_options = {} -if options.stream is not None: - get_messages_options['stream_name'] = options.stream -print client.get_messages(get_messages_options) +print client.get_messages({})