You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// JS doesn't allow inheriting private (_<property/function>) properties and functions and protected ones (_<property/function>) have getters and setters per default, because they are just a convention and have to be implemented by the programmer :).
12
12
// It is not possible to make private properties inheritable in JavaScript, as the private properties of a class are not inherited by its subclasses. This is because private properties are not part of the class's public interface, and they are not accessible from outside the class.
13
13
// They are private, because only the fetching functions should be visible for code completion and because ít feels illegal to expose them, because they should only be set and used within the class.
14
-
// biome-ignore lint/complexity/noStaticOnlyClass: Prettier like that, who needs speed, am I right?
15
14
abstractclassAccountFetcherextendsFetcher{
16
15
staticpackages(
17
16
packagePageSize: number,
@@ -371,31 +370,7 @@ export class UserFetcher extends FetcherExtended {
371
370
if(this.#doFetchInfo){
372
371
if(this.#log)console.info("fetching info");
373
372
374
-
return`
375
-
bio
376
-
websiteUrl
377
-
createdAt
378
-
379
-
status {
380
-
message
381
-
emoji
382
-
indicatesLimitedAvailability
383
-
}
384
-
socialAccounts(first: 10) {
385
-
${this.#count_nodes ? "totalCount" : ""}
386
-
387
-
pageInfo {
388
-
endCursor
389
-
hasNextPage
390
-
}
391
-
392
-
nodes {
393
-
provider
394
-
displayName
395
-
url
396
-
}
397
-
}
398
-
`;
373
+
returnUserBodyInfo(this.#count_nodes);
399
374
}
400
375
401
376
return"";
@@ -405,21 +380,53 @@ export class UserFetcher extends FetcherExtended {
405
380
if(this.#doFetchEssential){
406
381
if(this.#log)console.info("fetching essential");
407
382
408
-
return`
409
-
name
410
-
pronouns
411
-
location
412
-
avatarUrl
413
-
url
414
-
company
415
-
email
416
-
`;
383
+
returnUserBodyEssential();
417
384
}
418
385
419
386
return"";
420
387
}
421
388
}
422
389
390
+
functionUserBodyEssential(){
391
+
return`
392
+
name
393
+
pronouns
394
+
location
395
+
avatarUrl
396
+
url
397
+
company
398
+
email
399
+
`;
400
+
}
401
+
402
+
functionUserBodyInfo(count_nodes=false){
403
+
return`
404
+
bio
405
+
websiteUrl
406
+
createdAt
407
+
408
+
status {
409
+
message
410
+
emoji
411
+
indicatesLimitedAvailability
412
+
}
413
+
socialAccounts(first: 10) {
414
+
${count_nodes ? "totalCount" : ""}
415
+
416
+
pageInfo {
417
+
endCursor
418
+
hasNextPage
419
+
}
420
+
421
+
nodes {
422
+
provider
423
+
displayName
424
+
url
425
+
}
426
+
}
427
+
`;
428
+
}
429
+
423
430
exportclassRepositoryextendsFetcherExtended{
424
431
#doFetchEssential =true;
425
432
#doFetchInfo =false;
@@ -432,6 +439,7 @@ export class Repository extends FetcherExtended {
432
439
#doFetchLanguages =false;
433
440
#doFetchMilestones =false;
434
441
#doFetchIssues =false;
442
+
#doFetchCollaborators =false;
435
443
436
444
staticdefaultPageSize=10;
437
445
#rootPageSize: number;
@@ -443,6 +451,7 @@ export class Repository extends FetcherExtended {
0 commit comments