Remove lurk mode from web client and API examples

See #796.

(imported from commit e238ce571c3f30d8312b630df7048ad1d9cad6d2)
This commit is contained in:
Keegan McAllister 2013-02-05 18:33:45 -05:00
parent 863e5a7d4e
commit ec86a6a749
2 changed files with 6 additions and 14 deletions

View file

@ -25,9 +25,9 @@ import sys
from os import path from os import path
import optparse import optparse
usage = """print-messages --user=<email address> [--stream=<stream>] [options] usage = """print-messages --user=<email address> [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 Example: print-messages --user=tabbott@humbughq.com --site=https://zephyr.humbughq.com
""" """
@ -36,7 +36,6 @@ import humbug
parser = optparse.OptionParser(usage=usage) parser = optparse.OptionParser(usage=usage)
parser.add_option_group(humbug.generate_option_group(parser)) parser.add_option_group(humbug.generate_option_group(parser))
parser.add_option('--stream', default=None)
(options, args) = parser.parse_args() (options, args) = parser.parse_args()
client = humbug.init_from_options(options) client = humbug.init_from_options(options)
@ -44,7 +43,4 @@ client = humbug.init_from_options(options)
def print_message(message): def print_message(message):
print message print message
get_messages_options = {} client.call_on_each_message(print_message)
if options.stream is not None:
get_messages_options['stream_name'] = options.stream
client.call_on_each_message(print_message, get_messages_options)

View file

@ -25,9 +25,9 @@ import sys
from os import path from os import path
import optparse import optparse
usage = """print-next-message --user=<email address> [--stream=<stream>] [options] usage = """print-next-message --user=<email address> [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 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 = optparse.OptionParser(usage=usage)
parser.add_option_group(humbug.generate_option_group(parser)) parser.add_option_group(humbug.generate_option_group(parser))
parser.add_option('--stream', default=None)
(options, args) = parser.parse_args() (options, args) = parser.parse_args()
client = humbug.init_from_options(options) client = humbug.init_from_options(options)
get_messages_options = {} print client.get_messages({})
if options.stream is not None:
get_messages_options['stream_name'] = options.stream
print client.get_messages(get_messages_options)