Created
April 19, 2019 08:44
-
-
Save webislife/061a22ffd92cf34cf7fe41af0c732cfa 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 BiglionApi 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