2017-09-17 23:16:19 +02:00
|
|
|
/* global fetch */
|
2017-11-04 15:05:16 +01:00
|
|
|
import 'isomorphic-unfetch'
|
2017-09-17 23:16:19 +02:00
|
|
|
|
|
|
|
const API_BASE_URL = 'https://api.github.com'
|
|
|
|
|
|
|
|
export const fetchUserRepos = (username, page = 1) =>
|
|
|
|
fetch(`${API_BASE_URL}/users/${username}/repos?page=${page}`)
|
|
|
|
.then(response => response.json())
|