SlideShare a Scribd company logo
1 of 21
Download to read offline
http://gihyo.jp/dev/serial/01/evernote_api
1.

     • UserStore:
     • OAuth: OAuth
2.

     • NoteStore
UserStore
String userStoreUrl = "https://sandbox.evernote.com/edam/user";
THttpClient userStoreTransport = new THttpClient(userStoreUrl);
TBinaryProtocol userStoreProtocol = new TBinaryProtocol(userStoreTransport);
UserStore.Client userStore = new UserStore.Client(userStoreProtocol);
......

AuthenticationResult authResult = null;
try {
  authResult = userStore.authenticate(username, password,
                                      consumerKey, consumerSecret);
} catch (EDAMUserException ex) {
  String parameter = ex.getParameter();
  EDAMErrorCode errorCode = ex.getErrorCode();
......
}

String authToken = authResult.getAuthenticationToken();
https://sandbox.evernote.com
Java
String userStoreUrl = "https://sandbox.evernote.com/edam/user";
THttpClient userStoreTransport = new THttpClient(userStoreUrl);
TBinaryProtocol userStoreProtocol = new TBinaryProtocol(userStoreTransport);
UserStore.Client userStore = new UserStore.Client(userStoreProtocol);



Ruby
userStoreUrl = "https://sandbox.evernote.com/edam/user"
userStoreTransport = Thrift::HTTPClientTransport.new(userStoreUrl)
userStoreProtocol = Thrift::BinaryProtocol.new(userStoreTransport)
userStore = Evernote::EDAM::UserStore::UserStore::Client.new(userStoreProtocol)
NoteStore

User user = authResult.getUser();
String shardId = user.getShardId();
String noteStoreUrl = "https://sandbox.evernote.com/edam/note/" + shardId;
THttpClient noteStoreTransport = new THttpClient(noteStoreUrl);
TBinaryProtocol noteStoreProtocol = new TBinaryProtocol(noteStoreTransport);
noteStore = new NoteStore.Client(noteStoreProtocol);
List notebooks = noteStore.listNotebooks(authToken);
for (Notebook notebook : notebooks) {
  System.out.println("Notebook: " + notebook.getName());
}
Note note = new Note();
note.setTitle("           ");
String content = "<?xml version="1.0" encoding="UTF-8"?>" +
  "<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">" +
  "<en-note>                    </en-note>";
note.setContent(content);
Note createdNote = noteStore.createNote(authToken, note);
System.out.println("GUID: " + createdNote.getGuid());
Resource resource = new Resource();
resource.setData(data);
resource.setMime("image/jpeg");

Note note = new Note();
note.setTitle("         ");
note.addToResources(resource);

String content = "<?xml version="1.0" encoding="UTF-8"?>" +
  "<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">" +
  "<en-note><p>                         </p>" +
  "<en-media type="image/jpeg" hash="" +
  EDAMUtil.bytesToHex(resource.getData().getBodyHash()) + ""/>" +
  "</en-note>";
note.setContent(content);
Note createdNote = noteStore.createNote(authToken, note);
Android
http://discussion.evernote.com
http://discussion.evernote.com/forum/61-evernote-for-developers/
Evernote ウェブサービスAPI

More Related Content

What's hot

HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6
HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6
HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6
Dmitry Soshnikov
 
Обзор фреймворка Twisted
Обзор фреймворка TwistedОбзор фреймворка Twisted
Обзор фреймворка Twisted
Maxim Kulsha
 
Hibernate Import.Sql I18n
Hibernate Import.Sql I18nHibernate Import.Sql I18n
Hibernate Import.Sql I18n
yifi2009
 

What's hot (20)

Solit 2013, Автоматизация тестирования сложных систем: mixed mode automated t...
Solit 2013, Автоматизация тестирования сложных систем: mixed mode automated t...Solit 2013, Автоматизация тестирования сложных систем: mixed mode automated t...
Solit 2013, Автоматизация тестирования сложных систем: mixed mode automated t...
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensions
 
Npc14
Npc14Npc14
Npc14
 
