diff --git a/readme.md b/readme.md index 33aecba775595c4cd1a39c5e0c6886e6b4aa8416..f8760f7ca1dbd988952baa264eca473abff3d0a2 100644 --- a/readme.md +++ b/readme.md @@ -32,5 +32,16 @@ Console.WriteLine(userMe.Response.User.Username); // Test_User var userById = await lq.UserById("62b3515989cdb45c9e06e010"); Console.WriteLine($"{userById.Response.User.Status?.Type} {userById.Response.User.Status?.Content}"); // Playing Stardew Valley +// Get a channel +var speakySpeaky = await lq.ChannelById(new ChannelId("643aa2e550c913775aec2057")); +Console.WriteLine(speakySpeaky.Id); + +// Messages will be automatically populated and sorted, lets get the content of the latest message +Console.WriteLine(speakySpeaky.Messages.Last().Content); + +// Getting the same channel again will not make an API call, instead the already known channel is returned +var speakySpeaky2 = await lq.ChannelById(new ChannelId("643aa2e550c913775aec2057")); + +Console.WriteLine(speakySpeaky2.Messages.Last().Timestamp); ``` \ No newline at end of file