-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhackpad.js
More file actions
30 lines (26 loc) · 701 Bytes
/
hackpad.js
File metadata and controls
30 lines (26 loc) · 701 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
var HackpadGmail = (function() {
function HackpadGmail(key, secret) {
this.key = key;
this.secret = secret;
// oauth here ...
}
HackpadGmail.prototype.create = function() {
var data = {
asUser: ''
};
var url = 'https://hackpad.com/api/1.0/pad/create';
$.ajax({
type: "POST",
url: url,
data: 'Hackpad from Gmail',
success: function(response) {
console.log(response);
}
});
};
return HackpadGmail;
})();
$(document).ready(function(){
var hackpadGmail = new HackpadGmail(API_KEY, API_SECRET);
hackpadGmail.create();
});