我正在使用此SDK - https://github.com/evernote/evernote-cloud-sdk-php
我可以在自己的笔记本中找到笔记,如下所示:
$client = new \Evernote\Client($token, false);
$search = new \Evernote\Model\Search('*');
$notebook = $client->getNotebook('notebook_id');
$scope = \Evernote\Client::SEARCH_SCOPE_ALL;
$order = \Evernote\Client::SORT_ORDER_REVERSE | \Evernote\Client::SORT_ORDER_RECENTLY_CREATED;
$results = $client->findNotesWithSearch($search, $notebook, $scope, $order, 20);
它可以工作,但是如果我尝试从链接的笔记本中获取笔记,它会一直得到空的结果。
试过这个 - https://dev.evernote.com/doc/articles/sharing.php
$adClient = new \Evernote\AdvancedClient($token ,false);
$store = $adClient->getSharedNoteStore('linked_notbook_id');
$client = new \Evernote\Client($store->getToken(), false);
$search = new \Evernote\Model\Search('*');
$notebook = $carrier->getLinkedNotebooks()[0];
$scope = \Evernote\Client::SEARCH_SCOPE_ALL;
$order = \Evernote\Client::SORT_ORDER_REVERSE | \Evernote\Client::SORT_ORDER_RECENTLY_CREATED;
$results = $client->findNotesWithSearch($search, $notebook, $scope, $order, 20);
同样的空洞结果。
答案 0 :(得分:0)
$carrier
来自何处?
$notebook = $carrier->getLinkedNotebooks()[0];
假设它$client
,来自SharedNoteStore的LinkedNotebook已分配给$notebook
,并且会传递给findNotesWithSearch
,这似乎不对。
findNotesWithSearch
的第二个参数类型为Notebook
。 notebookGuid可以在SharedNotebook。