class Mastodon::Client
Constants
- DEFAULT_TIMEOUT
Attributes
base_url[R]
bearer_token[R]
timeout[R]
Public Class Methods
new(options = {})
click to toggle source
@param options [Hash] @option options :base_url [String] URL of the instance you want to
connect to
@option options :bearer_token [String] OAuth access token for your
authenticated user
# File lib/mastodon/client.rb, line 20 def initialize(options = {}) @base_url = options[:base_url] @bearer_token = options[:bearer_token] @timeout = DEFAULT_TIMEOUT.merge(options[:timeout] || {}) end
Public Instance Methods
user_agent()
click to toggle source
User agent of the client @return [String]
# File lib/mastodon/client.rb, line 28 def user_agent @user_agent ||= "MastodonRubyGem/#{Mastodon::Version}" end