Skip to content

Commit

Permalink
Merge pull request #608 from slay9090/patch-1
Browse files Browse the repository at this point in the history
Add PostId response
  • Loading branch information
inyutin-maxim authored Jun 1, 2018
2 parents e528438 + 3736bb7 commit 774bb3e
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions VkNet/Model/NewsSearchResult.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
Expand Down Expand Up @@ -73,8 +73,19 @@ public class NewsSearchResult
/// <summary>
/// Тип записи
/// </summary>
///




public PostType PostType { get; set; }

/// <summary>
/// Идентификатор записи при PostType == reply
/// </summary>

public int? PostId { get; set; } //Будет иметь значение null, кроме случаев при "post_type": "reply"

/// <summary>
/// Разобрать из json.
/// </summary>
Expand All @@ -95,9 +106,10 @@ public static NewsSearchResult FromJson(VkResponse response)
, Geo = response[key: "geo"]
, SignerId = response[key: "signer_id"]
, PostType = response[key: "post_type"]
, PostId = response[key: "post_id"] //
};

return newsSearchResult;
}
}
}
}

0 comments on commit 774bb3e

Please sign in to comment.