문제

I'm trying to get all of the notes from a particular evernote notebook. I am able to display all of the data as an array, and I'm trying to use a foreach loop to get the title. I also want to be able to get the content, date, etc.

$filter = new NoteFilter();
$filter->notebookGuid = $notebookGuid;
$notelist = $client->getNoteStore()->findNotes($authToken, $filter, 0, 100);

foreach($notelist as $value) {
    echo $value->title;
}

I know that I'm being really stupid, but I'm new to php and evernote. Any help is appreciated!

도움이 되었습니까?

해결책

The return value of NoteStore.findNotes is NoteList which is not a collection. You have to get notes attribute from NoteList and then iterate it.

By the way, findNotes is now deprecated so please use findNotesMetadata.

다른 팁

You might want to check the following example from evernote:

https://github.com/evernote/evernote-sdk-php/blob/master/sample/client/EDAMTest.php

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top