Comments (13)
Use NoteStore.updateNote and set the notebookGuid field to the guid of the desired notebook. Documentation is here: https://dev.evernote.com/doc/reference/NoteStore.html#Fn_NoteStore_updateNote
from evernote-cloud-sdk-php.
I've already tried and it did not work for me.
Can you provide a php code sample, please?
from evernote-cloud-sdk-php.
Hi Florian,
I'll add a moveNote($note, $notebook) method today. It will handle business
notebooks, app notebooks, etc.
Thanks !
On Thu, Nov 6, 2014 at 10:19 AM, Florian Kaiser [email protected]
wrote:
I've already tried and it did not work for me.
Can you provide a php code sample, please?—
Reply to this email directly or view it on GitHub
#4 (comment)
.
Laurent Sarrazin
from evernote-cloud-sdk-php.
Latest commit is form Oct 27, 2014, sure github is up to date with your local copy?
from evernote-cloud-sdk-php.
Well actually the "real" latest commit is from yesterday on the "find_notes" branch ;)
But yes the latest commit on master is from Oct 27.
I'm working on the moveNote method right now.
One of the problem is that it's not possible to move a note from a personal notebook to a linked or business notebook through the api.
The solution would be to copy the note then delete the original one but it will stay in the trash... Not sure if it's a good idea.
What do you think of it ?
from evernote-cloud-sdk-php.
That is what I do at the moment.
// $notebook: name of the notebook if note has to be moved to another notebook, or false
// $notebooks: array with notebook names as keys and guids as values
if($notebook) {
$_notebook = new \Evernote\Model\Notebook();
$_notebook->guid = $notebooks[$notebook];
$client->uploadNote($note, $_notebook);
$client->deleteNote($note);
} else {
$client->replaceNote($note, $note);
}
But it is indeed a problem that the old notes are still in the trash bin.
Maybe its time to add a new API? What does the offical Evernote client do at this point?
from evernote-cloud-sdk-php.
Well actually that's what the desktop clients do : create a copy then delete the original...
The only difference is that the clients can use the expungeNote method that completely deletes the note.
So I guess I'll stick with the create/delete solution.
from evernote-cloud-sdk-php.
If I move a note to another notebook, is my upload quota affected?
from evernote-cloud-sdk-php.
Not from the desktop clients. I need to make a few tests to be sure for the API.
from evernote-cloud-sdk-php.
So no it does not affect the upload quota.
You can run a composer update to get the moveNote method.
I've also added a move_note.php file in the sample/client directory
Please report any issue you might encounter. Thank you.
from evernote-cloud-sdk-php.
@Laurent-Sarrazin Hi, I find that when moving a note between two business notebook on Evernote client or Evernote Web, the note's guid stays the same. However using your moveNote
needs to create a whole new note. Can you explain it?
from evernote-cloud-sdk-php.
Hi,
when you move a note, it actually creates a copy then deletes the original. That's why you get a different guid.
It's the behaviour of the desktop client too. The only difference is that the desktop client completely deletes the original note (and doesn't puts it in the trash) whereas the api puts the file in the trash as it cannot use the expungeNote() method.
from evernote-cloud-sdk-php.
@Laurent-Sarrazin I understand the copy-and-delete method. However, what I'm trying to say is that your official desktop and web clients seem not using this method because the guid doesn't change after moving between business account.
Only when I move a note from a business notebook to a personal notebook, it seems using your copy-and-delete way because it shows me a message like "Moving note requires some time blabla".
You can have a try in your Evernote clients. My question is how to move a note between business account without changing the guid? Is there any internal API?
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.