Change default site in API clients
(imported from commit 185cf8e27cb6ecd1cd8ccca834d30ca0de2236b8)
This commit is contained in:
parent
7a19875c37
commit
b88df2cf8e
|
@ -16,7 +16,7 @@ parser.add_option('--verbose',
|
|||
action='store_true')
|
||||
parser.add_option('--site',
|
||||
dest='site',
|
||||
default="https://app.humbughq.com",
|
||||
default="https://humbughq.com",
|
||||
action='store')
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ Example: feedback-bot --site=http://127.0.0.1:9991
|
|||
parser = optparse.OptionParser(usage=usage)
|
||||
parser.add_option('--site',
|
||||
dest='site',
|
||||
default="https://app.humbughq.com",
|
||||
default="https://humbughq.com",
|
||||
action='store')
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
|
|
|
@ -48,9 +48,9 @@ parser.add_option('--calendar',
|
|||
metavar='URL')
|
||||
parser.add_option('--site',
|
||||
dest='site',
|
||||
default="https://app.humbughq.com",
|
||||
default="https://humbughq.com",
|
||||
action='store',
|
||||
help='Humbug site [default: https://app.humbughq.com]',
|
||||
help='Humbug site [default: https://humbughq.com]',
|
||||
metavar='URL')
|
||||
parser.add_option('--interval',
|
||||
dest='interval',
|
||||
|
|
|
@ -46,7 +46,7 @@ parser.add_option('--no-auto-subscribe',
|
|||
action='store_false')
|
||||
parser.add_option('--site',
|
||||
dest='site',
|
||||
default="https://app.humbughq.com",
|
||||
default="https://humbughq.com",
|
||||
action='store')
|
||||
parser.add_option('--user',
|
||||
dest='user',
|
||||
|
|
|
@ -11,7 +11,7 @@ assert(requests.__version__ > '0.12')
|
|||
|
||||
class HumbugAPI():
|
||||
def __init__(self, email, api_key, verbose=False, retry_on_errors=True,
|
||||
site="https://app.humbughq.com", client="API"):
|
||||
site="https://humbughq.com", client="API"):
|
||||
self.api_key = api_key
|
||||
self.email = email
|
||||
self.verbose = verbose
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
#!/bin/sh
|
||||
# Two quick API tests using curl
|
||||
|
||||
curl https://app.humbughq.com/api/v1/send_message \
|
||||
curl https://humbughq.com/api/v1/send_message \
|
||||
-d "api-key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
|
||||
-d "email=tabbott@humbughq.com" \
|
||||
-d "type=personal" -d "content=test" \
|
||||
-d "recipient=tabbott@humbughq.com"
|
||||
|
||||
curl https://app.humbughq.com/api/v1/get_messages \
|
||||
curl https://humbughq.com/api/v1/get_messages \
|
||||
-d "api-key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
|
||||
-d "email=tabbott@humbughq.com"
|
||||
|
||||
# Or replace https://app.humbughq.com with your local test instance
|
||||
# Or replace https://humbughq.com with your local test instance
|
||||
|
|
|
@ -12,7 +12,7 @@ Example: get-public-streams --user=tabbott@humbughq.com --site=http://127.0.0.1:
|
|||
parser = optparse.OptionParser(usage=usage)
|
||||
parser.add_option('--site',
|
||||
dest='site',
|
||||
default="https://app.humbughq.com",
|
||||
default="https://humbughq.com",
|
||||
action='store')
|
||||
parser.add_option('--api-key',
|
||||
dest='api_key',
|
||||
|
|
|
@ -12,7 +12,7 @@ Example: get-subscriptions --user=tabbott@humbughq.com --site=http://127.0.0.1:8
|
|||
parser = optparse.OptionParser(usage=usage)
|
||||
parser.add_option('--site',
|
||||
dest='site',
|
||||
default="https://app.humbughq.com",
|
||||
default="https://humbughq.com",
|
||||
action='store')
|
||||
parser.add_option('--api-key',
|
||||
dest='api_key',
|
||||
|
|
|
@ -12,7 +12,7 @@ Example: print-messages --user=tabbott@humbughq.com --site=http://127.0.0.1:8000
|
|||
parser = optparse.OptionParser(usage=usage)
|
||||
parser.add_option('--site',
|
||||
dest='site',
|
||||
default="https://app.humbughq.com",
|
||||
default="https://humbughq.com",
|
||||
action='store')
|
||||
parser.add_option('--api-key',
|
||||
dest='api_key',
|
||||
|
|
|
@ -12,7 +12,7 @@ Example: print-next-messages --user=tabbott@humbughq.com --site=http://127.0.0.1
|
|||
parser = optparse.OptionParser(usage=usage)
|
||||
parser.add_option('--site',
|
||||
dest='site',
|
||||
default="https://app.humbughq.com",
|
||||
default="https://humbughq.com",
|
||||
action='store')
|
||||
parser.add_option('--api-key',
|
||||
dest='api_key',
|
||||
|
|
|
@ -12,7 +12,7 @@ Example: send-message --user=tabbott@humbughq.com --site=http://127.0.0.1:8000
|
|||
parser = optparse.OptionParser(usage=usage)
|
||||
parser.add_option('--site',
|
||||
dest='site',
|
||||
default="https://app.humbughq.com",
|
||||
default="https://humbughq.com",
|
||||
action='store')
|
||||
parser.add_option('--api-key',
|
||||
dest='api_key',
|
||||
|
|
|
@ -12,7 +12,7 @@ Example: subscribe --user=tabbott@humbughq.com --site=http://127.0.0.1:8000
|
|||
parser = optparse.OptionParser(usage=usage)
|
||||
parser.add_option('--site',
|
||||
dest='site',
|
||||
default="https://app.humbughq.com",
|
||||
default="https://humbughq.com",
|
||||
action='store')
|
||||
parser.add_option('--api-key',
|
||||
dest='api_key',
|
||||
|
|
Loading…
Reference in a new issue