We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8519cbb commit 12f2416Copy full SHA for 12f2416
src/services/api.js
@@ -0,0 +1,11 @@
1
+import axios from 'axios'
2
+const API_URL = `https://reqres.in/api`
3
+
4
+/**
5
+ * Function to get a users from API
6
+ * @param {Number} page
7
+ * @return AxiosPromise
8
+ */
9
+export const getUsers = (page = 1) => {
10
+ return axios.get(`${API_URL}/users?per_page=10&page=${page}`)
11
+}
0 commit comments