forked from MrSwitch/hello.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimeo.html
38 lines (31 loc) · 950 Bytes
/
vimeo.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
38
<!DOCTYPE html>
<link rel="stylesheet" href="/adorn/adorn.css"/>
<script src="/adorn/adorn.js" async></script>
<script src="client_ids.js"></script>
<title>hello( vimeo )</title>
<h1>hello( vimeo )</h1>
<button onclick="login('vimeo');">Login Vimeo</button>
<pre class="response"></pre>
<script src="../src/hello.js" class="pre"></script>
<script src="../src/modules/vimeo.js" class="pre"></script>
<script class="pre">
function login(network){
var app = hello(network);
app.login()
.then(function() {
app.api('me', function(r) {
document.body.querySelector('.response').appendChild(document.createTextNode(JSON.stringify(r, true, 2)));
});
})
.then(null, console.error.bind(console));
}
</script>
<p>Initiate the library</p>
<script class="pre">
hello.init({
vimeo : "69000585ece5a658a7d57911da381472ab4bc406"
},{
oauth_proxy: OAUTH_PROXY_URL,
redirect_uri:'../redirect.html'
});
</script>