@@ -15,6 +15,10 @@ class Client {
15
15
replyMessage(replyToken : string , messages : Message | Message []): Promise <{}>
16
16
multicast(to : string [], messages : Message | Message []): Promise <{}>
17
17
getProfile(userId : string ): Promise <Profile >
18
+ getGroupMemberProfile(groupId : string , userId : string ): Promise <Profile >
19
+ getRoomMemberProfile(roomId : string , userId : string ): Promise <Profile >
20
+ getGroupMemberIds(groupId : string ): Promise <string []>
21
+ getRoomMemberIds(roomId : string ): Promise <string []>
18
22
getMessageContent(messageId : string ): Promise <ReadableStream >
19
23
leaveGroup(groupId : string ): Promise <{}>
20
24
leaveRoom(roomId : string ): Promise <{}>
@@ -23,7 +27,7 @@ class Client {
23
27
24
28
` Message ` is a valid message object. About message object structure, please
25
29
refer to [ Send message object] ( https://devdocs.line.me/en/#send-message-object )
26
- of the official document .
30
+ of the official documentation .
27
31
28
32
` ClientConfig ` type is like below, except that it also allows fields
29
33
from [ MiddlewareConfig] ( ./middleware.md ) too.
@@ -39,7 +43,7 @@ type ClientConfig = {
39
43
For a parameter ` messages : messages : Message | Message []` , you can provide a
40
44
message object or an array of message objects. Both will work, but please beware
41
45
that there can be a limit on the number of the messages to be sent
42
- simultaneously. About the API detail, please refer to [the official document ](https://devdocs.line.me/en/#messaging-api).
46
+ simultaneously. About the API detail, please refer to [the official documentation ](https://devdocs.line.me/en/#messaging-api).
43
47
44
48
For functions returning ` Promise ` , there will be errors thrown if something
45
49
goes wrong, such as HTTP errors or parsing errors. You can catch them with the
@@ -65,7 +69,7 @@ It corresponds to the [Reply message](https://devdocs.line.me/en/#reply-message)
65
69
66
70
The first argument is a reply token, which is retrieved from a webhook event
67
71
object. For the list of replyable events, please refer to [Webhook event object](https://devdocs.line.me/en/#webhook-event-object)
68
- of the official document . The second argument is the same with one in ` pushMessage ()` .
72
+ of the official documentation . The second argument is the same with one in ` pushMessage ()` .
69
73
70
74
` ` ` js
71
75
client .replyMessage (event .replyToken , {
@@ -100,6 +104,64 @@ client.getProfile('user_id').then((profile) => {
100
104
});
101
105
```
102
106
107
+ ### ` getGroupMemberProfile(groupId: string, userId: string): Promise<Profile> `
108
+
109
+ It corresponds to the [ Group/Room Member Profile] ( https://devdocs.line.me/en/#get-group-room-member-profile ) API.
110
+
111
+ * FYI: This feature is only available for LINE@ Approved accounts or official accounts.*
112
+
113
+ The arguments are a group ID and an ID of a user in the group. Please refer to
114
+ the official documentation for the difference between this API and ` getProfile() ` .
115
+
116
+ ``` js
117
+ client .getGroupMemberProfile (' group_id' , ' user_id' ).then ((profile ) => {
118
+ console .log (profile);
119
+ })
120
+ ```
121
+
122
+ ### ` getRoomMemberProfile(roomId: string, userId: string): Promise<Profile> `
123
+
124
+ It corresponds to the [ Group/Room Member Profile] ( https://devdocs.line.me/en/#get-group-room-member-profile ) API.
125
+
126
+ * FYI: This feature is only available for LINE@ Approved accounts or official accounts.*
127
+
128
+ The arguments are a room ID and an ID of a user in the room. Please refer to the
129
+ official documentation for the difference between this API and ` getProfile() ` .
130
+
131
+ ``` js
132
+ client .getRoomMemberProfile (' room_id' , ' user_id' ).then ((profile ) => {
133
+ console .log (profile);
134
+ })
135
+ ```
136
+
137
+ ### ` getGroupMemberIds(groupId: string): Promise<string[]> `
138
+
139
+ It corresponds to the [ Group/Room Member IDs] ( https://devdocs.line.me/en/#get-group-room-member-ids ) API.
140
+
141
+ * FYI: This feature is only available for LINE@ Approved accounts or official accounts.*
142
+
143
+ The argument is a group ID and the method returns a promise of an array of user IDs.
144
+
145
+ ``` js
146
+ client .getGroupMemberIds (' group_id' ).then ((ids ) => {
147
+ ids .forEach ((id ) => console .log (id));
148
+ })
149
+ ```
150
+
151
+ ### ` getRoomMemberIds(roomId: string): Promise<string[]> `
152
+
153
+ It corresponds to the [ Group/Room Member IDs] ( https://devdocs.line.me/en/#get-group-room-member-ids ) API.
154
+
155
+ * FYI: This feature is only available for LINE@ Approved accounts or official accounts.*
156
+
157
+ The argument is a room ID and the method returns a promise of an array of user IDs.
158
+
159
+ ``` js
160
+ client .getRoomMemberIds (' room_id' ).then ((ids ) => {
161
+ ids .forEach ((id ) => console .log (id));
162
+ })
163
+ ```
164
+
103
165
### ` getMessageContent(messageId: string): Promise<ReadableStream> `
104
166
105
167
It corresponds to the [ Content] ( https://devdocs.line.me/en/#content ) API.
0 commit comments