Returns a list of cities and countries.
vkGetDbCities(
country_id,
region_id = NULL,
q = NULL,
need_all = TRUE,
username = getOption("rvkstat.username"),
api_version = getOption("rvkstat.api_version"),
token_path = vkTokenPath(),
access_token = getOption("rvkstat.access_token")
)
country identifier obtained using the vkGetDbCountries function.
identifier of the region whose city you want to receive. (this parameter is optional.
search query string. For example, "Saint". The maximum string length is 15 characters.
Boolean TRUE or FALSE, flag <U+2014> return a list of all countries.
Your vkontakte login.
Vkontakte API version.
Path to dir with credentials
API access tokens obtained using vkAuth or vkGetToken functions
Date frame with community statistics with the following values:
country id.
country name.
mark key cities for the current user.
area.
region.
the q parameter is not specified, then a list of the largest cities in the given country will be returned. If the q parameter is specified, a list of cities that are relevant to the search query will be returned.
Documentation for API method database.getCities: https://vk.com/dev/database.getCities
# NOT RUN {
## Get a list of cities for Ukraine, because Ukraine id = 2
vk_cities <- vkGetDbCities(country_id = 2)
## Get the list of cities for the search query "St."
vk_cities_search <- vkGetDbCities(country_id = 1,
q = "St.")
# }
Run the code above in your browser using DataLab