Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- router.get('/getEvernote', (req, res) => {
- var client = new Evernote.Client({ token: globaloauthAccessToken, sandbox: true, china: false });
- var noteStore = client.getNoteStore();
- noteStore.listNotebooks().then(function (notebooks) {
- var output = {
- message: 'Success.',
- notebooks: notebooks
- }
- res.json(output);
- return;
- })
- })
- {
- "message": "Success.",
- "notebooks": [
- {
- "guid": "XXXXX",
- "name": "XXX",
- "updateSequenceNum": 28,
- "defaultNotebook": true,
- "serviceCreated": 1546454274000,
- "serviceUpdated": 1557700199000,
- "publishing": null,
- ...
- router.get('/getNotes', (req, res) => {
- var client = new Evernote.Client({ token: globaloauthAccessToken, sandbox: true, china: false });
- var noteStore = client.getNoteStore();
- const filter = new Evernote.NoteStore.NoteFilter({
- ascending: false,
- });
- const spec = new Evernote.NoteStore.NotesMetadataResultSpec({
- includeTitle: true
- });
- noteStore.findNotesMetadata(filter, 0, 100, spec)
- .then(data => {
- var output = {
- message: 'Success.',
- data: data
- }
- res.json(output);
- return;
- })
- .catch(err => {
- console.log(err)
- });
- })
- ThriftException { errorCode: 3, parameter: 'authenticationToken' }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement