import Maproutes from './maproutes'; import Segments from './segments'; import Segmentratings from './segmentratings'; import Users from './users'; import Info from './info'; const enums = { pathType: ['shared', 'dedicatedLane', 'bikePath'], surfaceType: ['gravel', 'asphalt', 'dirt'], userRole: ['user', 'admin'], }; export default class RoadqualityClient { constructor(opts) { let options = opts; if (typeof opts === 'string') { options = { host: opts }; // convert host string to options object } this.enums = enums; this.mapRoutes = new Maproutes(options); this.segments = new Segments(options); this.segmentRatings = new Segmentratings(options); this.users = new Users(options); this.info = new Info(options); } }