Comments (7)
Hi Timm,
What do you mean by "empty" ? No content ? Null ?
Are you sure the note has not been deleted ?
Is it a business note ? A note in an app notebook ? (It should work in these cases too but I'm trying to find what could be the cause of the issue).
Thanks !
from evernote-cloud-sdk-php.
Empty sting (''), note is not deleted, personal account, note is created from Evernote web app in default notebook. I got the note id from a webhook event.
I can post note id when I am home again, if that helps. Thanks for looking into this for me!
Den 24. feb. 2015 kl. 17.34 skrev Laurent Sarrazin [email protected]:
Hi Timm,
What do you mean by "empty" ? No content ? Null ?
Are you sure the note has not been deleted ?
Is it a business note ? A note in an app notebook ? (It should work in these cases too but I'm trying to find what could be the cause of the issue).Thanks !
—
Reply to this email directly or view it on GitHub.
from evernote-cloud-sdk-php.
hmm, well I guess I'll have to setup a webhook to check that as the getNote() works fine with a 'static' note guid...
from evernote-cloud-sdk-php.
Hold on, something weird is going on. I am using CakePHP on my end, and checking return values using debug()
, which works well with strings, arrays and objects... except the return from Client::getNote
, which just comes out as empty.
A var_dump
or print_r
, on the other hand, does return the Evernote\Model\Note
object. Perhaps this is related to the format of the content
key?
// from above..
$client = new \Evernote\Client($token, false); // token is valid, app is in production mode
$note = $client->getNote($message['guid']);
print_r($note->content);
// outputs....
Evernote\Model\EnmlNoteContent Object
(
[htmlConverter:protected] =>
[content:protected] => <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">
<en-note>
<div>Let’s see what the webhook says….</div>
</en-note>
[enmlConverter:protected] =>
)
Sorry about the misunderstanding. Perhaps this content formatting could be straight up HTML or Markdown? How would you recommend I parse this into HTML?
from evernote-cloud-sdk-php.
Pretty weird that the debug() method returns an empty string...
Anyway, you can try to use the toHtml() method on the content :
$htmlContent = $note->content->toHtml();
This is mostly an "experimental" feature for now so let me know how it works for you.
from evernote-cloud-sdk-php.
Thanks, Laurent. Unfortunately, the toHtml
didn't produce the desired result for me. It outputs:
'<html><body>
<div>Let’s see what the webhook says!</div>
<div><br></div>
</body></html>
.. but the encoding problem persists. Based on this thread on Stackoverflow, I managed to convert the encoding to UTF-8, making it usable for me.
Thank you for the assistance!
One last thing before closing this issue: Am I correct in assuming I need to do a seperate getNotebook
call to get the name of the notebook? I'm not seeing it anywhere in the Evernote\Model\Note
debug output.
from evernote-cloud-sdk-php.
Yep the conversion is pretty basic right now.
As for the notebook, yes you have to make another call. The notebook name is not included in the note.
from evernote-cloud-sdk-php.
Related Issues (20)
- en-todo checked state
- Getting issue with Create Note
- Fatal errors – am I doing something wrong? HOT 5
- is there a http api for evernote ? HOT 1
- A session had already been started - ignoring session_start() HOT 4
- Failed to run add_resource.php
- Any sample for webhook?
- Tag a release HOT 2
- Hive Thrift execution error
- Update "tijsverkoyen/css-to-inline-styles" HOT 2
- Get notes from linked notebooks HOT 2
- How do I get access tokens? HOT 1
- There are not createOrUpdateNotebookShares function
- Uncaught Exception: in ...\wp-content\plugins\evernote-sync\src\EDAM\UserStore\UserStore.php on line 3210
- Undefined index in Client.php
- Array and string offset access syntax with curly braces is deprecated HOT 3
- listNotebooks() fails for specific users
- The SDK response got very slow
- No Code Change - Suddenly: Could Not Connect Error HOT 1
- Web (global) links generated by Evernote API do not open HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from evernote-cloud-sdk-php.