Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added API key

  • Loading branch information...
commit e6086bd302f46a0b7dd84eca4e0a66b632f3acd3 1 parent 3f87a17
@brianfrantz brianfrantz authored
Showing with 10 additions and 4 deletions.
  1. +7 −2 example.html
  2. +3 −2 jquery.tl.upcomingevents.js
View
9 example.html
@@ -17,7 +17,8 @@
$('#upcoming-events').upcomingEvents({
pageSize: $('#perpage').val(),
orgSlug: $('#orgslug').val(),
- apiUrl: $('#endpoint').val()
+ apiUrl: $('#endpoint').val(),
+ apiKey: $('#apikey').val()
});
};
@@ -47,6 +48,10 @@
<td><input id="endpoint" type="text" value="http://public-api.current.ticketleap.com/" style="width: 300px;" /></td>
</tr>
<tr>
+ <td>API Key:</td>
+ <td><input id="apikey" type="text" value="PUT_API_KEY_HERE" style="width: 300px;" /></td>
+ </tr>
+ <tr>
<th></th>
<td><button type="submit">Load Events</button></td>
</tr>
@@ -54,4 +59,4 @@
</form>
<div id="upcoming-events"></div>
</body>
-</html>
+</html>
View
5 jquery.tl.upcomingevents.js
@@ -192,7 +192,7 @@
},
getObjects: function(eventSlug){
- var url = this.options.apiUrl + "organizations/" + this.options.orgSlug + "/events" + (typeof eventSlug == 'string' ? '/' + eventSlug : '') + "?callback=?",
+ var url = this.options.apiUrl + "organizations/" + this.options.orgSlug + "/events" + (typeof eventSlug == 'string' ? '/' + eventSlug : '') + "?key=" + this.options.apiKey + "&callback=?",
pageNum = (typeof eventSlug == 'string' ? this.performancesPage : this.eventsPage);
return $.ajax({
@@ -314,7 +314,8 @@
// default options
$.fn.upcomingEvents.defaults = {
pageSize: 5,
- apiUrl: "http://public-api.current.ticketleap.com/"
+ apiUrl: "http://public-api.current.ticketleap.com/",
+ apiKey: "PUT_API_KEY_HERE"
};
})(jQuery);
Please sign in to comment.
Something went wrong with that request. Please try again.