You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Radarr/src/UI/Shared/ApiData.js

17 lines
399 B

10 years ago
var $ = require('jquery');
module.exports = {
get : function(resource) {
10 years ago
var url = window.NzbDrone.ApiRoot + '/' + resource;
var _data;
$.ajax({
url : url,
async : false
}).done(function(data) {
10 years ago
_data = data;
}).error(function(xhr, status, error) {
10 years ago
throw error;
});
return _data;
}
};