Exemple #1
0
 public List<QuestionEntry> Get(object qid, QuestionSortMode? sort, int? needProfiles, string nameCase, int? count, int? offset)
 {
     this.Manager.Method("questions.get");
     if (qid != null)
     {
         if (qid is int)
         {
             this.Manager.Params("qid",qid);
         }
         if (qid is string)
         {
             this.Manager.Params("uids", qid);
         }
     }
     if (sort != null)
     {
         this.Manager.Params("sort", sort);
     }
     if (needProfiles != null)
     {
         this.Manager.Params("need_profiles", needProfiles);
     }
     if (nameCase != null)
     {
         this.Manager.Params("name_case", nameCase);
     }
     if (count != null)
     {
         this.Manager.Params("count", count);
     }
     if (offset != null)
     {
         this.Manager.Params("offset", offset);
     }
     string resp = this.Manager.Execute().GetResponseString();
     if (this.Manager.MethodSuccessed)
     {
         XmlDocument x = this.Manager.GetXmlDocument(resp);
         if (x.SelectSingleNode("/response").InnerText.Equals("0"))
         {
             return null;
         }
         return this.buildQuestionEntryList(x);
     }
     return null;
 }
        public List<QuestionEntry> GetOutbound( QuestionSortMode? sort, int? needProfiles, string nameCase, int? count, int? offset)
        {
            this.Manager.Method("questions.getOutbound", new object[] { "sort", sort, "need_profiles", needProfiles, "name_case", nameCase, "count", count, "offset", offset});

            XmlDocument x = this.Manager.Execute().GetResponseXml();
            if (x.InnerText.Equals(""))
            {
                return null;
            }
            return this.buildQuestionEntryList(x);
        }
Exemple #3
0
 public List<QuestionAnswerVoter> GetAnswerVotes(int uid, int aid, QuestionSortMode? sort, int? needProfiles, int? count, int? offset)
 {
     this.Manager.Method("questions.getAnswerVotes");
     this.Manager.Params("aid", aid);
     this.Manager.Params("uid", uid);
     if (sort != null)
     {
         this.Manager.Params("sort", sort);
     }
     if (needProfiles != null)
     {
         this.Manager.Params("need_profiles", needProfiles);
     }
     if (count != null)
     {
         this.Manager.Params("count", count);
     }
     if (offset != null)
     {
         this.Manager.Params("offset", offset);
     }
     string resp = this.Manager.Execute().GetResponseString();
     if (this.Manager.MethodSuccessed)
     {
         XmlDocument x = this.Manager.GetXmlDocument(resp);
         if (x.SelectSingleNode("/response").InnerText.Equals("0"))
         {
             return null;
         }
         return this.buildQuestionVotersList(x);
     }
     return null;
 }
        public List<QuestionAnswer> GetAnswers(int qid, QuestionSortMode? sort, int? needProfiles, int? count, int? offset)
        {
            this.Manager.Method("questions.getAnswers", new object[] { "qid", qid, "sort", sort, "need_profiles", needProfiles, "count", count, "offset", offset });

            XmlDocument x = this.Manager.Execute().GetResponseXml();
            if (x.InnerText.Equals(""))
            {
                return null;
            }

            return this.buildQuestionAnswersList(x);
        }