[api version bump] Update API documentation in the example scripts

Give better examples, and rewrite options parsing to be more consistent across examples.
Make it more obvious that you can use "--user" and "--api-key" with our python examples.

This bumps our python bindings to v0.1.9

(imported from commit 297468088f864b7d585e567dc45523ea681f1856)
This commit is contained in:
acrefoot 2013-05-29 14:00:27 -04:00
parent 35b822b58d
commit dfb8a16a55
22 changed files with 92 additions and 87 deletions

View file

@ -16,7 +16,7 @@ def write_config(config, since_id, user):
parser = optparse.OptionParser(r"""
%prog --user foo@humbughq.com --twitter-id twitter_handle
%prog --user foo@example.com --api-key 0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5 --twitter-id twitter_handle
Slurp tweets on your timeline into a specific humbug stream.
@ -44,18 +44,9 @@ parser = optparse.OptionParser(r"""
Depends on: twitter-python
""")
parser.add_option('--user',
help='Humbug user email address',
metavar='EMAIL')
parser.add_option('--api-key',
help='API key for that user [default: read ~/.humbugrc]')
parser.add_option('--twitter-id',
help='Twitter username to poll for new tweets from"',
metavar='URL')
parser.add_option('--site',
default="https://humbughq.com",
help='Humbug site [default: https://humbughq.com]',
metavar='URL')
parser.add_option('--stream',
help='Default humbug stream to write tweets to')
parser.add_option('--limit-tweets',
@ -63,6 +54,7 @@ parser.add_option('--limit-tweets',
type='int',
help='Maximum number of tweets to push at once')
parser.add_option_group(humbug.generate_option_group(parser))
(options, args) = parser.parse_args()
if not options.twitter_id: