Class: TumblRb::Client

Inherits:
Object
  • Object
show all
Includes:
Blogs, Connection, Request
Defined in:
lib/tumbl_rb/client.rb,
lib/tumbl_rb/client/blogs.rb

Defined Under Namespace

Modules: Blogs

Instance Method Summary collapse

Methods included from Blogs

#avatar, #followers, #info, #posts

Methods included from Request

#get

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



12
13
14
15
16
17
# File 'lib/tumbl_rb/client.rb', line 12

def initialize(options={})
  options = TumblRb.options.merge(options)
  Configuration::VALID_OPTIONS_KEYS.each do |key|
    send("#{key}=", options[key])
  end
end

Instance Method Details

#api_urlString

Provides the URL for accessing the API

Returns:

  • (String)


22
23
24
# File 'lib/tumbl_rb/client.rb', line 22

def api_url
  "http://api.tumblr.com"
end

#oauthed?Boolean

Determine if an consumer_oauth_key has been set

Returns:

  • (Boolean)


29
30
31
# File 'lib/tumbl_rb/client.rb', line 29

def oauthed?
  !consumer_oauth_key.nil?
end