Created
April 19, 2019 08:45
-
-
Save webislife/9892183e7bf9a5d518ec53e8e28cede3 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 {instance} from './instance.js'; | |
import {SwaggerApi} from './swagger.js'; | |
export class MainApi extends SwaggerApi { | |
constructor() { | |
super(); | |
this.Request = instance; | |
} | |
/** | |
* Fetch city list | |
* @param {Object} query request data | |
* @returns {Object} {data:[], pagination:{}} | |
*/ | |
async fetchCityList(query = {params: {}}) { | |
let {data} = await this.Request.get('/api/v4/location/city/', { | |
params: query.params, | |
}); | |
return data; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment