Ejemplo n.º 1
0
        //TODO: Add GetSmilesOfAnswer

        public async static Task <AnswersObject> GetAnswersObject(string path)
        {
            dynamic dynAnswersobj = await GetResultFromURL(path);

            AnswersObject answersObj = new AnswersObject();

            answersObj.Count = dynAnswersobj.count;

            ObservableCollection <AnswerObject> answers = new ObservableCollection <AnswerObject>();

            foreach (var answer in dynAnswersobj.answers)
            {
                answers.Add(AnswerObject.fromDynamic(answer));
            }

            answersObj.Answers = answers;

            return(answersObj);
        }
Ejemplo n.º 2
0
        public async static Task <AnswerObject> GetAnswer(int ansId)
        {
            dynamic dynAnsObj = await GetResultFromURL(ANSWER_PATH + ansId + ".json");

            return(AnswerObject.fromDynamic(dynAnsObj));
        }