Uwaa/Pleroma.Test/Program.cs

33 lines
894 B
C#
Raw Normal View History

2024-11-22 09:55:08 +01:00
using System;
using System.Threading.Tasks;
namespace Uwaa.Pleroma.Test;
static class Program
{
static void Main(string[] args)
{
MainInline().Wait();
}
static async Task MainInline()
{
2024-12-11 03:49:46 +01:00
Pleroma client = new Pleroma("localhost", "Bearer abcdefghijklmnopqrstuvwxyz");
2024-11-22 09:55:08 +01:00
Account account = await client.GetAccount();
Status[] statuses = await client.GetTimeline();
Console.WriteLine($"Account: {account} ({account.ID})");
Console.WriteLine("Public statuses:");
foreach (Status status in statuses)
{
Console.Write('\t');
Console.Write(status.CreatedAt.ToShortDateString());
Console.Write(' ');
Console.Write(status.CreatedAt.ToLongTimeString());
Console.Write(' ');
Console.WriteLine(status);
}
Console.ReadKey();
}
}