Skip to content

Commit c0906ce

Browse files
author
Miqueas Martinez
committed
Finished TypeScript example
1 parent df6615f commit c0906ce

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

Github.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,37 @@ for (const val of opts._) {
118118
print(`Bio: ${user.bio}`);
119119
print(`Link: ${user.link}`);
120120

121+
print(`Public repos: ${user.repos.count}`);
122+
if (opts.r) {
123+
await user.fetch("repos");
124+
125+
for (const idx in user.repos.arr)
126+
print(` | ${parseInt(idx) + 1} ${user.repos.arr[idx]}`);
127+
}
128+
129+
print(`Public gists: ${user.gists.count}`);
130+
if (opts.g) {
131+
await user.fetch("gists");
132+
133+
for (const idx in user.gists.arr)
134+
print(` | ${parseInt(idx) + 1} ${user.gists.arr[idx]}`);
135+
}
136+
137+
print(`Public followers: ${user.followers.count}`);
138+
if (opts.followers) {
139+
await user.fetch("followers");
140+
141+
for (const val of user.followers.arr)
142+
print(` | @${val}`);
143+
}
144+
145+
print(`Public following: ${user.following.count}`);
146+
if (opts.following) {
147+
await user.fetch("following");
148+
149+
for (const val of user.following.arr)
150+
print(` | @${val}`);
151+
}
152+
121153
print();
122154
}

0 commit comments

Comments
 (0)