GithubHelp home page GithubHelp logo

Comments (13)

conch avatar conch commented on September 10, 2024

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.

fnkr avatar fnkr commented on September 10, 2024

I've already tried and it did not work for me.
Can you provide a php code sample, please?

from evernote-cloud-sdk-php.

Laurent-Sarrazin avatar Laurent-Sarrazin commented on September 10, 2024

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.

fnkr avatar fnkr commented on September 10, 2024

Latest commit is form Oct 27, 2014, sure github is up to date with your local copy?

from evernote-cloud-sdk-php.

Laurent-Sarrazin avatar Laurent-Sarrazin commented on September 10, 2024

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.

fnkr avatar fnkr commented on September 10, 2024

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.

Laurent-Sarrazin avatar Laurent-Sarrazin commented on September 10, 2024

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.

fnkr avatar fnkr commented on September 10, 2024

If I move a note to another notebook, is my upload quota affected?

from evernote-cloud-sdk-php.

Laurent-Sarrazin avatar Laurent-Sarrazin commented on September 10, 2024

Not from the desktop clients. I need to make a few tests to be sure for the API.

from evernote-cloud-sdk-php.

Laurent-Sarrazin avatar Laurent-Sarrazin commented on September 10, 2024

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.

gockxml avatar gockxml commented on September 10, 2024

@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.

Laurent-Sarrazin avatar Laurent-Sarrazin commented on September 10, 2024

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.

gockxml avatar gockxml commented on September 10, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.