Ejemplo n.º 1
0
        public static async Task GetLibraryList(
            Action<LibraryList> onSuccess, 
            Action<Error> onFail,
            int channelId, 
            OrderType orderType = OrderType.LASTEST, 
            Dictionary<string, string> filters = null,
            int pageCount = 1,
            int pageSize = 20)
        {
            string methodName = "getLibraryList";

            MGDataLoader<LibraryList> loader = new MGDataLoader<LibraryList>(CATEGORY, methodName);
            loader.AddParameter("channelId", channelId.ToString());
            loader.AddParameter("pageCount", pageCount.ToString());
            loader.AddParameter("pageSize", pageSize.ToString());
            loader.AddParameter("orderType", orderType.ToString());
           
            if(filters != null)
            {
                foreach (KeyValuePair<string, string> kv in filters)
                {
                    loader.AddParameter(kv.Key, kv.Value);
                }
            }

            await loader.LoadDataAsync(onSuccess, onFail);

        }
Ejemplo n.º 2
0
        public static async Task GetMajorList(Action<List<Channel>> onSuccess, Action<Error> onFail)
        {
            string methodName = "getMajorList";
            MGDataLoader<List<Channel>> loader = new MGDataLoader<List<Channel>>(CATEGORY, methodName);

            await loader.LoadDataAsync(onSuccess, onFail);
        }
Ejemplo n.º 3
0
 public static async Task GetById(int id, Action<Video> onSuccess = null, Action<Error> onFail = null)
 {
     string methodName = "getById";
     MGDataLoader<Video> loader = new MGDataLoader<Video>(CATEGORY, methodName);
     loader.AddParameter("vid", id.ToString());
     await loader.LoadDataAsync(onSuccess, onFail);
 }
Ejemplo n.º 4
0
        public static async Task GetLibraryFilters(int channelId, Action<List<LibraryFilter>> onSuccess, Action<Error> onFail)
        {
            string methodName = "getLibraryFilters";
            MGDataLoader< List<LibraryFilter>> loader = new MGDataLoader<List<LibraryFilter>>(CATEGORY, methodName);
            loader.AddParameter("channelId", channelId.ToString());

            await loader.LoadDataAsync(onSuccess, onFail);
        }
Ejemplo n.º 5
0
        public static async Task GetList(int size, Action<ChannelList> onSuccess, Action<Error> onFail)
        {
            string methodName = "getList";
            MGDataLoader<ChannelList> loader = new MGDataLoader<ChannelList>(CATEGORY, methodName);
            loader.AddParameter("size", size.ToString());

            await loader.LoadDataAsync(onSuccess, onFail);
        }