Skip to content

Santarh/mastodon-unity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mastodon-unity

Streaming API の受信だけ。

Usage

var api = new Api(new Instance("friends.nico"));
api.CreateOAuthApp("YourOAuthAppName")
    .SelectMany(x => api.GetAccessToken(x.Id, x.Secret, "[email protected]", "password"))
    .Subscribe(token =>
    {
        // 本当は token はアプリの起動終了を跨いでキャッシュしてね。
        var connection = api.ConnectStreamingApi(token, Api.StreamType.LocalTimeline);
        connection.StatusesAsObservable.Subscribe(x => Debug.Log(x.ContentHtml)).AddTo(this);
        // 本当は Dispose してね。
        // connection.Dispose();
    });

Dependencies

UniRx

https://github.com/neuecc/UniRx

LitJSON

https://github.com/lbv/litjson

WebSocket-Sharp

https://github.com/sta/websocket-sharp

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages