-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
60 lines (55 loc) · 2.03 KB
/
index.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<!-- css location for github repo use below-->
<link rel="stylesheet" href="/Dribbble_API/css/style.css">
<!-- css for local use -->
<link rel="stylesheet" href="/css/style.css">
<title>UMLERAN Dribbble</title>
</head>
<body>
<div class="Divider">
<div class="SecTitle">Recent Dribbble Shots</div>
<a class="more" target="_blank" href="https://dribbble.com/umlearn">More</a>
</div>
<div id="DribbbleShots"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>// Set the Access Token
var accessToken = 'cd9f55e3ce5e34a11a6a026bcc84c6ccd1d7e985c298015b55037e105ee963f0';
// Call Dribble v2 API
$.ajax({
url: 'https://api.dribbble.com/v2/user/shots?access_token='+accessToken,
dataType: 'json',
type: 'GET',
success: function(data) {
if (data.length > 0) {
$.each(data.reverse(), function(i, val) {
$('#DribbbleShots').prepend(
'<div class="shot" ><div class="title">' + val.title + ' ' + val.description + ' </div> <a target="_blank" href="'+ val.html_url +'" title="' + val.title + '"><img src="'+ val.images.hidpi +'"/></a></div>'
)
})
}
else {
$('#shots').append('<p>No shots yet!</p>');
}
}
});
// API Variables
//Image width 800x600 (Animated)
// val.images.hidpi
//Image width 400x300
// val.images.normal
//Image width 200x150
// val.images.teaser
//Title
// val.title
//Description
// val.description
//URL
// val.html_url
</script>
</body>
</html>