Operation Flow @ ChicagoRoboto
Operation Flow @ ChicagoRobotoOperation Flow @ ChicagoRoboto
Operation Flow @ ChicagoRoboto
 
Testing the waters of iOS
Testing the waters of iOSTesting the waters of iOS
Testing the waters of iOS
 
Object oriented JavaScript
Object oriented JavaScriptObject oriented JavaScript
Object oriented JavaScript
 
HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6
HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6
HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6
 
Lecture16
Lecture16Lecture16
Lecture16
 
LISA QooxdooTutorial Slides
LISA QooxdooTutorial SlidesLISA QooxdooTutorial Slides
LISA QooxdooTutorial Slides
 
Basedatos2
Basedatos2Basedatos2
Basedatos2
 
Add an interactive command line to your C++ application
Add an interactive command line to your C++ applicationAdd an interactive command line to your C++ application
Add an interactive command line to your C++ application
 
Обзор фреймворка Twisted
Обзор фреймворка TwistedОбзор фреймворка Twisted
Обзор фреймворка Twisted
 
PHP Static Code Review
PHP Static Code ReviewPHP Static Code Review
PHP Static Code Review
 
Node child process
Node child processNode child process
Node child process
 
Hibernate Import.Sql I18n
Hibernate Import.Sql I18nHibernate Import.Sql I18n
Hibernate Import.Sql I18n
 
[2007 CodeEngn Conference 01] seaofglass - Linux Virus Analysis
[2007 CodeEngn Conference 01] seaofglass - Linux Virus Analysis[2007 CodeEngn Conference 01] seaofglass - Linux Virus Analysis
[2007 CodeEngn Conference 01] seaofglass - Linux Virus Analysis
 
Aspdevice - Asp Fast Crud introdution
Aspdevice - Asp Fast Crud introdutionAspdevice - Asp Fast Crud introdution
Aspdevice - Asp Fast Crud introdution
 
Jason parsing
Jason parsingJason parsing
Jason parsing
 
Workshop 5: JavaScript testing
Workshop 5: JavaScript testingWorkshop 5: JavaScript testing
Workshop 5: JavaScript testing
 
2012-09-17 - WDC12: Node.js & MongoDB
2012-09-17 - WDC12: Node.js & MongoDB2012-09-17 - WDC12: Node.js & MongoDB
2012-09-17 - WDC12: Node.js & MongoDB
 

Similar to Evernote ウェブサービスAPI

Trip itparsing
Trip itparsingTrip itparsing
Trip itparsing
CapIpad
 
#ifndef CRYPTO_HPP#define CRYPTO_HPP#include functional#.docx
#ifndef CRYPTO_HPP#define CRYPTO_HPP#include functional#.docx#ifndef CRYPTO_HPP#define CRYPTO_HPP#include functional#.docx
#ifndef CRYPTO_HPP#define CRYPTO_HPP#include functional#.docx
gertrudebellgrove
 
Building @Anywhere (for TXJS)
Building @Anywhere (for TXJS)Building @Anywhere (for TXJS)
Building @Anywhere (for TXJS)
danwrong
 
33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests
Tomek Kaczanowski
 
Deep dumpster diving 2010
Deep dumpster diving 2010Deep dumpster diving 2010
Deep dumpster diving 2010
RonnBlack
 
Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)
Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)
Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)
David Gómez García
 
服务框架: Thrift & PasteScript
服务框架: Thrift & PasteScript服务框架: Thrift & PasteScript
服务框架: Thrift & PasteScript
Qiangning Hong
 

Similar to Evernote ウェブサービスAPI (20)

Trip itparsing
Trip itparsingTrip itparsing
Trip itparsing
 
Clean coding-practices
Clean coding-practicesClean coding-practices
Clean coding-practices
 
Ac2
Ac2Ac2
Ac2
 
#ifndef CRYPTO_HPP#define CRYPTO_HPP#include functional#.docx
#ifndef CRYPTO_HPP#define CRYPTO_HPP#include functional#.docx#ifndef CRYPTO_HPP#define CRYPTO_HPP#include functional#.docx
#ifndef CRYPTO_HPP#define CRYPTO_HPP#include functional#.docx
 
