[manual] Uniformize the subscriptions API method names.
This requires a zephyr_mirror deployment when it is pushed to prod. (imported from commit 6543441fb264b518f8705d7989d068a1d50ce5d6)
This commit is contained in:
parent
5b285f2321
commit
584743eca8
4 changed files with 9 additions and 9 deletions
33
examples/list-subscriptions
Executable file
33
examples/list-subscriptions
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/python
|
||||
import sys
|
||||
import os
|
||||
import optparse
|
||||
|
||||
usage = """list-subscriptions --user=<email address> [options]
|
||||
|
||||
Prints out a list of the user's subscriptions.
|
||||
|
||||
Example: list-subscriptions --user=tabbott@humbughq.com --site=http://127.0.0.1:8000
|
||||
"""
|
||||
parser = optparse.OptionParser(usage=usage)
|
||||
parser.add_option('--site',
|
||||
dest='site',
|
||||
default="https://humbughq.com",
|
||||
action='store')
|
||||
parser.add_option('--api-key',
|
||||
dest='api_key',
|
||||
default="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
||||
action='store')
|
||||
parser.add_option('--user',
|
||||
dest='user',
|
||||
action='store')
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
|
||||
import api.common
|
||||
client = api.common.HumbugAPI(email=options.user,
|
||||
api_key=options.api_key,
|
||||
verbose=True,
|
||||
site=options.site)
|
||||
|
||||
print client.list_subscriptions()
|
Loading…
Add table
Add a link
Reference in a new issue