Skip to content

Commit

Permalink
define API URL in a better place
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeGermuska committed Oct 15, 2011
1 parent c8ca9a8 commit 43c3712
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions censusweb/media/js/ire_census.js
Expand Up @@ -2,6 +2,9 @@
// jQuery // jQuery
var ire_census = {}; var ire_census = {};
(function() { (function() {
this.API_URL = "http://censusdata.ire.org"
this.GEOAPI_URL = "http://census.ire.org/geo/1.0"

function apiRequest(path, callback, handler) { function apiRequest(path, callback, handler) {
$.ajax(this.API_URL + path, { $.ajax(this.API_URL + path, {
dataType: "jsonp", dataType: "jsonp",
Expand All @@ -10,9 +13,6 @@ var ire_census = {};
}); });
} }


this.API_URL = "http://censusdata.ire.org"
this.GEOAPI_URL = "http://census.ire.org/geo/1.0"

this.table_comparator = function (table) { this.table_comparator = function (table) {
parts = table.match(/([A-Z]+)(\d+)([A-Z]+)?/); parts = table.match(/([A-Z]+)(\d+)([A-Z]+)?/);


Expand Down
6 changes: 3 additions & 3 deletions tools/js/ire_census.js
Expand Up @@ -2,6 +2,9 @@
// jQuery // jQuery
var ire_census = {}; var ire_census = {};
(function() { (function() {
this.API_URL = "http://censusdata.ire.org"
this.GEOAPI_URL = "http://census.ire.org/geo/1.0"

function apiRequest(path, callback, handler) { function apiRequest(path, callback, handler) {
$.ajax(this.API_URL + path, { $.ajax(this.API_URL + path, {
dataType: "jsonp", dataType: "jsonp",
Expand All @@ -10,9 +13,6 @@ var ire_census = {};
}); });
} }


this.API_URL = "http://censusdata.ire.org"
this.GEOAPI_URL = "http://census.ire.org/geo/1.0"

this.table_comparator = function (table) { this.table_comparator = function (table) {
parts = table.match(/([A-Z]+)(\d+)([A-Z]+)?/); parts = table.match(/([A-Z]+)(\d+)([A-Z]+)?/);


Expand Down

0 comments on commit 43c3712

Please sign in to comment.