This repository has been archived by the owner on Oct 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathtsina.js
140 lines (122 loc) · 2.78 KB
/
tsina.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
//微博 api
var api = {
HOST: 'https://api.weibo.com'
, PREPATH: '/2/'
//微博列表
, statuses: {
home: 'statuses/home_timeline'
, "public": 'statuses/public_timeline'
, friends: 'statuses/friends_timeline'
, user: {
path: 'statuses/user_timeline'
, expect: 'screen_name'
}
, bilateral: 'statuses/bilateral_timeline'
, mentions: 'statuses/mentions'
, reposts: {
path: 'statuses/repost_by_me'
, promise: 'reposts'
}
}
//单个微博操作
, status: {
show: {
path: 'statuses/show'
, expect: 'id'
}
, update: {
path: 'statuses/update'
, method: 'post'
, expect: 'status'
}
, repost: {
path: 'statuses/repost'
, method: 'post'
, expect: 'id'
}
, remove: {
path: 'statuses/destroy'
, method: 'post'
, expect: 'id'
}
}
, user: {
path: 'users/show'
, promise: 'user'
, expect: 'screen_name'
}
, hot: {
repost: 'statuses/hot/repost_daily'
, comment: 'statuses/hot/comments_daily'
, repost_weekly: 'statuses/hot/repost_weekly'
, comment_weekly: 'statuses/hot/comments_weekly'
}
//评论
, comment: {
comment: {
path: 'comments/create'
, method: 'post'
, expect: ['id', 'comment']
}
, reply: {
path: 'comments/reply'
, method: 'post'
, expect: ['id', 'cid', 'comment']
}
, remove: {
path: 'comments/destroy'
, expect: 'cid'
, method: 'post'
}
}
//评论列表
, comments: {
to_me: 'comments/to_me'
, by_me: 'comments/by_me'
, mentions: 'comments/mentions'
, show: {
path: 'comments/show'
, expect: 'id'
}
}
//关系
, friends: {
common: 'friendships/friends/in_common'
, friends: {
path: 'friendships/friends'
, expect: 'screen_name'
}
, bilateral: 'friendships/friends/bilateral'
, followers: {
path: 'friendships/followers'
, expect: 'screen_name'
}
, active: 'friendships/followers/active'
, create: {
path: 'friendships/create'
, method: 'post'
, expect: 'screen_name'
, promise: 'user'
}
, destroy: {
path: 'friendships/destroy'
, method: 'post'
, expect: 'screen_name'
, promise: 'user'
}
}
//通知
, remind: {
unread: 'remind/unread_count'
}
, suggestions: {
hot: {
path: 'suggestions/statuses/hot'
, promise: 'suggestions_statuses'
}
}
, favorite: {
list: 'favorites/ids'
}
};
module.exports = api;