export class ListRep {
async getFetch() {
const response = await fetch(`https://api.github.com/search/repositories?q=stars%3A%3E0&sort=stars&per_page=${10}&page=${1}`)
const data = await response.json()
console.log(data.items)
}
render(data) {
const res = data.map(el => {
return `
<ul class="listRep">
<li>
<span>${el.name}</span>
<span>${el.stargazers_count}</span>
<span>${el.updated_at}</span>
<a href="${el.html_url}">${el.html_url}</a>
</li>
</ul>
`
})
res.join('')
return res
}
}