/evernote-rest-webapp

Stateless MicroService Web Application which provides Restful APIs for Evernote.

Primary LanguageJavaApache License 2.0Apache-2.0

Evernote REST Webapp

"Evernote REST Webapp" provides restful APIs for evernote.

The API covers evernote OAuth and all of thrift based operations. Input and output parameters are represented as JSON. "Evernote REST Webapp" is a java based web application that behaves like a proxy between evernote thrift servers and your applications. It is built on top of Spring Boot, Sprnig Social Evernote, and evernote-java-sdk.

System Overview

* As long as OAuth token has handled, YOUR APPLICATION can be anything, such as javascript, ios, android, or an application server.

REST API Sample

OAuth

Step1: Request temporal credential and redirect url for authorization

$ curl -X POST -d "callbackUrl=http://myapp/oauth-callback" http://localhost:8080/oauth/auth

Response:

{ "authorizeUrl":"https://sandbox.evernote.com/OAuth.action?oauth_token=...",
  "requestTokenValue":"", "requestTokenSecret":"" }

Step2: Request access token

$ curl -X POST -d "oauthToken=..." -d "requestTokenSecret=..." -d "oauthVerifier=..."
    http://localhost:8080/oauth/accessToken

Response:

{ "value":"", "secret":"", "edamShard":"s…", "edamUserId":"...", "edamExpires":"...",
  "edamNoteStoreUrl":"https://...evernote.com/shard/...",
  "edamWebApiUrlPrefix":"https://...evernote.com/shard/..." }

UserStore operations

$ curl -X POST -H "Content-Type: application/json"
   -H "evernote-rest-accesstoken: ..."
   -d '{"clientName": "foo", "edamVersionMajor": 10, "edamVersionMinor": 20}'
   http://localhost:8080/userStore/checkVersion

NoteStore operations

$ curl -X POST -H "Content-Type: application/json"
   -H "evernote-rest-accesstoken: ..."
   -d '{
          "filter":{
              "order": 2,
              "ascending": true,
              "words": "[NOTE_FILTER_WORDS]",
              "notebookGuid": "[NOTEBOOK_GUID]",
              "tagGuids": ["TAG_GUID1", "TAG_GUID2"],
              "timeZone": "",
              "inactive": true
          },
          "offset": 2,
          "maxNotes": 30
      }'
   http://localhost:8080/noteStore/findNotes

What’s New

see CHANGELOG.md

How To Get

 $ git clone git@github.com:ttddyy/evernote-rest-webapp.git
 $ cd evernote-rest-webapp
 $ mvn package    # war file is generated under target directory

Documentation

Development

library versions

evernote-rest-webapp spring-boot spring-social-evernote evernote-sdk-java
1.1.2 1.1.5.RELEASE 1.0.3 1.25.1
1.1, 1.1.1 1.1.4.RELEASE 1.0.2 1.25.1
1.0 1.0.0.RELEASE 1.0.1 1.25.1

Continuous Integration