Source code for watson_developer_cloud.tradeoff_analytics_v1

# Copyright 2016 IBM All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
The v1 Tradeoff Analytics service
(https://www.ibm.com/watson/developercloud/tradeoff-analytics.html)
"""

from .watson_developer_cloud_service import WatsonDeveloperCloudService


[docs]class TradeoffAnalyticsV1(WatsonDeveloperCloudService): """Wrapper of the Tradeoff Analytics service""" default_url = 'https://gateway.watsonplatform.net/tradeoff-analytics/api' def __init__(self, url=default_url, **kwargs): WatsonDeveloperCloudService.__init__(self, 'tradeoff_analytics', url, **kwargs)
[docs] def dilemmas(self, params): """ Returns a dilemma that contains the problem and a resolution. """ return self.request(method='POST', url='/v1/dilemmas', json=params, accept_json=True)