예제 #1
0
 public int GetAudioCount(int uid, bool isGroup)
 {
     NameValueCollection Params = new NameValueCollection();
     string CommandName;
     Params.Add("owner_id", ((isGroup) ? "-" : "") + uid);
     Params.Add("fields", "uid,aid");
     CommandName = "audio.getCount";
     var command = new AudiosCommand(CommandName, Params);
     command.ExecuteCommand();
     return command.GetCount();
 }
예제 #2
0
 public List<Sound> GetAudioFromUser(int uid, bool isGroup, int offset, int counts)
 {
     NameValueCollection Params = new NameValueCollection();
     string CommandName;
     Params.Add("owner_id", ((isGroup) ? "-" : "") + uid);
     Params.Add("offset", offset.ToString());
     Params.Add("count", counts.ToString());
     Params.Add("fields", "owner_id,offset,count");
     CommandName = "audio.get";
     var command = new AudiosCommand(CommandName, Params);
     command.ExecuteCommand();
     return command.Fill();
 }
예제 #3
0
        public List<Sound> GetAudioRecomendation(int user_id, int audioId,  int offset, bool isShuflem, int count)
        {
            NameValueCollection Params = new NameValueCollection();
            string CommandName;

            string target_audio = user_id.ToString() + "_" + audioId;
            Params.Add("target_audio", target_audio);
            Params.Add("offset", offset.ToString());
            Params.Add("count", count.ToString());
            Params.Add("shuffle", (isShuflem) ? "1" : "0");

            Params.Add("fields", "target_audio,offset,count,shuffle");
            CommandName = "audio.getRecommendations";

            var command = new AudiosCommand(CommandName, Params);
            command.ExecuteCommand();
            return command.Fill();
        }
예제 #4
0
        public List<Sound> GetAudioPopular(bool isOnly_eng, int genre_id, int offset, int count)
        {
            NameValueCollection Params = new NameValueCollection();
            string CommandName;

            Params.Add("only_eng", (isOnly_eng) ? "1" : "0");
            Params.Add("genre_id", genre_id.ToString());
            Params.Add("offset", offset.ToString());
            Params.Add("count", count.ToString());

            Params.Add("fields", "only_eng,genre_id,offset,count");
            CommandName = "audio.getPopular";

            var command = new AudiosCommand(CommandName, Params);
            command.ExecuteCommand();
            return command.Fill();
        }