0

我试图实现:

curl -u "apikey:{apikey}" "{url}/{method}" resorce:https://console.bluemix.net/apidocs/tone-analyzer

我的问题我需要做什么?我已经有了 api 密钥,例如 1234,我的 url 是https://gateway.watsonplatform.net/tone-analyzer/api

首先是什么:{method}在上面的 cURL 请求中,我需要做什么?问题2这是正确的吗?:

curl -u "apikey:1234" "https://gateway.watsonplatform.net/tone-analyzer/api/{method}

4

1 回答 1

1

在下面的 cURL 请求中:

curl -X GET -u "apikey:{apikey}" "https://gateway.watsonplatform.net/tone-analyzer/api/v3/tone?version=2017-09-21&text=Team,%20I%20know%20that%20times%20are%20tough!%20Product%20sales%20have%20been%20disappointing%20for%20the%20past%20three%20quarters.%20We%20have%20a%20competitive%20product,%20but%20we%20need%20to%20do%20a%20better%20job%20of%20selling%20it!"

{URL} 是https://gateway.watsonplatform.net/tone-analyzer/api,{method } 是 /v3/tone。要在端点下,请检查此链接

您正在调用 GET 方法,为此,您需要在https://console.bluemix.net/catalog/services/tone-analyzer创建一个服务

有关如何获取 API 密钥的更多信息,请参阅此链接

于 2018-11-24T15:37:17.273 回答