ERRest
ERRestERRest
ERRest
 
Non Blocking I/O for Everyone with RxJava
Non Blocking I/O for Everyone with RxJavaNon Blocking I/O for Everyone with RxJava
Non Blocking I/O for Everyone with RxJava
 
2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests
 
Implementing STM in Java
Implementing STM in JavaImplementing STM in Java
Implementing STM in Java
 
Building @Anywhere (for TXJS)
Building @Anywhere (for TXJS)Building @Anywhere (for TXJS)
Building @Anywhere (for TXJS)
 
33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests
 
Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#
 
13 networking, mobile services, and authentication
13   networking, mobile services, and authentication13   networking, mobile services, and authentication
13 networking, mobile services, and authentication
 
Creating a Facebook Clone - Part XLV.pdf
Creating a Facebook Clone - Part XLV.pdfCreating a Facebook Clone - Part XLV.pdf
Creating a Facebook Clone - Part XLV.pdf
 
Introduction httpClient on Java11 / Java11時代のHTTPアクセス再入門
Introduction httpClient on Java11 / Java11時代のHTTPアクセス再入門Introduction httpClient on Java11 / Java11時代のHTTPアクセス再入門
Introduction httpClient on Java11 / Java11時代のHTTPアクセス再入門
 
Deep dumpster diving 2010
Deep dumpster diving 2010Deep dumpster diving 2010
Deep dumpster diving 2010
 
Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)
Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)
Midiendo la calidad de código en WTF/Min (Revisado EUI Abril 2014)
 
服务框架: Thrift & PasteScript
服务框架: Thrift & PasteScript服务框架: Thrift & PasteScript
服务框架: Thrift & PasteScript
 
Exception handling
Exception handlingException handling
Exception handling
 
外部環境への依存をテストする
外部環境への依存をテストする外部環境への依存をテストする
外部環境への依存をテストする
 
#JavaFX.forReal() - ElsassJUG
#JavaFX.forReal() - ElsassJUG#JavaFX.forReal() - ElsassJUG
#JavaFX.forReal() - ElsassJUG
 

More from Fumihiro Kato

シビックテック: インターネット時代の市民と行政の協働
シビックテック: インターネット時代の市民と行政の協働シビックテック: インターネット時代の市民と行政の協働
シビックテック: インターネット時代の市民と行政の協働
Fumihiro Kato
 

More from Fumihiro Kato (20)

オープンなデータベースを利用した行動計画提案に関する研究
オープンなデータベースを利用した行動計画提案に関する研究オープンなデータベースを利用した行動計画提案に関する研究
オープンなデータベースを利用した行動計画提案に関する研究
 
DBpedia Japanese
DBpedia JapaneseDBpedia Japanese
DBpedia Japanese
 
ウィキペディアタウン: 市民による地域情報化の一手法
ウィキペディアタウン: 市民による地域情報化の一手法ウィキペディアタウン: 市民による地域情報化の一手法
ウィキペディアタウン: 市民による地域情報化の一手法
 
Linked Data Cloudの話
Linked Data Cloudの話Linked Data Cloudの話
Linked Data Cloudの話
 
DBpedia Japanese 運営の現状
DBpedia Japanese 運営の現状DBpedia Japanese 運営の現状
DBpedia Japanese 運営の現状
 
シビックテック: インターネット時代の市民と行政の協働
シビックテック: インターネット時代の市民と行政の協働シビックテック: インターネット時代の市民と行政の協働
シビックテック: インターネット時代の市民と行政の協働
 
オープンデータカタログの先
オープンデータカタログの先オープンデータカタログの先
オープンデータカタログの先
 
Open Park Yokohama: 公園LODの試作
Open Park Yokohama: 公園LODの試作Open Park Yokohama: 公園LODの試作
Open Park Yokohama: 公園LODの試作
 
ウィキペディアタウン
ウィキペディアタウンウィキペディアタウン
ウィキペディアタウン
 
DBpedia in the Japanese LOD cloud
DBpedia in the Japanese LOD cloudDBpedia in the Japanese LOD cloud
DBpedia in the Japanese LOD cloud
 
