Created
March 18, 2014 18:50
-
-
Save darthwade/9626787 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([ | |
'angular', | |
'restangular', | |
'../config' | |
], function (angular) { | |
'use strict'; | |
angular.module('convertiser.common') | |
.service('systemService', function (Restangular) { | |
var self = this; | |
var system = Restangular.one('system'); | |
/** | |
* Retrieves list of registered Countries | |
* GET /system/countries/ | |
* | |
* @returns {Promise} | |
*/ | |
self.getCountries = function() { | |
return system.one('countries').get(); | |
}; | |
/** | |
* Retrieves list of registered Targeting Browsers | |
* GET /system/targeting-browsers/ | |
* | |
* @returns {Promise} | |
*/ | |
self.getTargetingBrowsers = function() { | |
return system.one('targeting-browsers').get(); | |
}; | |
/** | |
* Retrieves list of registered Categories | |
* GET /system/categories/ | |
* | |
* @returns {Promise} | |
*/ | |
self.getCategories = function() { | |
return system.one('categories').get(); | |
}; | |
/** | |
* Retrieves list of registered Currencies | |
* GET /system/currencies/ | |
* | |
* @returns {Promise} | |
*/ | |
self.getCurrencies = function() { | |
return system.one('currencies').get(); | |
}; | |
/** | |
* Retrieves list of supported system languages | |
* GET /system/languages/ | |
* | |
* @returns {Promise} | |
*/ | |
self.getLanguages = function() { | |
return system.one('languages').get(); | |
}; | |
/** | |
* Retrieves list of supported system timezones | |
* GET /system/timezones/ | |
* | |
* @returns {Promise} | |
*/ | |
self.getTimezones = function() { | |
return system.one('timezones').get(); | |
}; | |
/** | |
* Retrieves list of registered TrafficTypes | |
* GET /system/traffic-types/ | |
* | |
* @returns {Promise} | |
*/ | |
self.getTrafficTypes = function() { | |
return system.one('traffic-types').get(); | |
}; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment