Skip to content

Latest commit

 

History

History
113 lines (92 loc) · 2 KB

README.md

File metadata and controls

113 lines (92 loc) · 2 KB

Misharp

Yet Another Misskey Library For C#

This library of Models and Controlers are made from MisskeyAPIGenCode

Dependedencies Library

  • System.Text.Json

Supported Environment

  • Net6.0+

Supported Endpoints

status meaning
working
not working check
× not support(yet)
name supported
Admin
Announcements
Antennas
Ap ×
App
Auth
Blocking
Channels
Charts ×
Clips
Drive
Email-Address
Emoji
Emojis
Endpoint ×
Endpoints
Federation
Fetch-External-Resources ×
Fetch-Rss
Flash
Following
Gallery
Get-Avatar-Decoration
Get-Online-Users-Count ×
Hashtags
I
Invite
Meta
Mute
My
Notes
Notifications ×
Pages
Ping
Pinned-Users
Promo
Renote-Mute
Request-Reset-Password ×
Reset-Password ×
Retention ×
Roles
Server-Info ×
Stats
Sw
Test ×
Username
Users

Example

Tips: Get token with browser option will be add.

How to get Token?

https://misskey-hub.net/en/docs/api#getting-an-access-token

Post note

var app = new App("misskey.04.si", "abcdef123...");
var note = await app.NotesApi.Create(text: "Hello world");
Console.WriteLine(note.ToString());

Post note with file

var app = new App("misskey.04.si", "abcdef123...");
var file = await app.DriveApi.FilesApi.Create(File.OpenRead(@"img.png"));
var note = await app.NotesApi.Create(text: "hello world", fileIds: new List<string> { file.Id });
Console.WriteLine(note.ToString());

Get my user info

var app = new App("misskey.04.si", "abcdef123...");
var user = await app.IApi.I();
Console.WriteLine(user.ToString());

Get note info

var app = new App("misskey.04.si", "abcdef123...");
var note = await app.NotesApi.Show("zyxwv987...");
Console.WriteLine(note.ToString());