Mustafa Furniturewala
Evernote
Mobile SDKs: Getting Started
with the Evernote API
Monday, September 30, 13
#EC2013
Evernote API
• Access to a user’s Evernote account/business
• Read/Create/Find notes
• FindRelated/Reminders
Monda...
#EC2013
Mobile SDK’s
Monday, September 30, 13
#EC2013
Mobile SDK’s
• Easy to use - hide complexities
Monday, September 30, 13
#EC2013
Mobile SDK’s
• Easy to use - hide complexities
• Local API’s
Monday, September 30, 13
#EC2013
Mobile SDK’s
• Easy to use - hide complexities
• Local API’s
• Support popular environments (cocoapods/
maven)
Mon...
#EC2013
Mobile SDK’s
• Easy to use - hide complexities
• Local API’s
• Support popular environments (cocoapods/
maven)
• W...
#EC2013
Getting started
Monday, September 30, 13
#EC2013
Getting started
Monday, September 30, 13
#EC2013
Getting started
1. Create an account on sandbox.evernote.com
Monday, September 30, 13
#EC2013
Getting started
1. Create an account on sandbox.evernote.com
2. Get your consumer key
Monday, September 30, 13
#EC2013
Getting started
1. Create an account on sandbox.evernote.com
2. Get your consumer key
3. Download the SDK
Monday, ...
#EC2013
Getting started
1. Create an account on sandbox.evernote.com
2. Get your consumer key
3. Download the SDK
4. Start...
#EC2013
Authentication
Monday, September 30, 13
#EC2013
Authentication
1. OAuth 1.0a
Monday, September 30, 13
#EC2013
Authentication
1. OAuth 1.0a
2. Mobile SDK’s handle everything for you
Monday, September 30, 13
#EC2013
Authentication
1. OAuth 1.0a
2. Mobile SDK’s handle everything for you
3. Github
Monday, September 30, 13
#EC2013
Yinxiang Biji
Monday, September 30, 13
#EC2013
Yinxiang Biji
1. Evernote’s China service
Monday, September 30, 13
#EC2013
Yinxiang Biji
1. Evernote’s China service
2. Bootstrapping
Monday, September 30, 13
#EC2013
Yinxiang Biji
1. Evernote’s China service
2. Bootstrapping
3. Mobile SDK’s handle
everything for you
Monday, Septe...
#EC2013
Yinxiang Biji
1. Evernote’s China service
2. Bootstrapping
3. Mobile SDK’s handle
everything for you
Monday, Septe...
#EC2013
Getting started
Monday, September 30, 13
#EC2013
Getting started
Monday, September 30, 13
#EC2013
Getting started
•[EvernoteSession sharedSession]
Monday, September 30, 13
#EC2013
Getting started
•[EvernoteSession sharedSession]
•- (void)authenticateWithViewController:completionHandler:
Monday...
#EC2013
Getting started
•[EvernoteSession sharedSession]
•- (void)authenticateWithViewController:completionHandler:
•[Ever...
#EC2013
Getting started
•[EvernoteSession sharedSession]
•- (void)authenticateWithViewController:completionHandler:
•[Ever...
#EC2013
Getting started
•[EvernoteSession sharedSession]
•- (void)authenticateWithViewController:completionHandler:
•[Ever...
#EC2013
Note
Metadata
Body
Attachments
Monday, September 30, 13
#EC2013
ENML
• Markup language for the body of a note
• Rich content
• Based on XHTML
• Validate against the DTD
Monday, S...
#EC2013
ENML
Monday, September 30, 13
#EC2013
ENML
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">
<en-...
#EC2013
ENML
Monday, September 30, 13
#EC2013
ENML
en-note
Monday, September 30, 13
#EC2013
ENML
en-note
en-media
Monday, September 30, 13
#EC2013
ENML
en-note
en-media
en-crypt
Monday, September 30, 13
#EC2013
ENML
en-note
en-media
en-crypt
en-todo
Monday, September 30, 13
#EC2013
Write ENML
Monday, September 30, 13
#EC2013
Write ENML
ENMLWriter - iOS only
Monday, September 30, 13
#EC2013
Write ENML
ENMLWriter - iOS only
(void) writeResource:(EDAMResource *)resource;
Monday, September 30, 13
#EC2013
Write ENML
ENMLWriter - iOS only
(void) writeResource:(EDAMResource *)resource;
(void) writeEncryptedInfo:
(ENEncr...
#EC2013
Write ENML
ENMLWriter - iOS only
(void) writeResource:(EDAMResource *)resource;
(void) writeEncryptedInfo:
(ENEncr...
#EC2013
ENML Writer
EDAMData *edamData = [[EDAMData alloc]
initWithBodyHash:dataHash size:myFileData.length
body:myFileDat...
#EC2013
ENML Writer
[myWriter startDocument];
[myWriter startElement:@"span"];
[myWriter startElement:@"br"];
[myWriter en...
#EC2013
View ENML
ENML -> HTML
- (void) convertENMLToHTML:enmlContent completionBlock:
Monday, September 30, 13
#EC2013
Sharing and Business
Monday, September 30, 13
#EC2013
Sharing and Business
• Share notes/notebooks
Monday, September 30, 13
#EC2013
Sharing and Business
• Share notes/notebooks
• Business API
Monday, September 30, 13
#EC2013
Sharing and Business
• Share notes/notebooks
• Business API
• SDK’s help you out
Monday, September 30, 13
#EC2013
Helpful SDK functions
• List notes for a shared notebook
• List all the business notebooks
• Create a business not...
#EC2013
Example - Get all the Post-it®
notes
Monday, September 30, 13
#EC2013
Example - Get all the Post-it®
notes
EvernoteNoteStore *noteStore = [EvernoteNoteStore noteStore];
Monday, Septemb...
#EC2013
Example - Get all the Post-it®
notes
EvernoteNoteStore *noteStore = [EvernoteNoteStore noteStore];
EDAMNoteFilter*...
#EC2013
Example - Get all the Post-it®
notes
EvernoteNoteStore *noteStore = [EvernoteNoteStore noteStore];
EDAMNoteFilter*...
#EC2013
Example - Get all the Post-it®
notes
EvernoteNoteStore *noteStore = [EvernoteNoteStore noteStore];
EDAMNoteFilter*...
#EC2013
Example - Get all the Post-it®
notes
EvernoteNoteStore *noteStore = [EvernoteNoteStore noteStore];
EDAMNoteFilter*...
#EC2013
Example - Get all the Post-it®
notes
EvernoteNoteStore *noteStore = [EvernoteNoteStore noteStore];
EDAMNoteFilter*...
#EC2013
Example - Get all the Post-it®
notes
EvernoteNoteStore *noteStore = [EvernoteNoteStore noteStore];
EDAMNoteFilter*...
#EC2013
Example - List notes from a
shared notebook
Monday, September 30, 13
#EC2013
Example - List notes from a
shared notebook
EvernoteNoteStore *defaultNoteStore = [EvernoteNoteStore
noteStore];
M...
#EC2013
Example - List notes from a
shared notebook
EvernoteNoteStore *defaultNoteStore = [EvernoteNoteStore
noteStore];
[...
#EC2013
Example - List notes from a
shared notebook
EvernoteNoteStore *defaultNoteStore = [EvernoteNoteStore
noteStore];
[...
#EC2013
Example - List notes from a
shared notebook
EvernoteNoteStore *defaultNoteStore = [EvernoteNoteStore
noteStore];
[...
#EC2013
Interact with the Evernote app
Monday, September 30, 13
#EC2013
Interact with the Evernote app
1. Create notes
Monday, September 30, 13
#EC2013
Interact with the Evernote app
1. Create notes
2. View a note
Monday, September 30, 13
#EC2013
Interact with the Evernote app
1. Create notes
2. View a note
3. Authentication
Monday, September 30, 13
#EC2013
Interact with the Evernote app
1. Create notes
2. View a note
3. Authentication
4. Intents on Android
Monday, Sept...
#EC2013
Wrappers - Local API
Monday, September 30, 13
#EC2013
Wrappers - Local API
- (void)viewNoteInEvernote:
Monday, September 30, 13
#EC2013
Wrappers - Local API
- (void)viewNoteInEvernote:
- (void)saveNewNoteToEvernoteApp:
Monday, September 30, 13
#EC2013
Wrappers - Local API
- (void)viewNoteInEvernote:
- (void)saveNewNoteToEvernoteApp:
Monday, September 30, 13
#EC2013
Open source
Monday, September 30, 13
#EC2013
Open source
Submit pull requests
Monday, September 30, 13
#EC2013
Open source
Submit pull requests
Open issues
Monday, September 30, 13
#EC2013
Open source
Submit pull requests
Open issues
Github.com/evernote
Monday, September 30, 13
#EC2013
Popular apps
Pocket Lightly
Monday, September 30, 13
#EC2013
Popular apps
Dolphin Browser
Monday, September 30, 13
#EC2013
Thank you!
mustafa@evernote.com
Questions?
Monday, September 30, 13
Upcoming SlideShare
Loading in …5
×

EC3 Workshop - Evernote API with Mobile SDKs

726 views

Published on

Slides from the EC3 workshop : http://evernote.com/ec/

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
726
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
10
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

EC3 Workshop - Evernote API with Mobile SDKs

  1. 1. Mustafa Furniturewala Evernote Mobile SDKs: Getting Started with the Evernote API Monday, September 30, 13
  2. 2. #EC2013 Evernote API • Access to a user’s Evernote account/business • Read/Create/Find notes • FindRelated/Reminders Monday, September 30, 13
  3. 3. #EC2013 Mobile SDK’s Monday, September 30, 13
  4. 4. #EC2013 Mobile SDK’s • Easy to use - hide complexities Monday, September 30, 13
  5. 5. #EC2013 Mobile SDK’s • Easy to use - hide complexities • Local API’s Monday, September 30, 13
  6. 6. #EC2013 Mobile SDK’s • Easy to use - hide complexities • Local API’s • Support popular environments (cocoapods/ maven) Monday, September 30, 13
  7. 7. #EC2013 Mobile SDK’s • Easy to use - hide complexities • Local API’s • Support popular environments (cocoapods/ maven) • Wrappers Monday, September 30, 13
  8. 8. #EC2013 Getting started Monday, September 30, 13
  9. 9. #EC2013 Getting started Monday, September 30, 13
  10. 10. #EC2013 Getting started 1. Create an account on sandbox.evernote.com Monday, September 30, 13
  11. 11. #EC2013 Getting started 1. Create an account on sandbox.evernote.com 2. Get your consumer key Monday, September 30, 13
  12. 12. #EC2013 Getting started 1. Create an account on sandbox.evernote.com 2. Get your consumer key 3. Download the SDK Monday, September 30, 13
  13. 13. #EC2013 Getting started 1. Create an account on sandbox.evernote.com 2. Get your consumer key 3. Download the SDK 4. Start using the API’s Monday, September 30, 13
  14. 14. #EC2013 Authentication Monday, September 30, 13
  15. 15. #EC2013 Authentication 1. OAuth 1.0a Monday, September 30, 13
  16. 16. #EC2013 Authentication 1. OAuth 1.0a 2. Mobile SDK’s handle everything for you Monday, September 30, 13
  17. 17. #EC2013 Authentication 1. OAuth 1.0a 2. Mobile SDK’s handle everything for you 3. Github Monday, September 30, 13
  18. 18. #EC2013 Yinxiang Biji Monday, September 30, 13
  19. 19. #EC2013 Yinxiang Biji 1. Evernote’s China service Monday, September 30, 13
  20. 20. #EC2013 Yinxiang Biji 1. Evernote’s China service 2. Bootstrapping Monday, September 30, 13
  21. 21. #EC2013 Yinxiang Biji 1. Evernote’s China service 2. Bootstrapping 3. Mobile SDK’s handle everything for you Monday, September 30, 13
  22. 22. #EC2013 Yinxiang Biji 1. Evernote’s China service 2. Bootstrapping 3. Mobile SDK’s handle everything for you Monday, September 30, 13
  23. 23. #EC2013 Getting started Monday, September 30, 13
  24. 24. #EC2013 Getting started Monday, September 30, 13
  25. 25. #EC2013 Getting started •[EvernoteSession sharedSession] Monday, September 30, 13
  26. 26. #EC2013 Getting started •[EvernoteSession sharedSession] •- (void)authenticateWithViewController:completionHandler: Monday, September 30, 13
  27. 27. #EC2013 Getting started •[EvernoteSession sharedSession] •- (void)authenticateWithViewController:completionHandler: •[EvernoteUserStore userStore] Monday, September 30, 13
  28. 28. #EC2013 Getting started •[EvernoteSession sharedSession] •- (void)authenticateWithViewController:completionHandler: •[EvernoteUserStore userStore] •[EvernoteNoteStore noteStore] Monday, September 30, 13
  29. 29. #EC2013 Getting started •[EvernoteSession sharedSession] •- (void)authenticateWithViewController:completionHandler: •[EvernoteUserStore userStore] •[EvernoteNoteStore noteStore] Monday, September 30, 13
  30. 30. #EC2013 Note Metadata Body Attachments Monday, September 30, 13
  31. 31. #EC2013 ENML • Markup language for the body of a note • Rich content • Based on XHTML • Validate against the DTD Monday, September 30, 13
  32. 32. #EC2013 ENML Monday, September 30, 13
  33. 33. #EC2013 ENML <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"> <en-note> <div><en-todo></en-todo>Checkbox 1</div> <div><en-todo checked="true"></en-todo>Checkbox 2</div> <div><br clear="none"/></div> <div><ol><li>Number 1</li><li>Number 2</li></ol></div> </en-note> Monday, September 30, 13
  34. 34. #EC2013 ENML Monday, September 30, 13
  35. 35. #EC2013 ENML en-note Monday, September 30, 13
  36. 36. #EC2013 ENML en-note en-media Monday, September 30, 13
  37. 37. #EC2013 ENML en-note en-media en-crypt Monday, September 30, 13
  38. 38. #EC2013 ENML en-note en-media en-crypt en-todo Monday, September 30, 13
  39. 39. #EC2013 Write ENML Monday, September 30, 13
  40. 40. #EC2013 Write ENML ENMLWriter - iOS only Monday, September 30, 13
  41. 41. #EC2013 Write ENML ENMLWriter - iOS only (void) writeResource:(EDAMResource *)resource; Monday, September 30, 13
  42. 42. #EC2013 Write ENML ENMLWriter - iOS only (void) writeResource:(EDAMResource *)resource; (void) writeEncryptedInfo: (ENEncryptedContentInfo *)encryptedInfo; Monday, September 30, 13
  43. 43. #EC2013 Write ENML ENMLWriter - iOS only (void) writeResource:(EDAMResource *)resource; (void) writeEncryptedInfo: (ENEncryptedContentInfo *)encryptedInfo; (void) writeTodoWithCheckedState: (BOOL)checkedState; Monday, September 30, 13
  44. 44. #EC2013 ENML Writer EDAMData *edamData = [[EDAMData alloc] initWithBodyHash:dataHash size:myFileData.length body:myFileData]; EDAMResource* resource = [[EDAMResource alloc] init]; [resource setData:edamData]; [resource setMime:@"image/png"]; ENMLWriter* myWriter = [[ENMLWriter alloc] init] Monday, September 30, 13
  45. 45. #EC2013 ENML Writer [myWriter startDocument]; [myWriter startElement:@"span"]; [myWriter startElement:@"br"]; [myWriter endElement]; [myWriter writeResource:resource]; [myWriter endElement]; [myWriter endDocument]; Monday, September 30, 13
  46. 46. #EC2013 View ENML ENML -> HTML - (void) convertENMLToHTML:enmlContent completionBlock: Monday, September 30, 13
  47. 47. #EC2013 Sharing and Business Monday, September 30, 13
  48. 48. #EC2013 Sharing and Business • Share notes/notebooks Monday, September 30, 13
  49. 49. #EC2013 Sharing and Business • Share notes/notebooks • Business API Monday, September 30, 13
  50. 50. #EC2013 Sharing and Business • Share notes/notebooks • Business API • SDK’s help you out Monday, September 30, 13
  51. 51. #EC2013 Helpful SDK functions • List notes for a shared notebook • List all the business notebooks • Create a business notebook • Create a note in a business notebook Monday, September 30, 13
  52. 52. #EC2013 Example - Get all the Post-it® notes Monday, September 30, 13
  53. 53. #EC2013 Example - Get all the Post-it® notes EvernoteNoteStore *noteStore = [EvernoteNoteStore noteStore]; Monday, September 30, 13
  54. 54. #EC2013 Example - Get all the Post-it® notes EvernoteNoteStore *noteStore = [EvernoteNoteStore noteStore]; EDAMNoteFilter* noteFilter = [[EDAMNoteFilter alloc] init]; Monday, September 30, 13
  55. 55. #EC2013 Example - Get all the Post-it® notes EvernoteNoteStore *noteStore = [EvernoteNoteStore noteStore]; EDAMNoteFilter* noteFilter = [[EDAMNoteFilter alloc] init]; [noteFilter setWords:@"sourceApplication:postit"]; Monday, September 30, 13
  56. 56. #EC2013 Example - Get all the Post-it® notes EvernoteNoteStore *noteStore = [EvernoteNoteStore noteStore]; EDAMNoteFilter* noteFilter = [[EDAMNoteFilter alloc] init]; [noteFilter setWords:@"sourceApplication:postit"]; EDAMNotesMetadataResultSpec* metadataResultSpec = [[EDAMNotesMetadataResultSpec alloc] init]; Monday, September 30, 13
  57. 57. #EC2013 Example - Get all the Post-it® notes EvernoteNoteStore *noteStore = [EvernoteNoteStore noteStore]; EDAMNoteFilter* noteFilter = [[EDAMNoteFilter alloc] init]; [noteFilter setWords:@"sourceApplication:postit"]; EDAMNotesMetadataResultSpec* metadataResultSpec = [[EDAMNotesMetadataResultSpec alloc] init]; [metadataResultSpec setIncludeTitle:YES]; Monday, September 30, 13
  58. 58. #EC2013 Example - Get all the Post-it® notes EvernoteNoteStore *noteStore = [EvernoteNoteStore noteStore]; EDAMNoteFilter* noteFilter = [[EDAMNoteFilter alloc] init]; [noteFilter setWords:@"sourceApplication:postit"]; EDAMNotesMetadataResultSpec* metadataResultSpec = [[EDAMNotesMetadataResultSpec alloc] init]; [metadataResultSpec setIncludeTitle:YES]; [noteStore findNotesMetadataWithFilter:noteFilter offset:0 maxNotes: 100 resultSpec:metadataResultSpec success:^(EDAMNotesMetadataList *metadata)} failure:^(NSError *error) {}]; Monday, September 30, 13
  59. 59. #EC2013 Example - Get all the Post-it® notes EvernoteNoteStore *noteStore = [EvernoteNoteStore noteStore]; EDAMNoteFilter* noteFilter = [[EDAMNoteFilter alloc] init]; [noteFilter setWords:@"sourceApplication:postit"]; EDAMNotesMetadataResultSpec* metadataResultSpec = [[EDAMNotesMetadataResultSpec alloc] init]; [metadataResultSpec setIncludeTitle:YES]; [noteStore findNotesMetadataWithFilter:noteFilter offset:0 maxNotes: 100 resultSpec:metadataResultSpec success:^(EDAMNotesMetadataList *metadata)} failure:^(NSError *error) {}]; Monday, September 30, 13
  60. 60. #EC2013 Example - List notes from a shared notebook Monday, September 30, 13
  61. 61. #EC2013 Example - List notes from a shared notebook EvernoteNoteStore *defaultNoteStore = [EvernoteNoteStore noteStore]; Monday, September 30, 13
  62. 62. #EC2013 Example - List notes from a shared notebook EvernoteNoteStore *defaultNoteStore = [EvernoteNoteStore noteStore]; [defaultNoteStore listLinkedNotebooksWithSuccess:^(NSArray *linkedNotebooks) { Monday, September 30, 13
  63. 63. #EC2013 Example - List notes from a shared notebook EvernoteNoteStore *defaultNoteStore = [EvernoteNoteStore noteStore]; [defaultNoteStore listLinkedNotebooksWithSuccess:^(NSArray *linkedNotebooks) { EDAMNoteFilter* noteFilter = [[EDAMNoteFilter alloc] init]; Monday, September 30, 13
  64. 64. #EC2013 Example - List notes from a shared notebook EvernoteNoteStore *defaultNoteStore = [EvernoteNoteStore noteStore]; [defaultNoteStore listLinkedNotebooksWithSuccess:^(NSArray *linkedNotebooks) { EDAMNoteFilter* noteFilter = [[EDAMNoteFilter alloc] init]; [defaultNoteStore listNotesForLinkedNotebook:linkedNotebooks[0] withFilter:noteFilter success:^(EDAMNoteList *list) { } failure:^(NSError *error) { }];} Monday, September 30, 13
  65. 65. #EC2013 Interact with the Evernote app Monday, September 30, 13
  66. 66. #EC2013 Interact with the Evernote app 1. Create notes Monday, September 30, 13
  67. 67. #EC2013 Interact with the Evernote app 1. Create notes 2. View a note Monday, September 30, 13
  68. 68. #EC2013 Interact with the Evernote app 1. Create notes 2. View a note 3. Authentication Monday, September 30, 13
  69. 69. #EC2013 Interact with the Evernote app 1. Create notes 2. View a note 3. Authentication 4. Intents on Android Monday, September 30, 13
  70. 70. #EC2013 Wrappers - Local API Monday, September 30, 13
  71. 71. #EC2013 Wrappers - Local API - (void)viewNoteInEvernote: Monday, September 30, 13
  72. 72. #EC2013 Wrappers - Local API - (void)viewNoteInEvernote: - (void)saveNewNoteToEvernoteApp: Monday, September 30, 13
  73. 73. #EC2013 Wrappers - Local API - (void)viewNoteInEvernote: - (void)saveNewNoteToEvernoteApp: Monday, September 30, 13
  74. 74. #EC2013 Open source Monday, September 30, 13
  75. 75. #EC2013 Open source Submit pull requests Monday, September 30, 13
  76. 76. #EC2013 Open source Submit pull requests Open issues Monday, September 30, 13
  77. 77. #EC2013 Open source Submit pull requests Open issues Github.com/evernote Monday, September 30, 13
  78. 78. #EC2013 Popular apps Pocket Lightly Monday, September 30, 13
  79. 79. #EC2013 Popular apps Dolphin Browser Monday, September 30, 13
  80. 80. #EC2013 Thank you! mustafa@evernote.com Questions? Monday, September 30, 13

×