vkGetDbCities: City Dictionary.

Description Usage Arguments Details Value Author(s) References Examples

View source: R/vkGetDbCities.R

Description

Returns a list of cities and countries.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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")
)

Arguments

country_id

country identifier obtained using the vkGetDbCountries function.

region_id

identifier of the region whose city you want to receive. (this parameter is optional.

q

search query string. For example, "Saint". The maximum string length is 15 characters.

need_all

Boolean TRUE or FALSE, flag — return a list of all countries.

username

Your vkontakte login.

api_version

Vkontakte API version.

token_path

Path to dir with credentials

access_token

API access tokens obtained using vkAuth or vkGetToken functions

Details

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.

Value

Date frame with community statistics with the following values:

cid

country id.

title

country name.

important

mark key cities for the current user.

area

area.

region

region.

Author(s)

Alexey Seleznev

References

Documentation for API method database.getCities: https://vk.com/dev/database.getCities

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## 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.")


## End(Not run)

rvkstat documentation built on Oct. 18, 2021, 5:07 p.m.