summaryrefslogtreecommitdiff
path: root/notification
diff options
context:
space:
mode:
authorbaba <yasuyuki.baba@gmail.com>2015-09-07 15:40:52 +0900
committerbaba <yasuyuki.baba@gmail.com>2015-09-07 15:40:52 +0900
commitc7f7698fdc4f7c796300532b2dcd58607f3ed8a6 (patch)
treee0206ba5300d583c723d07ae23c0477732162b8f /notification
parenta55dbb717cfd1a73062e952623e1009b4ef669a7 (diff)
downloadansible-modules-extras-c7f7698fdc4f7c796300532b2dcd58607f3ed8a6.tar.gz
Fix missing parameter in typetalk module
Diffstat (limited to 'notification')
-rw-r--r--notification/typetalk.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/notification/typetalk.py b/notification/typetalk.py
index 4f6ee281..8a2dad3d 100644
--- a/notification/typetalk.py
+++ b/notification/typetalk.py
@@ -72,14 +72,14 @@ def do_request(module, url, params, headers=None):
raise exc
return r
-def get_access_token(client_id, client_secret):
+def get_access_token(module, client_id, client_secret):
params = {
'client_id': client_id,
'client_secret': client_secret,
'grant_type': 'client_credentials',
'scope': 'topic.post'
}
- res = do_request('https://typetalk.in/oauth2/access_token', params)
+ res = do_request(module, 'https://typetalk.in/oauth2/access_token', params)
return json.load(res)['access_token']
@@ -88,7 +88,7 @@ def send_message(module, client_id, client_secret, topic, msg):
send message to typetalk
"""
try:
- access_token = get_access_token(client_id, client_secret)
+ access_token = get_access_token(module, client_id, client_secret)
url = 'https://typetalk.in/api/v1/topics/%d' % topic
headers = {
'Authorization': 'Bearer %s' % access_token,