tida_sina_weibo 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tida_sina_weibo/api_wrapper.rb +14 -14
- data/lib/tida_sina_weibo/version.rb +1 -1
- metadata +1 -1
@@ -18,59 +18,59 @@ module TidaSinaWeibo
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def status_update(content)
|
21
|
-
post_request(ApiSettings.
|
21
|
+
post_request(ApiSettings.api.status.update, :status => content)
|
22
22
|
end
|
23
23
|
|
24
24
|
def status_upload(content, image_path)
|
25
|
-
post_request(ApiSettings.
|
25
|
+
post_request(ApiSettings.api.status.upload, :status => content, :pic => File.new(image_path, 'rb'))
|
26
26
|
end
|
27
27
|
|
28
28
|
def status_user_timeline(uid, page = 1, count = 100)
|
29
|
-
get_request(ApiSettings.
|
29
|
+
get_request(ApiSettings.api.status.user_timeline, :params => {:uid => uid, :page => page, :count => count})
|
30
30
|
end
|
31
31
|
|
32
32
|
def status_repost_timeline(post_id, page = 1)
|
33
|
-
get_request(ApiSettings.
|
33
|
+
get_request(ApiSettings.api.status.repost_timeline, :params => {:id => post_id, :page => page, :count => 50})
|
34
34
|
end
|
35
35
|
|
36
36
|
def comments_show(post_id, page = 1)
|
37
|
-
get_request(ApiSettings.
|
37
|
+
get_request(ApiSettings.api.comments.show, :params => {:id => post_id, :page => page, :count => 50})
|
38
38
|
end
|
39
39
|
|
40
40
|
def status_show(wb_post_id)
|
41
|
-
get_request(ApiSettings.
|
41
|
+
get_request(ApiSettings.api.status.show, :params => {:id => wb_post_id})
|
42
42
|
end
|
43
43
|
|
44
44
|
def user_show(uid, is_number_id = true)
|
45
45
|
if is_number_id
|
46
|
-
get_request(ApiSettings.
|
46
|
+
get_request(ApiSettings.api.user.show, {:params => {:uid => uid}})
|
47
47
|
else
|
48
|
-
get_request(ApiSettings.
|
48
|
+
get_request(ApiSettings.api.user.show, {:params => {:screen_name => uid}})
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
52
|
def user_domain_show(domain)
|
53
|
-
get_request(ApiSettings.
|
53
|
+
get_request(ApiSettings.api.user.domain_show, :params => {:domain => domain})
|
54
54
|
end
|
55
55
|
|
56
56
|
def friendships_followers(uid, cursor)
|
57
|
-
get_request(ApiSettings.
|
57
|
+
get_request(ApiSettings.api.friendships.followers, :params => {:uid => uid, :cursor => cursor})
|
58
58
|
end
|
59
59
|
|
60
60
|
def friendships_followers_ids(uid, cursor)
|
61
|
-
get_request(ApiSettings.
|
61
|
+
get_request(ApiSettings.api.friendships.followers_ids, :params => {:uid => uid, :cursor => cursor})
|
62
62
|
end
|
63
63
|
|
64
64
|
def tags(uid)
|
65
|
-
get_request(ApiSettings.
|
65
|
+
get_request(ApiSettings.api.tags, :params => {:uid => uid})
|
66
66
|
end
|
67
67
|
|
68
68
|
def queryid(mid)
|
69
|
-
get_request(ApiSettings.
|
69
|
+
get_request(ApiSettings.api.status.queryid, {:params => {:mid => mid, :type => 1, :isBase62 => 1}})
|
70
70
|
end
|
71
71
|
|
72
72
|
def querymid(id, batch = false)
|
73
|
-
get_request(ApiSettings.
|
73
|
+
get_request(ApiSettings.api.status.querymid, {:params => {:id => id, :type => 1, :is_batch => batch ? 1 : 0}})
|
74
74
|
end
|
75
75
|
|
76
76
|
def querymids(ids)
|