/
test.html
37 lines (32 loc) · 1003 Bytes
/
test.html
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
31
32
33
34
35
36
37
<!DOCTYPE html>
<html>
<head>
<title>Gist Example</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="Gist CLI client." />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="gist.js"></script>
<script>
var gistName = "HelloWorld"
var gistDesciption = "An example gist."
var payload = {
data: "Hello, World!"
};
gist.create(
gistName,
gistDesciption,
JSON.stringify(payload),
function(success) {
// handle success
console.log(gist.getGistUrl(success));
},
function(error) {
// handle error
console.log(e);
});
</script>
</head>
<body>
</body>
</html>