{"size": 626, "ext": "js", "max_stars_repo_path": "citybike/src/utils/getAvailableCountryandCityFromCityBike.js", "max_stars_repo_name": "JustCodeandChill/cityBike", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "citybike/src/utils/getAvailableCountryandCityFromCityBike.js", "max_issues_repo_name": "JustCodeandChill/cityBike", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "citybike/src/utils/getAvailableCountryandCityFromCityBike.js", "max_forks_repo_name": "JustCodeandChill/cityBike", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.04, "max_line_length": 50, "alphanum_fraction": 0.6469648562}
import axios from 'axios'; 
import _ from 'lodash';
import {getNetworkData} from './common';


export const getAvailableCities = async () => {
    const network = await getNetworkData();

    const cities = _.map(network, (data) => {
        return data.location.city;
    })
    const ucities = _.uniq(cities)
    // console.log('ucities', ucities)
    return ucities;
}

export const getAvailableCountries = async () => {
    const network = await getNetworkData();

    const coutries = _.map(network, (data) => {
        return data.location.country;
    })
    const ucountries = _.uniq(coutries)
    return ucountries;
}