run all ajax through apiclient

This commit is contained in:
Luke Pulverenti 2014-07-02 01:16:59 -04:00
parent 683e6f472c
commit db0a6eb632
28 changed files with 55 additions and 46 deletions

View file

@ -147,6 +147,15 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
return $.ajax(request);
};
self.getJSON = function(url) {
return self.ajax({
type: "GET",
url: url,
dataType: "json"
});
};
/**
* Creates an api url based on a handler name and query string parameters
* @param {String} name