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 / gist:5647989
Created May 25, 2013 05:15
list all shared notes
- (void) getAllSharedNotes {
EDAMNoteFilter *noteFilter = [[EDAMNoteFilter alloc] initWithOrder:0
ascending:YES
words:@"sharedate:*" notebookGuid:nil
tagGuids:nil
timeZone:nil
inactive:NO
emphasized:nil];
EDAMNotesMetadataResultSpec* metaDataResultSpec = [[EDAMNotesMetadataResultSpec alloc] initWithIncludeTitle:YES includeContentLength:YES includeCreated:NO includeUpdated:NO includeDeleted:NO includeUpdateSequenceNum:NO includeNotebookGuid:YES includeTagGuids:YES includeAttributes:YES includeLargestResourceMime:NO includeLargestResourceSize:NO];
__block NSInteger i = 0;
@evernotegists
evernotegists / Temporary Token Request Sample
Last active February 5, 2024 19:12
Temporary Token Request Sample
https://www.evernote.com/oauth?oauth_callback=http://www.foo.com&oauth_consumer_key=sample-api-key-4121&oauth_nonce=3166905818410889691&oauth_signature=T0+xCYjTiyz7GZiElg1uQaHGQ6I=&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1429565574&oauth_version=1.0
// Create Notebook
[base URL]/?userId=[user ID]&notebookGuid=[notebook GUID]&reason=notebook_create
// Update Notebook
[base URL]/?userId=[user ID]&notebookGuid=[notebook GUID]&reason=notebook_update
// Create Note
[base URL]/?userId=[user ID]&guid=[note GUID]&notebookGuid=[notebook GUID]&reason=create
// Update Note
@evernotegists
evernotegists / Sample Authorized Callback
Created April 21, 2015 01:09
Sample Authorized Callback
http://www.sample.com/?oauth_token=internal-dev.14CD91FCE1F.687474703A2F2F6C6F63616C686F7374.6E287AD298969B6F8C0B4B1D67BCAB1D&oauth_verifier=40793F8BAE15D4E3B6DD5CA8AB4BF62F&sandbox_lnb=false
@evernotegists
evernotegists / thumbnail-post-request.py
Last active October 30, 2023 09:50
Thumbnail post request in Python
import requests
ACCESS_TOKEN="INSERT YOUR AUTH TOKEN OR DEV TOKEN HERE"
payload={'auth':ACCESS_TOKEN} #map auth token to param "auth"
r=requests.post('https://www.evernote.com//shard/s1/thm/note/e679c090-d8b2-4644-9eag-56bd31c84bf7.jpg?size=75',data=payload, stream=True) #returns a binary of the picture type in header
f=open('thumbnail.jpg','wb') #open file for binary writing
f.write(r.content) #write binary contents of request to a file
f.close() #close the file
https://www.evernote.com/oauth?oauth_consumer_key=en_oauth_test&oauth_signature=1ca0956605acc4f2%26&oauth_signature_method=PLAINTEXT&oauth_timestamp=1288364923&oauth_nonce=755d38e6d163e820&oauth_token=en_oauth_test.12BF8888B3F.687474703A2F2F6C6F63616C686F73742F7E736574682F4544414D576562546573742F696E6465782E7068703F616374696F6E3D63616C6C6261636B.C3118B25D0F89531A375382BEEEDD421&oauth_verifier=DF427565AF5473BBE3D85D54FB4D63A4
https://www.evernote.com/oauth?oauth_consumer_key=en_oauth_test&oauth_signature=1ca0956605acc4f2%26&oauth_signature_method=PLAINTEXT&oauth_timestamp=1288364369&oauth_nonce=d3d9446802a44259&oauth_callback=https%3A%2F%2Ffoo.com%2Fsettings%2Findex.php%3Faction%3DoauthCallback
POST /shard/s1/thm/note/e669c090-d8b2-4324-9eae-56bd31c64af7 HTTP/1.1
Host: www.evernote.com
Content-Length: 107
Content-Type: application/x-www-form-urlencoded
auth=S%3Ds1%3AU%3D293f%3AE%3Db46cda%3AC%3D12e5d64584d%3AP%3D37%3AA%3Dfred%3AH%3D50a022dd072798e192
POST /shard/s1/thm/note/e669c090-d8b2-4324-9eae-56bd31c64af7 HTTP/1.1
Host: www.evernote.com
Content-Length: 107
Content-Type: application/x-www-form-urlencoded
auth=S%3Ds1%3AU%3D293f%3AE%3Db46cda%3AC%3D12e5d64584d%3AP%3D37%3AA%3Dfred%3AV%3D2%3AH%3D50a022dd072798e19298b5007868cb3
https://www.evernote.com/oauth?oauth_consumer_key=en_oauth_test&oauth_signature=1ca0956605acc4f2%26&oauth_signature_method=PLAINTEXT&oauth_timestamp=1288364369&oauth_nonce=d3d9446802a44259&oauth_callback=https%3A%2F%2Ffoo.com%2Fsettings%2Findex.php%3Faction%3DoauthCallback