(id: string)
| 11 | } |
| 12 | |
| 13 | export async function fetchProject(id: string): Promise<{ |
| 14 | forks_count: number |
| 15 | stargazers_count: number |
| 16 | watchers_count: number |
| 17 | }> { |
| 18 | console.info('Fetching project:', id) |
| 19 | |
| 20 | const response = await fetch(`https://api.github.com/repos/${id}`) |
| 21 | await new Promise((r) => setTimeout(r, 1000)) |
| 22 | return await response.json() |
| 23 | } |