mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Reduced number of GitHub requests (#1298)
This commit is contained in:
parent
f138b9591d
commit
6ac6fa4a9e
@ -59,8 +59,8 @@ export default class GitHub extends Abstract {
|
|||||||
* @return {Promise<Array<string>>} Promise returning an array of facts
|
* @return {Promise<Array<string>>} Promise returning an array of facts
|
||||||
*/
|
*/
|
||||||
fetch_() {
|
fetch_() {
|
||||||
const paginate = (page = 0) => {
|
const paginate = (page = 0) => (
|
||||||
return fetch(`${this.base_}?per_page=30&page=${page}`)
|
fetch(`${this.base_}?per_page=100&sort=updated&page=${page}`)
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
if (!(data instanceof Array))
|
if (!(data instanceof Array))
|
||||||
@ -87,7 +87,7 @@ export default class GitHub extends Abstract {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
)
|
||||||
|
|
||||||
/* Paginate through repos */
|
/* Paginate through repos */
|
||||||
return paginate()
|
return paginate()
|
||||||
|
Loading…
Reference in New Issue
Block a user