Last active
October 30, 2017 17:34
-
-
Save brybrophy/95eb26cc64fa78f9eaff27a29f39c140 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ApiCore from 'axios-core-api'; | |
import axiosConfig from './axiosConfig.js'; | |
import UsersApi from './UsersApi'; | |
class BaseApi { | |
constructor(apiCore, basePath) { | |
this._apiCore = apiCore; | |
this._basePath = basePath; | |
this.users = new UsersApi(this._apiCore, this._basePath); | |
} | |
} | |
const apiCore = new ApiCore(axiosConfig); | |
const basePath = 'https://www.example.org/api'; | |
const baseApi = new BaseApi(apiCore, basePath); | |
export default baseApi; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment