Skip to content

Instantly share code, notes, and snippets.

View evernotegists's full-sized avatar

Evernote Gists evernotegists

  • Evernote Corporation
  • Redwood City, CA
View GitHub Profile
@evernotegists
evernotegists / index.html
Last active December 14, 2015 09:59
Include Evernote JS SDK and jsOAuth
<script src="js/jsOAuth-1.3.6.min.js" type="text/javascript"></script>
<script src="js/evernote-sdk-minified.js" type="text/javascript"></script>
@evernotegists
evernotegists / recoIndex.example.xml
Created March 7, 2013 00:20
Example recoIndex node
<recoIndex docType="unknown" objType="image" objID="fc83e58282d8059be17debabb69be900" engineVersion="5.5.22.7"
recoType="service" lang="en" objWidth="2398" objHeight="1798">
<item x="437" y="589" w="1415" h="190">
<t w="87">EVER ?</t>
<t w="83">EVER NOTE</t>
<t w="82">EVERNOTE</t>
<t w="71">EVER NaTE</t>
<t w="67">EVER nine</t>
<t w="67">EVER none</t>
<t w="66">EVER not</t>
client = EvernoteClient(token=dev_token, sandbox=False)
noteStore = client.get_note_store()
note_guid = '5056b825-e447-4eeb-bfda-cf7a86241f49'
note = noteStore.getNote(dev_token, note_guid, False, True, True, True)
for r in note.resources:
print r.recognition.body
# Output:
# <?xml version="1.0" encoding="UTF-8"?>
@evernotegists
evernotegists / recoExample.py
Created March 7, 2013 18:43
Getting Resource recognition data
client = EvernoteClient(token=dev_token, sandbox=False)
noteStore = client.get_note_store()
note_guid = '5056b825-e447-4eeb-bfda-cf7a86241f49'
note = noteStore.getNote(dev_token, note_guid, False, True, True, True)
for r in note.resources:
recogData = noteStore.getResourceRecognition(r.guid)
print recogData
<div id="deviceready" class="blink">
<p class="event listening">Connecting to Device</p>
<p class="event received">Device is Ready</p>
<!-- Clicking "Click Me" will call app.loginWithEvernote() -->
<input type="submit" value="Login" onClick="app.loginWithEvernote()"</input>
</div>
<activity android:name="com.evernote.client.android.EvernoteOAuthActivity"
android:configChanges="orientation|keyboardHidden" />
private static final String CONSUMER_KEY = "Your consumer key";
private static final String CONSUMER_SECRET = "Your consumer secret";
private static final EvernoteSession.EvernoteService EVERNOTE_SERVICE = EvernoteSession.EvernoteService.SANDBOX;
EvernoteSession mEvernoteSession = EvernoteSession.getInstance(this, CONSUMER_KEY, CONSUMER_SECRET, EVERNOTE_SERVICE);
mEvernoteSession.authenticate(this);
AsyncNoteStoreClient asyncNoteStore = mEvernoteSession.getClientFactory().createNoteStoreClient();