我正在尝试使用Yoda Speak api构建一个Ruby应用程序。我一直在
{\"message\":\"Missing Mashape application key. Go to http:\\/\\/docs.mashape.com\\/api-keys to learn how to get your API application key.\"}
在我的回复中即使我包含了我的api密钥。我的代码是:
url = "https://yoda.p.mashape.com/yoda?sentence=You+will+learn+how+to+speak+like+me+someday.++Oh+wait."
yoda_tweet = Unirest.get(url, headers:{
"X-Mashape-key" => ENV['MASHAPE_KEY],
"Accept" => "text/plain"
})
我试过直接把钥匙放在没有ENV的地方,但它仍然说密钥丢失了。有什么建议?