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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE en-export SYSTEM "http://xml.evernote.com/pub/evernote-export3.dtd">
<en-export export-date="20130730T205637Z" application="Evernote" version="Evernote Mac">
<note>
<title>Test Note for Export</title>
<content>
<![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">
<en-note style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Hello, World.
-- This script includes examples for using AppleScript to perform several
-- useful tasks with Evernote.
-- Each section illustrates a chunk of Evernote's AppleScript interface,
-- and each section also cleans up after itself.
-- Please refer to the Evernote application's scripting dictionary for
loginWithEvernote: function() {
options = {
consumerKey: app.consumerKey,
consumerSecret: app.consumerSecret,
callbackUrl : "gotOAuth.html", // this filename doesn't matter in this example
signatureMethod : "HMAC-SHA1",
};
oauth = OAuth(options);
// OAuth Step 1: Get request token
oauth.request({'method': 'GET', 'url': app.evernoteHostName + '/oauth', 'success': app.success, 'failure': app.failure});
// Evernote OAuth config
consumerKey : 'your-key',
consumerSecret : 'your-secret',
evernoteHostName : 'https://www.evernote.com',
success: function(data) {
var isCallBackConfirmed = false;
var token = '';
var vars = data.text.split("&");
for (var i = 0; i < vars.length; i++) {
var y = vars[i].split('=');
if(y[0] === 'oauth_token') {
token = y[1];
}
else if(y[0] === 'oauth_token_secret') {
https://www.evernote.com/edam/note/shard/s4
$userInfo = $userStore->getPublicUserInfo($authToken);
$resGuid = '8528dddd-1d71-4e4d-9006-377be7517dfb'; // example GUID
$resUrl = $userInfo->webApiUrlPrefix . '/res/' . $resGuid;
POST /shard/s1/res/8528dddd-1d71-4e4d-9006-377be7517dfb HTTP/1.1
Host: www.evernote.com
Content-Length: 99
Content-Type: application/x-www-form-urlencoded
auth=S%3Ds1%3AU%3D293f%3AE%3Db46cda%3AC%3D12e5d64584d%3AP%3D37%3AA%3Dfred%3AH%3D50a022dd072798e192
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>en-yourkey</string>
</array>
</dict>
</array>
@@ error
<html>
<head>
<title>Evernote Ruby Example App &mdash; Error</title>
</head>
<body>
<p>An error occurred: <%= @last_error %></p>
<p>Please <a href="/reset">start over</a>.</p>
</body>
</html>