Module: Tumblr::Client::User

Included in:
Tumblr::Client
Defined in:
lib/tumblr/user.rb

Instance Method Summary collapse

Instance Method Details

#dashboard(options = {}) ⇒ Object



8
9
10
11
12
13
# File 'lib/tumblr/user.rb', line 8

def dashboard(options={})
  valid_opts = [:limit, :offset, :type, :since_id, :reblog_info, :notes_info]
  if valid_options(valid_opts, options)
    get("v2/user/dashboard", options)
  end
end

#follow(url) ⇒ Object



23
24
25
# File 'lib/tumblr/user.rb', line 23

def follow(url)
  follow = post("v2/user/follow", {:url => url})
end

#following(offset = 0, limit = 20) ⇒ Object



19
20
21
# File 'lib/tumblr/user.rb', line 19

def following(offset=0, limit=20)
  following = get("v2/user/following", {:limit => limit, :offset => offset})
end

#infoObject



4
5
6
# File 'lib/tumblr/user.rb', line 4

def info
  info = get("v2/user/info")
end

#like(id, reblog_key) ⇒ Object



31
32
33
# File 'lib/tumblr/user.rb', line 31

def like(id, reblog_key)
  like = post("v2/user/like", {:id => id, :reblog_key => reblog_key})
end

#likes(offset = 0, limit = 20) ⇒ Object



15
16
17
# File 'lib/tumblr/user.rb', line 15

def likes(offset=0, limit=20)
  likes = get("v2/user/likes", {:limit => limit, :offset => offset})
end

#unfollow(url) ⇒ Object



27
28
29
# File 'lib/tumblr/user.rb', line 27

def unfollow(url)
  follow = post("v2/user/unfollow", {:url => url})
end

#unlike(id, reblog_key) ⇒ Object



35
36
37
# File 'lib/tumblr/user.rb', line 35

def unlike(id, reblog_key)
  unlike = post("v2/user/unlike", {:id => id, :reblog_key => reblog_key})
end