我正在使用这个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);同样的,空的结果。
发布于 2017-07-14 04:13:35
这个$carrier是从哪里来的?
$notebook = $carrier->getLinkedNotebooks()[0];假设它是$client,则将SharedNoteStore中的LinkedNotebook赋值给$notebook,并将其传递给findNotesWithSearch,这似乎并不正确。
findNotesWithSearch的第二个参数的https://dev.evernote.com/doc/articles/sharing.phpNotebook。可以在SharedNotebook.中找到notebookGuid
https://stackoverflow.com/questions/45067540
复制相似问题