0
我想在我的項目是在PHP中集成鍊金術API。 前幾天一切工作正常,但現在的REST API端點http://access.alchemyapi.com/我把它叫做在我的程序給錯誤找不到404 如有任何可以告訴它爲什麼給這個錯誤。 以下是我調用了REST API的代碼片斷鍊金術API休息API端點是給錯誤404沒有找到
<?php
class AlchemyAPI {
private $_api_key;
private $_ENDPOINTS;
private $_BASE_URL = 'http://access.alchemyapi.com/calls';
*/
public function AlchemyAPI() {
//Load the API Key from api_key.txt
$key = trim(file_get_contents("api_key.txt"));
$this->_api_key = $key;
//Initialize the API Endpoints
$this->_ENDPOINTS['sentiment']['url'] = '/url/URLGetTextSentiment';
$this->_ENDPOINTS['sentiment']['text'] = ' /text/TextGetTextSentiment';
$this->_ENDPOINTS['sentiment']['html'] = '/html/HTMLGetTextSentiment';
/*代碼的其餘部分*/ ?>
感謝您的答案steve.but仍然沒有工作前幾個月它工作正常,然後我認爲改變是在PHP SDK中,所以它可能會給問題。我有我的舊文件也沒有工作它不是根本就是給了一個文本的感受。 – sapna
,你能告訴我獲取文本情緒有* TextGetTextSentiment *屬性,但在github他們只使用*情緒*。什麼是得到情緒的正確方法 – sapna