Pleroma API wrapper for .NET Standard 2.0.
Pleroma API is compatible with Mastodon API, you can use this library as Disboard.Mastodon.
This is a generic Pleroma API wrapper, we do not implement features unique to the instance.
Note: If some requests retuens 403, please check instance's configuration.
var pleroma = new PleromaClient("pl.smuglo.li");
// register app
var scopes = AccessScope.Read | AccessScope.Write | AccessScope.Follow;
await pleroma.Apps.RegisterAsync("Orion", Constants.RedirectUriForClient, scopes);
// auth
Process.Start(pleroma.Auth.AuthorizeUrl(Constants.RedirectUriForClient, scopes));
var code = Console.ReadLine();
await pleroma.Auth.AccessTokenAsync(Constants.RedirectUriForClient, code);
// send new status
await pleroma.Statuses.UpdateAsync("Hello, Pleroma!");
// Pleroma only API
var emojis = await pleroma.Pleroma.EmojiAsync();
// Streaming API
var disposable = pleroma.Streaming.PublicAsObservable().Subscribe((w) => {
w.Dump();
});
await Task.Delay(1000 * 60);
disposable.Dispose();