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
note = Types.Note()
note.title = "I will soon have application data"
note.content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
note.content += "<!DOCTYPE en-note SYSTEM \"http://xml.evernote.com/pub/enml2.dtd\">"
note.content += "<en-note>Content goes here</en-note>"
note = note_store.createNote(note)
# Now we have the note GUID and can add applicationData
value = note_store.getNoteApplicationDataEntry(note.guid, dkey)
@evernotegists
evernotegists / gist:793b9c5cf61276e21b68
Created December 9, 2014 18:35
Convert a resource hash to a byte array for noteStore.getResourceByHash
/// To be used alongside our Cloud SDK: https://github.com/evernote/evernote-cloud-sdk-ios
/// "hashCode" below is the "hash=" value extracted from the en-media tag
byte[] bytes = ConvertStringToByteArray(hashCode);
Resource resrc = enNoteStore.getResourceByHash(authToken, noteGuid, bytes, true, false, false);
string resourceContent = Convert.ToBase64String(resrc.Data.Body);
/// The function convertStringToByteArray is:
private byte[] ConvertStringToByteArray(string stringToConvert)
{
https://www.evernote.com/shard/s12/nl/76136038/d72dfad0-7d58-41b5-b2c9-4ca434abd543/
evernote:///view/76136038/s12/4d971333-8b65-45d6-857b-243c850cabf5/4d971333-8b65-45d6-857b-243c850cabf5/2cd4dc67-1d52-401f-9aad-d5524b646ba2
<a href="evernote:///view/76136038/s12/4d971333-8b65-45d6-857b-243c850cabf5/4d971333-8b65-45d6-857b-243c850cabf5/2cd4dc67-1d52-401f-9aad-d5524b646ba2">Travel plans</a>
https://www.evernote.com/shard/s12/sh/4d971333-8b65-45d6-857b-243c850cabf5/25771cdb535e9183
https://www.evernote.com/l/AAxNlxMzi2VF1oV7JDyFDKv1JXcc21NekYM
@evernotegists
evernotegists / developerToken
Last active August 29, 2015 14:19
developerTokenSample.txt
S=s1:U=8f219:E=154308dc976:C=14cd8dc9cd8:P=1cd:A=en-devtoken:V=2:H=1e4d28c7982faf6222ecf55df3a2e84b
@evernotegists
evernotegists / Sample Access Token Response
Created April 21, 2015 01:24
Sample Access Token Response
oauth_token=S=s432:U=4a535ee:E=15430d11503:C=14cd91fe768:P=1cd:A=internal-dev:V=2:H=ce7c4fb0daddf3b7a68c05d5eac19f97&oauth_token_secret=&edam_shard=s432&edam_userId=77936110&edam_expires=1461107889411&edam_noteStoreUrl=https://www.evernote.com/shard/s432/notestore&edam_webApiUrlPrefix=https://www.evernote.com/shard/s432/