Open Park Yokohama
Open Park YokohamaOpen Park Yokohama
Open Park Yokohama
 
データポータルソフトウェアCKAN
データポータルソフトウェアCKANデータポータルソフトウェアCKAN
データポータルソフトウェアCKAN
 
データカタログソフトウェア CKAN
データカタログソフトウェア CKANデータカタログソフトウェア CKAN
データカタログソフトウェア CKAN
 
オープンデータとLinked Open Data
オープンデータとLinked Open DataオープンデータとLinked Open Data
オープンデータとLinked Open Data
 
LOD: Linked Open Data
LOD: Linked Open DataLOD: Linked Open Data
LOD: Linked Open Data
 
スキーマとURI
スキーマとURIスキーマとURI
スキーマとURI
 
CKAN日本語コミュニティの現状と課題
CKAN日本語コミュニティの現状と課題CKAN日本語コミュニティの現状と課題
CKAN日本語コミュニティの現状と課題
 
日本語Linked Data Cloudの現状
日本語Linked Data Cloudの現状日本語Linked Data Cloudの現状
日本語Linked Data Cloudの現状
 
sgvizler
sgvizlersgvizler
sgvizler
 
えほん関連検索
えほん関連検索えほん関連検索
えほん関連検索
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

Evernote ウェブサービスAPI

  • 1.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. 1. • UserStore: • OAuth: OAuth 2. • NoteStore
  • 11. UserStore String userStoreUrl = "https://sandbox.evernote.com/edam/user"; THttpClient userStoreTransport = new THttpClient(userStoreUrl); TBinaryProtocol userStoreProtocol = new TBinaryProtocol(userStoreTransport); UserStore.Client userStore = new UserStore.Client(userStoreProtocol); ...... AuthenticationResult authResult = null; try { authResult = userStore.authenticate(username, password, consumerKey, consumerSecret); } catch (EDAMUserException ex) { String parameter = ex.getParameter(); EDAMErrorCode errorCode = ex.getErrorCode(); ...... } String authToken = authResult.getAuthenticationToken();
  • 13. Java String userStoreUrl = "https://sandbox.evernote.com/edam/user"; THttpClient userStoreTransport = new THttpClient(userStoreUrl); TBinaryProtocol userStoreProtocol = new TBinaryProtocol(userStoreTransport); UserStore.Client userStore = new UserStore.Client(userStoreProtocol); Ruby userStoreUrl = "https://sandbox.evernote.com/edam/user" userStoreTransport = Thrift::HTTPClientTransport.new(userStoreUrl) userStoreProtocol = Thrift::BinaryProtocol.new(userStoreTransport) userStore = Evernote::EDAM::UserStore::UserStore::Client.new(userStoreProtocol)
  • 14. NoteStore User user = authResult.getUser(); String shardId = user.getShardId(); String noteStoreUrl = "https://sandbox.evernote.com/edam/note/" + shardId; THttpClient noteStoreTransport = new THttpClient(noteStoreUrl); TBinaryProtocol noteStoreProtocol = new TBinaryProtocol(noteStoreTransport); noteStore = new NoteStore.Client(noteStoreProtocol);
  • 15. List notebooks = noteStore.listNotebooks(authToken); for (Notebook notebook : notebooks) { System.out.println("Notebook: " + notebook.getName()); }
  • 16. Note note = new Note(); note.setTitle(" "); String content = "<?xml version="1.0" encoding="UTF-8"?>" + "<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">" + "<en-note> </en-note>"; note.setContent(content); Note createdNote = noteStore.createNote(authToken, note); System.out.println("GUID: " + createdNote.getGuid());
  • 17. Resource resource = new Resource(); resource.setData(data); resource.setMime("image/jpeg"); Note note = new Note(); note.setTitle(" "); note.addToResources(resource); String content = "<?xml version="1.0" encoding="UTF-8"?>" + "<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">" + "<en-note><p> </p>" + "<en-media type="image/jpeg" hash="" + EDAMUtil.bytesToHex(resource.getData().getBodyHash()) + ""/>" + "</en-note>"; note.setContent(content); Note createdNote = noteStore.createNote(authToken, note);