Evernote API version 1.22
This SDK contains wrapper code used to call the Evernote Cloud API from Java applications.
For Android-specific code and samples, see the Evernote SDK for Android.
The SDK also contains two samples. The code in sample/oauth demonstrates the basic use of the SDK. The code in sample/client also demonstrates the basic use of API, but uses developer tokens instead of OAuth for authentication.
In order to use the code in this SDK, you need to obtain an API key from http://dev.evernote.com/documentation/cloud. You'll also find full API documentation on that page.
In order to run the sample code, you need a user account on the sandbox service where you will do your development. Sign up for an account at https://sandbox.evernote.com/Registration.action
In order to run the client client sample code, you need a developer token. Get one at https://sandbox.evernote.com/api/DeveloperToken.action
The code in sample/client/EDAMDemo.java demonstrates the basics of using the Evernote API, using developer tokens instead of OAuth to simplify the authentication process while you're learning. Real applications that support multiple users need to use OAuth.
-
Open sample/client/EDAMDemo.java
-
Scroll down to the top of the EDAMDemo class and fill in your Evernote developer token.
-
On the command line, run the following command to compile the class:
javac -classpath .:../../lib/libthrift.jar:../../lib/evernote-api-*.jar EDAMDemo.java
-
On the command line, run the following command to execute the sample app:
java -classpath .:../../lib/libthrift.jar:../../lib/evernote-api-*.jar EDAMDemo
Applications use OAuth to authenticate to the Evernote service. The code in sample/oauth demonstrate the OAuth authentication process.
-
Open the file sample/oauth/src/main/webapp/index.jsp
-
Fill in your Evernote API consumer key and secret
-
Build the sample project:
cd sample/oauth
mvn package
-
Deploy sample/oauth/target/EDAMWebTest.war to your servlet container (e.g. Tomcat)
-
Load the web application in your browser (e.g. http://localhost:8080/EDAMWebTest)
If you want to modify and build the WAR yourself,