emusks 2.0.4 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/graphql.js +5 -13
- package/package.json +1 -1
- package/src/graphql.js +34 -12
- package/src/helpers/account.js +267 -269
- package/src/helpers/bookmarks.js +101 -103
- package/src/helpers/communities.js +236 -238
- package/src/helpers/dms.js +129 -131
- package/src/helpers/index.js +50 -31
- package/src/helpers/lists.js +222 -224
- package/src/helpers/media.js +137 -139
- package/src/helpers/notifications.js +42 -44
- package/src/helpers/search.js +117 -119
- package/src/helpers/spaces.js +47 -49
- package/src/helpers/syndication.js +23 -25
- package/src/helpers/timelines.js +76 -78
- package/src/helpers/topics.js +87 -89
- package/src/helpers/trends.js +74 -76
- package/src/helpers/tweets.js +302 -304
- package/src/helpers/users.js +287 -289
- package/src/index.js +23 -19
- package/src/static/graphql.js +1 -1
package/src/helpers/topics.js
CHANGED
|
@@ -1,99 +1,97 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
},
|
|
1
|
+
export async function follow(topicId) {
|
|
2
|
+
return await this.graphql("TopicFollow", {
|
|
3
|
+
body: { variables: { topic_id: topicId } },
|
|
4
|
+
});
|
|
5
|
+
}
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
export async function unfollow(topicId) {
|
|
8
|
+
return await this.graphql("TopicUnfollow", {
|
|
9
|
+
body: { variables: { topic_id: topicId } },
|
|
10
|
+
});
|
|
11
|
+
}
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
export async function notInterested(topicId) {
|
|
14
|
+
return await this.graphql("TopicNotInterested", {
|
|
15
|
+
body: { variables: { topic_id: topicId } },
|
|
16
|
+
});
|
|
17
|
+
}
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
export async function undoNotInterested(topicId) {
|
|
20
|
+
return await this.graphql("TopicUndoNotInterested", {
|
|
21
|
+
body: { variables: { topic_id: topicId } },
|
|
22
|
+
});
|
|
23
|
+
}
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
export async function get(topicId) {
|
|
26
|
+
return await this.graphql("TopicByRestId", {
|
|
27
|
+
variables: { topicId },
|
|
28
|
+
});
|
|
29
|
+
}
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
31
|
+
export async function landingPage(topicId, opts = {}) {
|
|
32
|
+
return await this.graphql("TopicLandingPage", {
|
|
33
|
+
variables: {
|
|
34
|
+
topicId,
|
|
35
|
+
count: opts.count || 20,
|
|
36
|
+
cursor: opts.cursor,
|
|
37
|
+
...opts.variables,
|
|
38
|
+
},
|
|
39
|
+
fieldToggles: {
|
|
40
|
+
withArticlePlainText: false,
|
|
41
|
+
withArticleRichContentState: false,
|
|
42
|
+
withAuxiliaryUserLabels: false,
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
}
|
|
47
46
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
export async function toFollow(opts = {}) {
|
|
48
|
+
return await this.graphql("TopicToFollowSidebar", {
|
|
49
|
+
variables: {
|
|
50
|
+
count: opts.count || 20,
|
|
51
|
+
cursor: opts.cursor,
|
|
52
|
+
...opts.variables,
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
}
|
|
57
56
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
export async function manage(opts = {}) {
|
|
58
|
+
return await this.graphql("TopicsManagementPage", {
|
|
59
|
+
variables: {
|
|
60
|
+
count: opts.count || 20,
|
|
61
|
+
cursor: opts.cursor,
|
|
62
|
+
...opts.variables,
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
}
|
|
67
66
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
67
|
+
export async function picker(opts = {}) {
|
|
68
|
+
return await this.graphql("TopicsPickerPage", {
|
|
69
|
+
variables: {
|
|
70
|
+
count: opts.count || 20,
|
|
71
|
+
cursor: opts.cursor,
|
|
72
|
+
...opts.variables,
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
}
|
|
77
76
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
77
|
+
export async function pickerById(topicId, opts = {}) {
|
|
78
|
+
return await this.graphql("TopicsPickerPageById", {
|
|
79
|
+
variables: {
|
|
80
|
+
topicId,
|
|
81
|
+
count: opts.count || 20,
|
|
82
|
+
cursor: opts.cursor,
|
|
83
|
+
...opts.variables,
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
}
|
|
88
87
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
});
|
|
88
|
+
export async function viewing(userId, opts = {}) {
|
|
89
|
+
return await this.graphql("ViewingOtherUsersTopicsPage", {
|
|
90
|
+
variables: {
|
|
91
|
+
userId,
|
|
92
|
+
count: opts.count || 20,
|
|
93
|
+
cursor: opts.cursor,
|
|
94
|
+
...opts.variables,
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
}
|
package/src/helpers/trends.js
CHANGED
|
@@ -1,86 +1,84 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
},
|
|
1
|
+
export async function available() {
|
|
2
|
+
const res = await this.v1_1("trends/available", {});
|
|
3
|
+
return await res.json();
|
|
4
|
+
}
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
export async function history(opts = {}) {
|
|
7
|
+
return await this.graphql("TrendHistory", {
|
|
8
|
+
variables: {
|
|
9
|
+
count: opts.count || 20,
|
|
10
|
+
cursor: opts.cursor,
|
|
11
|
+
...opts.variables,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
}
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
export async function relevantUsers(trendName, opts = {}) {
|
|
17
|
+
return await this.graphql("TrendRelevantUsers", {
|
|
18
|
+
variables: {
|
|
19
|
+
trend_name: trendName,
|
|
20
|
+
...opts.variables,
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
}
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
25
|
+
export async function explore(opts = {}) {
|
|
26
|
+
return await this.graphql("ExplorePage", {
|
|
27
|
+
variables: {
|
|
28
|
+
count: opts.count || 20,
|
|
29
|
+
cursor: opts.cursor,
|
|
30
|
+
...opts.variables,
|
|
31
|
+
},
|
|
32
|
+
fieldToggles: {
|
|
33
|
+
withArticlePlainText: false,
|
|
34
|
+
withArticleRichContentState: false,
|
|
35
|
+
withAuxiliaryUserLabels: false,
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
}
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
40
|
+
export async function exploreSidebar(opts = {}) {
|
|
41
|
+
return await this.graphql("ExploreSidebar", {
|
|
42
|
+
variables: {
|
|
43
|
+
count: opts.count || 20,
|
|
44
|
+
cursor: opts.cursor,
|
|
45
|
+
...opts.variables,
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
}
|
|
50
49
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
export async function report(trendId) {
|
|
51
|
+
return await this.graphql("ReportTrend", {
|
|
52
|
+
body: { variables: { trend_id: trendId } },
|
|
53
|
+
});
|
|
54
|
+
}
|
|
56
55
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
export async function save(trendId) {
|
|
57
|
+
return await this.graphql("SaveTrend", {
|
|
58
|
+
body: { variables: { trend_id: trendId } },
|
|
59
|
+
});
|
|
60
|
+
}
|
|
62
61
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
export async function action(trendId, action) {
|
|
63
|
+
return await this.graphql("ActionTrend", {
|
|
64
|
+
body: { variables: { trend_id: trendId, action } },
|
|
65
|
+
});
|
|
66
|
+
}
|
|
68
67
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
export async function getById(trendId) {
|
|
69
|
+
return await this.graphql("AiTrendByRestId", {
|
|
70
|
+
variables: { trendId },
|
|
71
|
+
});
|
|
72
|
+
}
|
|
74
73
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
export async function exploreSettings() {
|
|
75
|
+
const res = await this.v2("guide/get_explore_settings", {});
|
|
76
|
+
return await res.json();
|
|
77
|
+
}
|
|
79
78
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
});
|
|
79
|
+
export async function setExploreSettings(params = {}) {
|
|
80
|
+
const res = await this.v2("guide/set_explore_settings", {
|
|
81
|
+
body: JSON.stringify(params),
|
|
82
|
+
});
|
|
83
|
+
return await res.json();
|
|
84
|
+
}
|