RegisterNamespace("KupOfJoe");
KupOfJoe.ListingsService = function(){};
KupOfJoe.ListingsService.HelloWorld = function(onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/ListingsService.asmx/HelloWorld", data:'', onComplete: onCompleteHandler}).post();
}
KupOfJoe.ListingsService.GetListings = function(_pageStart, _pageSize, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/ListingsService.asmx/GetListings", data:'', onComplete: onCompleteHandler}).post({"_pageStart":_pageStart, "_pageSize":_pageSize});
}
KupOfJoe.ListingsService.GetPagedListings = function(_pageStart, _pageSize, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/ListingsService.asmx/GetPagedListings", data:'', onComplete: onCompleteHandler}).post({"_pageStart":_pageStart, "_pageSize":_pageSize});
}
KupOfJoe.ListingsService.GetListingNames = function(onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/ListingsService.asmx/GetListingNames", data:'', onComplete: onCompleteHandler}).post();
}
KupOfJoe.ListingsService.GetListingsByName = function(name, _pageStart, _pageSize, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/ListingsService.asmx/GetListingsByName", data:'', onComplete: onCompleteHandler}).post({"name":name, "_pageStart":_pageStart, "_pageSize":_pageSize});
}
KupOfJoe.ListingsService.GetListingsByNameZip = function(name, zip, _pageStart, _pageSize, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/ListingsService.asmx/GetListingsByNameZip", data:'', onComplete: onCompleteHandler}).post({"name":name, "zip":zip, "_pageStart":_pageStart, "_pageSize":_pageSize});
}
KupOfJoe.ListingsService.GetListingsByZip = function(zip, _pageStart, _pageSize, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/ListingsService.asmx/GetListingsByZip", data:'', onComplete: onCompleteHandler}).post({"zip":zip, "_pageStart":_pageStart, "_pageSize":_pageSize});
}
KupOfJoe.ListingsService.GetListingsByCity = function(city, _pageStart, _pageSize, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/ListingsService.asmx/GetListingsByCity", data:'', onComplete: onCompleteHandler}).post({"city":city, "_pageStart":_pageStart, "_pageSize":_pageSize});
}
KupOfJoe.ListingsService.GetListingsFeature = function(onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/ListingsService.asmx/GetListingsFeature", data:'', onComplete: onCompleteHandler}).post();
}
KupOfJoe.ListingsService.GetFilteredListings = function(shop, city, zip, _pageStart, _pageSize, _totalShops, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/ListingsService.asmx/GetFilteredListings", data:'', onComplete: onCompleteHandler}).post({"shop":shop, "city":city, "zip":zip, "_pageStart":_pageStart, "_pageSize":_pageSize, "_totalShops":_totalShops});
}
KupOfJoe.ListingsService.GetListingById = function(id, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/ListingsService.asmx/GetListingById", data:'', onComplete: onCompleteHandler}).post({"id":id});
}
KupOfJoe.ListingsService.GetRecentListings = function(onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/ListingsService.asmx/GetRecentListings", data:'', onComplete: onCompleteHandler}).post();
}
KupOfJoe.ListingsService.GetPhotosByShopId = function(shopId, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/ListingsService.asmx/GetPhotosByShopId", data:'', onComplete: onCompleteHandler}).post({"shopId":shopId});
}
KupOfJoe.ListingsService.InsertPhoto = function(shopId, name, caption, src, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/ListingsService.asmx/InsertPhoto", data:'', onComplete: onCompleteHandler}).post({"shopId":shopId, "name":name, "caption":caption, "src":src});
}
KupOfJoe.ListingsService.GetFilteredListingsCount = function(shop, city, zip, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/ListingsService.asmx/GetFilteredListingsCount", data:'', onComplete: onCompleteHandler}).post({"shop":shop, "city":city, "zip":zip});
}
KupOfJoe.ListingsService.InsertShop = function(_name, _description, _addOne, _cityId, _stateId, _zip, _phone, _email, _website, _internetTypeId, _seatingTypeId, _newCity, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/ListingsService.asmx/InsertShop", data:'', onComplete: onCompleteHandler}).post({"_name":_name, "_description":_description, "_addOne":_addOne, "_cityId":_cityId, "_stateId":_stateId, "_zip":_zip, "_phone":_phone, "_email":_email, "_website":_website, "_internetTypeId":_internetTypeId, "_seatingTypeId":_seatingTypeId, "_newCity":_newCity});
}
KupOfJoe.ListingsService.UpdateShop = function(_shopId, _name, _description, _addOne, _cityId, _stateId, _zip, _phone, _email, _website, _internetTypeId, _seatingTypeId, _newCity, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/ListingsService.asmx/UpdateShop", data:'', onComplete: onCompleteHandler}).post({"_shopId":_shopId, "_name":_name, "_description":_description, "_addOne":_addOne, "_cityId":_cityId, "_stateId":_stateId, "_zip":_zip, "_phone":_phone, "_email":_email, "_website":_website, "_internetTypeId":_internetTypeId, "_seatingTypeId":_seatingTypeId, "_newCity":_newCity});
}
