( other_uid, uid, fb_dtsg, pageFetchedCallback )
| 447 | } |
| 448 | } |
| 449 | export async function searchAllPageForOther( |
| 450 | other_uid, |
| 451 | uid, |
| 452 | fb_dtsg, |
| 453 | pageFetchedCallback |
| 454 | ) { |
| 455 | let cursor = ""; |
| 456 | let allPages = []; |
| 457 | try { |
| 458 | while (true) { |
| 459 | let { nextCursor, data, totalCount } = await searchPageForOther( |
| 460 | other_uid, |
| 461 | cursor, |
| 462 | uid, |
| 463 | fb_dtsg |
| 464 | ); |
| 465 | cursor = nextCursor; |
| 466 | allPages = allPages.concat(data); |
| 467 | await pageFetchedCallback?.(data, allPages, totalCount); |
| 468 | |
| 469 | if (!cursor) break; |
| 470 | } |
| 471 | } catch (e) { |
| 472 | console.log("ERROR search all page for other", e); |
| 473 | } |
| 474 | return allPages; |
| 475 | } |
| 476 | |
| 477 | // ============================================================================= |
| 478 | // =================================== Group =================================== |
no test coverage detected