-
Notifications
You must be signed in to change notification settings - Fork 1
/
seatgeek.min.js
2 lines (2 loc) · 1.11 KB
/
seatgeek.min.js
1
2
/*! seatgeek 0.3.7 */
!function(){var a,b,c,d;a="undefined"!=typeof exports&&null!==exports?exports:this.seatgeek={},d="http://api.seatgeek.com/2",a.callback=null,a.events=function(a,b){return c("/events/",a,b)},a.performers=function(a,b){return c("/performers/",a,b)},a.venues=function(a,b){return c("/venues/",a,b)},a.taxonomies=function(a,b){return c("/taxonomies/",a,b)},c=function(c,d,e){var f,g,h,i,j,k;return"function"==typeof d&&(e=d,d={}),j=null!=(k=null!=d?d.format:void 0)?k:"json","undefined"==typeof exports||null===exports?(d.callback="seatgeek.callback",a.callback=e):f||(f=require("http")),i=b(c,d),"undefined"==typeof exports||null===exports?(h=document.createElement("script"),h.type="text/javascript",h.src=i,document.body.appendChild(h)):(g=f.get(i,function(a){var b;return b="",a.on("data",function(a){return b+=a}),a.on("end",function(){return"json"===j?e(null,JSON.parse(b)):e(null,b)})}),g.on("error",function(a){return e(a,null)}))},b=function(a,b){var c,e,f,g;c=d+a,f=[];for(e in b)g=b[e],e=encodeURIComponent(e),g=encodeURIComponent(g),f.push(e+"="+g);return f.length&&(c+="?"+f.join("&")),c}}.call(this);