Опрос. См. описание . Раздел "Опрос".
Inheritance: MediaAttachment
示例#1
0
文件: Poll.cs 项目: justloot/vk
        internal static Poll FromJson(VkResponse response)
        {
            var poll = new Poll();

            poll.Id = response["id"];
            poll.OwnerId = response["owner_id"];
            poll.Question = response["question"];

            return poll;
        }
示例#2
0
文件: Poll.cs 项目: G-IT-ED/vk
        internal static Poll FromJson(VkResponse response)
        {
            var poll = new Poll();

            poll.Id = response["id"];
	        poll.OwnerId = response["owner_id"];
            poll.Question = response["question"];
            poll.Created = response["created"];
            poll.Votes = response["votes"];
            poll.AnswerId = response["answer_id"];
            poll.IsAnonymous = response["anonymous"];
            poll.Answers = response["answers"];

            return poll;
        }
示例#3
0
文件: Poll.cs 项目: kadkin/vk
		/// <summary>
		/// Разобрать из json.
		/// </summary>
		/// <param name="response">Ответ сервера.</param>
		/// <returns></returns>
		internal static Poll FromJson(VkResponse response)
        {
			var poll = new Poll
			{
				Id = response["id"] ?? response["poll_id"],
				OwnerId = response["owner_id"],
				Question = response["question"],
				Created = response["created"],
				Votes = response["votes"],
				AnswerId = response["answer_id"],
				IsAnonymous = response["anonymous"],
				Answers = response["answers"]
			};

			return poll;
        }