Ejemplo n.º 1
0
 public string GetPlace(string token, int id, Culture culture = Culture.En, bool details = false)
 {
     if (!CheckToken(token))
     {
         return(null);
     }
     return(ToJson(SFactory.Create(HttpContext, DataManager.Places.GetPlace(id), culture, details)));
 }
Ejemplo n.º 2
0
 public string GetPlaces(string token, int?regionId = null, int offset = 0, int count = 20, string search = null, Culture culture = Culture.En, Order order = Order.Default, bool details = false)
 {
     if (!CheckToken(token))
     {
         return(null);
     }
     return(ToJson(SFactory.Create(HttpContext, DataManager.Places.GetPlaces(regionId, offset, count, search, culture, order: order), culture, details)));
 }
Ejemplo n.º 3
0
 public string GetUserBookmarks(string token, int userId, int offset = 0, int count = 20, string search = null, Culture culture = Culture.En, bool details = false)
 {
     if (!CheckToken(token))
     {
         return(null);
     }
     return(ToJson(SFactory.Create(HttpContext, DataManager.Routes.GetUserBookmarks(userId, offset, count, search, culture), culture, details)));
 }
Ejemplo n.º 4
0
        public string GetRegion(string token, int id, Culture culture = Culture.En, bool details = false)
        {
            if (!CheckToken(token))
            {
                return(null);
            }
            var region = DataManager.Regions.GetRegion(id);

            return(ToJson(SFactory.Create(HttpContext, region, culture, details)));
        }
Ejemplo n.º 5
0
        public string GetRegions(string token, int?countryId = null, int offset = 0, int count = 20, string search = null, Culture culture = Culture.En, Order order = Order.Default, bool details = false)
        {
            if (!CheckToken(token))
            {
                return(null);
            }
            var regions = DataManager.Regions.GetRegions(countryId, offset, count, culture, search, order);

            return(ToJson(SFactory.Create(HttpContext, regions, culture, details)));
        }