@oxyhq/core 3.4.19 → 3.5.0
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/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/mixins/OxyServices.user.js +19 -0
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/mixins/OxyServices.user.js +19 -0
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/mixins/OxyServices.user.d.ts +25 -0
- package/package.json +1 -1
- package/src/index.ts +4 -0
- package/src/mixins/OxyServices.user.ts +37 -0
|
@@ -328,6 +328,25 @@ export function OxyServicesUserMixin(Base) {
|
|
|
328
328
|
throw this.handleError(error);
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
|
+
/**
|
|
332
|
+
* Follow multiple users in a single request.
|
|
333
|
+
*
|
|
334
|
+
* POSTs `/users/follow/bulk` with `{ userIds }` (server caps the batch at
|
|
335
|
+
* 200). Returns the per-user outcomes and the count of users newly
|
|
336
|
+
* followed. An empty `userIds` array resolves immediately with an empty
|
|
337
|
+
* result and performs no network call.
|
|
338
|
+
*/
|
|
339
|
+
async followUsers(userIds) {
|
|
340
|
+
if (userIds.length === 0) {
|
|
341
|
+
return { results: [], followedCount: 0 };
|
|
342
|
+
}
|
|
343
|
+
try {
|
|
344
|
+
return await this.makeRequest('POST', '/users/follow/bulk', { userIds }, { cache: false });
|
|
345
|
+
}
|
|
346
|
+
catch (error) {
|
|
347
|
+
throw this.handleError(error);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
331
350
|
/**
|
|
332
351
|
* Unfollow a user
|
|
333
352
|
*/
|