Example #1
0
        public VKList <VKAudio> GetPopular(
            VKGenreEnum genre,
            Boolean?onlyEng = null,
            Int32?offset    = null,
            Int32?count     = null)
        {
            VKParams param = GetPopularParams(genre, onlyEng, offset, count);

            return(new VKList <VKAudio>(base.Execute <IEnumerable <VKAudio> >(GetPopularMethod, param)));
        }
        public VKList<VKAudio> GetPopular(
            VKGenreEnum genre,
            Boolean? onlyEng = null,
            Int32? offset = null,
            Int32? count = null)
        {
            VKParams param = GetPopularParams(genre, onlyEng, offset, count);

            return new VKList<VKAudio>(base.Execute<IEnumerable<VKAudio>>(GetPopularMethod, param));
        }
Example #3
0
        public async Task <VKList <VKAudio> > GetPopularAsync(
            VKGenreEnum genre,
            Boolean?onlyEng         = null,
            Int32?offset            = null,
            Int32?count             = null,
            CancellationToken?token = null)
        {
            VKParams param = GetPopularParams(genre, onlyEng, offset, count);

            var list = await base.ExecuteAsync <IEnumerable <VKAudio> >(GetPopularMethod, param, token);

            return(new VKList <VKAudio>(list));
        }
        public async Task<VKList<VKAudio>> GetPopularAsync(
            VKGenreEnum genre,
            Boolean? onlyEng = null,
            Int32? offset = null,
            Int32? count = null,
            CancellationToken? token = null)
        {
            VKParams param = GetPopularParams(genre, onlyEng, offset, count);

            var list = await base.ExecuteAsync<IEnumerable<VKAudio>>(GetPopularMethod, param, token);

            return new VKList<VKAudio>(list);
        }
        private VKParams GetPopularParams(
            VKGenreEnum genre,
            Boolean? onlyEng,
            Int32? offset,
            Int32? count)
        {
            VKParams param = new VKParams();

            param.Add("genre_id", (Int32)genre);
            if (onlyEng.HasValue) param.Add("only_eng", onlyEng.Value.ToVKValue());
            if (offset.HasValue) param.Add("offset", offset.Value);
            if (count.HasValue) param.Add("count", count.Value);

            return param;
        }
Example #6
0
        private VKParams GetPopularParams(
            VKGenreEnum genre,
            Boolean?onlyEng,
            Int32?offset,
            Int32?count)
        {
            VKParams param = new VKParams();

            param.Add("genre_id", (Int32)genre);
            if (onlyEng.HasValue)
            {
                param.Add("only_eng", onlyEng.Value.ToVKValue());
            }
            if (offset.HasValue)
            {
                param.Add("offset", offset.Value);
            }
            if (count.HasValue)
            {
                param.Add("count", count.Value);
            }

            return(param);
        }