mastodon-api:Mastodon API的ruby接口

时间:2021-02-03 13:18:40
【文件属性】:
文件名称:mastodon-api:Mastodon API的ruby接口
文件大小:143KB
文件格式:ZIP
更新时间:2021-02-03 13:18:40
mastodon mastodon-api MastodonRuby Mastodon APIRuby宝石 API的Ruby接口。 安装 gem 'mastodon-api', require: 'mastodon' 文献资料 所有文档都可以在上。 用法 假设您已经有给定Mastodon实例上的用户访问令牌: require 'mastodon' client = Mastodon::REST::Client.new(base_url: 'https://mastodon.social', bearer_token: 'your_access_token') 如果需要获取访问令牌,则必须首先确保在给定的Mastodon实例上具有应用程序的客户端ID和客户端密钥(应将其保存以备将来使用): client.create_app('My Ruby App', 'http://mywebsite.com/callback') 然后,您可以在标准OAuth 2授权流程中使用客户端ID和密码。

网友评论