Skip to content

Instantly share code, notes, and snippets.

@webislife
Created April 19, 2019 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webislife/061a22ffd92cf34cf7fe41af0c732cfa to your computer and use it in GitHub Desktop.
Save webislife/061a22ffd92cf34cf7fe41af0c732cfa to your computer and use it in GitHub Desktop.
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