-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
63 lines (61 loc) · 2.02 KB
/
example.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
61
62
63
<html>
<head>
<title>Yelp Stuff</title>
<link rel="stylesheet" type="text/css" href="review.css"/>
<style>
.desc {
color: red;
font-size: 2em;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></script>
<script type="text/javascript" src="https://github.com/jquery/jquery-tmpl/raw/master/jquery.tmpl.js"></script>
<script type="text/javascript" src="http://oauth.googlecode.com/svn/code/javascript/oauth.js"></script>
<script type="text/javascript" src="http://oauth.googlecode.com/svn/code/javascript/sha1.js"></script>
<script type="text/javascript" src='yelpreview.js'></script>
<script>
$(document).ready(function(){
//Load directly specifying keys
$('#without_saved_defaults').yelpReviews({
biz: 'owl-tree-san-francisco-2',
consumerKey: "YOUR_CONSUMER_KEY",
consumerSecret: "YOUR_CONSUMER_SECRET",
accessToken: "YOUR_TOKEN",
accessTokenSecret: "YOUR_TOKEN_SECRET"
});
//Save defaults
$.extend($.fn.yelpReviews.defaults, {
consumerKey: "YOUR_CONSUMER_KEY",
consumerSecret: "YOUR_CONSUMER_SECRET",
accessToken: "YOUR_TOKEN",
accessTokenSecret: "YOUR_TOKEN_SECRET"
})
$('#with_saved_defaults').yelpReviews({
biz: 'owl-tree-san-francisco-2'
});
//Use inline template
$('#with_inline_template').yelpReviews({
biz: 'owl-tree-san-francisco-2',
reviewTemplateMarkup: "<div class='yelp-review-body'>${excerpt}</div>"
});
});
</script>
</head>
<body>
<div class='desc'>
Without saved defaults:
</div>
<div id='without_saved_defaults'>
</div>
<div class='desc'>
With saved defaults:
</div>
<div id='with_saved_defaults'>
</div>
<div class='desc'>
With inline template:
</div>
<div id='with_inline_template'>
</div>
</body>
</html>