@book000/pixivts 0.62.1-beta.1 → 0.63.0-beta.1

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/index.js CHANGED
@@ -1527,6 +1527,95 @@ var UserResource = class {
1527
1527
  const body = buildParams({ userId: String(params.userId) });
1528
1528
  return this.#http.post("/v1/user/follow/delete", body.toString());
1529
1529
  }
1530
+ /**
1531
+ * Fetches users related to a seed user.
1532
+ * GET /v1/user/related
1533
+ *
1534
+ * @param params - Request parameters
1535
+ */
1536
+ related(params) {
1537
+ return PaginatedResultAsync.fromResultAsync(this.#http.get("/v1/user/related", buildParams({
1538
+ seedUserId: params.seedUserId,
1539
+ filter: params.filter ?? "for_ios",
1540
+ offset: params.offset
1541
+ })), this.#http, (page) => page.userPreviews);
1542
+ }
1543
+ /**
1544
+ * Fetches recommended users.
1545
+ * GET /v1/user/recommended
1546
+ *
1547
+ * @param params - Request parameters
1548
+ */
1549
+ recommended(params = {}) {
1550
+ return PaginatedResultAsync.fromResultAsync(this.#http.get("/v1/user/recommended", buildParams({
1551
+ filter: params.filter ?? "for_ios",
1552
+ offset: params.offset
1553
+ })), this.#http, (page) => page.userPreviews);
1554
+ }
1555
+ /**
1556
+ * Fetches the list of users following a user.
1557
+ * GET /v1/user/follower
1558
+ *
1559
+ * @param params - Request parameters
1560
+ */
1561
+ follower(params) {
1562
+ return PaginatedResultAsync.fromResultAsync(this.#http.get("/v1/user/follower", buildParams({
1563
+ userId: params.userId,
1564
+ filter: params.filter ?? "for_ios",
1565
+ offset: params.offset
1566
+ })), this.#http, (page) => page.userPreviews);
1567
+ }
1568
+ /**
1569
+ * Fetches a user's myPixiv users.
1570
+ * GET /v1/user/mypixiv
1571
+ *
1572
+ * @param params - Request parameters
1573
+ */
1574
+ mypixiv(params) {
1575
+ return PaginatedResultAsync.fromResultAsync(this.#http.get("/v1/user/mypixiv", buildParams({
1576
+ userId: params.userId,
1577
+ offset: params.offset
1578
+ })), this.#http, (page) => page.userPreviews);
1579
+ }
1580
+ /**
1581
+ * Fetches a user list.
1582
+ * GET /v2/user/list
1583
+ *
1584
+ * Returns plain `PixivUser` objects under a `users` key, unlike sibling
1585
+ * endpoints that return `PixivUserPreviewItem` under `user_previews`.
1586
+ *
1587
+ * @param params - Request parameters
1588
+ */
1589
+ list(params) {
1590
+ return PaginatedResultAsync.fromResultAsync(this.#http.get("/v2/user/list", buildParams({
1591
+ userId: params.userId,
1592
+ filter: params.filter ?? "for_ios",
1593
+ offset: params.offset
1594
+ })), this.#http, (page) => page.users);
1595
+ }
1596
+ /**
1597
+ * Fetches a user's illust bookmark tags, with the number of bookmarks under each tag.
1598
+ * GET /v1/user/bookmark-tags/illust
1599
+ *
1600
+ * @param params - Request parameters
1601
+ */
1602
+ bookmarkTagsIllust(params) {
1603
+ return PaginatedResultAsync.fromResultAsync(this.#http.get("/v1/user/bookmark-tags/illust", buildParams({
1604
+ userId: params.userId,
1605
+ restrict: params.restrict ?? "public",
1606
+ offset: params.offset
1607
+ })), this.#http, (page) => page.bookmarkTags);
1608
+ }
1609
+ /**
1610
+ * Edits the authenticated user's AI-generated-work display setting.
1611
+ * POST /v1/user/ai-show-settings/edit
1612
+ *
1613
+ * @param params - Request parameters
1614
+ */
1615
+ editAiShowSettings(params) {
1616
+ const body = buildParams({ setting: params.setting });
1617
+ return this.#http.post("/v1/user/ai-show-settings/edit", body.toString());
1618
+ }
1530
1619
  };
1531
1620
  //#endregion
1532
1621
  //#region src/resources/manga.ts