(user)
| 7 | } |
| 8 | |
| 9 | async getUser(user) { |
| 10 | const profileResponse = await fetch(`https://api.github.com/users/${user}?client_id=${this.client_id}&client_secret=${this.client_secret}`); |
| 11 | |
| 12 | const repoResponse = await fetch(`https://api.github.com/users/${user}/repos?per_page=${this.repos_count}&sort=${this.repos_sort}&client_id=${this.client_id}&client_secret=${this.client_secret}`); |
| 13 | |
| 14 | const profile = await profileResponse.json(); |
| 15 | const repos = await repoResponse.json(); |
| 16 | return { |
| 17 | profile, |
| 18 | repos |
| 19 | } |
| 20 | |
| 21 | } |
| 22 | |
| 23 | } |