Skip to content

Commit

Permalink
Revert "Add verbose option to message and converse" (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
patapizza committed Jun 4, 2016
1 parent a0147e6 commit c945693
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions wit/wit.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,26 +54,22 @@ def __init__(self, access_token, actions, logger=None):
self.logger = logger or logging.getLogger(__name__)
self.actions = validate_actions(self.logger, actions)

def message(self, msg, verbose=False):
def message(self, msg):
self.logger.debug('Message request: msg=%r', msg)
params = {}
if verbose:
params['verbose'] = True
if msg:
params['q'] = msg
resp = req(self.access_token, 'GET', '/message', params)
self.logger.debug('Message response: %s', resp)
return resp


def converse(self, session_id, message, verbose=False, context=None):
def converse(self, session_id, message, context=None):
self.logger.debug('Converse request: session_id=%s msg=%r context=%s',
session_id, message, context)
if context is None:
context = {}
params = {'session_id': session_id}
if verbose:
params['verbose'] = True
if message:
params['q'] = message
resp = req(self.access_token, 'POST', '/converse', params, json=context)
Expand Down

0 comments on commit c945693

Please sign in to comment.