Опрос. См. описание . Раздел "Опрос".
Inheritance: MediaAttachment
Example #1
0
File: Poll.cs Project: 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;
        }
Example #2
0
File: Poll.cs Project: 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;
        }
Example #3
0
File: Poll.cs Project: 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;
        }