From 3a57405035eb03114c17a79c5e7d86f8c681a07d Mon Sep 17 00:00:00 2001 From: Indra Date: Sat, 8 Jul 2023 00:55:40 +0200 Subject: [PATCH] Fix GetTimeline --- BlueskySharp.Tests/PostTests.cs | 2 +- BlueskySharp/Response/Feed.cs | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/BlueskySharp.Tests/PostTests.cs b/BlueskySharp.Tests/PostTests.cs index 1e9b5f8..2050e03 100644 --- a/BlueskySharp.Tests/PostTests.cs +++ b/BlueskySharp.Tests/PostTests.cs @@ -26,7 +26,7 @@ public async Task TestGetTimeline() { var t = await _client.GetTimelineAsync(); - Assert.IsTrue(t.Posts.Length > 0); + Assert.IsTrue(t.Feed.Length > 0); } } } diff --git a/BlueskySharp/Response/Feed.cs b/BlueskySharp/Response/Feed.cs index 785a3d0..86d0a8d 100644 --- a/BlueskySharp/Response/Feed.cs +++ b/BlueskySharp/Response/Feed.cs @@ -56,9 +56,14 @@ public record Post public string[] Labels { set; get; } } + public record FeedViewPost + { + public Post Post { get; set; } + } + public record Timeline { public string Cursor { set; get; } - public Post[] Posts { set; get; } + public FeedViewPost[] Feed { set; get; } } }