• Stars
    star
    259
  • Rank 157,669 (Top 4 %)
  • Language
    Java
  • License
    Other
  • Created over 12 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Evernote SDK for Java

Evernote SDK for Java

Evernote API version 1.25

Overview

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.

JavaDocs for the SDK are available at http://dev.evernote.com/documentation/reference/javadoc/.

Changes in version 1.25

  • Added RelatedQuery.referenceUri
  • New system exceptions thrown by getPublicNotebook and authenticateToSharedNote when the target content has been taken down.
  • Added SharedNotebook.recipientSettings, NoteStore.setSharedNotebookRecipientSettings
  • Added optional authenticationToken parameter to NoteStore.authenticateToSharedNote, only needed for YXBJ
  • Added creatorId and lastEditorId fields to NoteAttributes
  • Added two factor authentication functionality to UserStore.authenticate and authenticateLongSession, added UserStore.completeTwoFactorAuthentication.

Changes in version 1.24

Prerequisites

In order to use the Cloud API, 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. Developer tokens make it easy to learn your way around the API without needing to worry about OAuth. Get one at https://sandbox.evernote.com/api/DeveloperToken.action

Including the SDK in your project

The easiest way to incorporate the SDK into your Java project is to use Maven. If you're using Maven already, simply add a new dependency to your pom.xml:

<dependency>
    <groupId>com.evernote</groupId>
    <artifactId>evernote-api</artifactId>
    <version>1.25.1</version>
</dependency>

If you'd prefer to build the SDK yourself, it's as simple as running

$ mvn package

You'll find evernote-sdk-1.25.1.jar in the target directory after the build completes. This single JAR contains everything needed to use the API.

Sample Code - Client

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.

  1. Build the SDK library

    $ mvn package
  2. Open sample/client/EDAMDemo.java

  3. Scroll down to the top of the EDAMDemo class and fill in your Evernote developer token.

  4. On the command line, run the following command to compile the class:

    $ javac -classpath ../../target/evernote-api-1.25.1.jar EDAMDemo.java
  5. On the command line, run the following command to execute the sample app:

    $ java -classpath .:../../target/evernote-api-1.25.1.jar EDAMDemo

Sample Code - OAuth

Real applications use OAuth to authenticate to the Evernote service. At the end of the OAuth flow you'll have an authentication token that you can use to access the Cloud API in the same way that the developer token is used in the client sample code. The code in sample/oauth demonstrate the OAuth authentication process.

  1. Open the file sample/oauth/src/main/webapp/index.jsp

  2. Fill in your Evernote API consumer key and secret

  3. Build the sample project:

    $ cd sample/oauth
    $ mvn package
  4. Deploy sample/oauth/target/EDAMWebTest.war to your servlet container (e.g. Tomcat)

  5. Load the web application in your browser (e.g. http://localhost:8080/EDAMWebTest)

Sample Code - Scala / Play

Real applications use OAuth to authenticate to the Evernote service with Scala / Play framework. You need to install Scala and Play first.

  1. Open the file app/controllers/Evernote.scala
  2. Fill in your Evernote API consumer key and secret
  3. Run project with play run
  4. Load the web application in your browser (e.g. http://localhost:9000)

Sample Code - Clojure

A user-community Clojure wrapper to the Evernote Java SDK is available at https://github.com/mikebroberts/clojurenote . The library provides OAuth authentication, read/write capabilities (using an OAuth access token, or developer token) and ENML to HTML translation. A sample compojure / ring app is also provided to show how OAuth workflow can be implemented.

More Repositories

1

android-job

Android library to handle jobs in the background.
Java
5,373
star
2

android-state

A utility library for Android to save objects in a Bundle without any boilerplate.
Java
862
star
3

evernote-sdk-python

Evernote SDK for Python
Python
612
star
4

evernote-sdk-js

Evernote SDK for JavaScript
JavaScript
561
star
5

evernote-sdk-android

Evernote SDK for Android
Java
429
star
6

evernote-sdk-ios

Evernote SDK for iOS
Objective-C
398
star
7

evernote-sdk-python3

Testing the Evernote Cloud API for Python 3
Python
276
star
8

evernote-cloud-sdk-ios

Evernote Cloud SDK for iOS
Objective-C
256
star
9

evernote-sdk-php

Evernote SDK for PHP
PHP
248
star
10

serge

Continuous localization platform
Perl
231
star
11

evernote-sdk-ruby

Evernote SDK for Ruby
Ruby
163
star
12

evernote-cloud-sdk-php

PHP
149
star
13

evernote-sdk-csharp

Evernote SDK for C#
C#
125
star
14

evernote-thrift

Thrift IDL files for the Evernote Cloud API
Thrift
96
star
15

evernote-sdk-mac

Evernote SDK for Cocoa
Objective-C
89
star
16

evernote-sdk-cpp

Evernote SDK for C++
C++
78
star
17

evernote-cloud-sdk-windows

C#
78
star
18

evernote-oauth-ruby

Evernote OAuth / Thrift API client library for Ruby
Ruby
74
star
19

zing

Translation server for continuous localization.
Python
57
star
20

android-intent

A simple to use library for Android which helps to connect to the main Android app with Intents.
Java
42
star
21

evernote-sdk-as3

Evernote SDK for ActionScript
ActionScript
22
star
22

evernote-sdk-perl

Evernote SDK for Perl
Perl
19
star
23

Aquaman

TypeScript
18
star
24

serge-website

Source code for https://serge.io/ β€” documentation site for Serge
PHP
5
star
25

eslint-plugin-evernote

Evernote custom eslint plugin
JavaScript
5
star
26

eslint-config-evernote

eslint config rules for Evernote projects.
JavaScript
2
star