vkGetDbCities: City Dictionary.

Description Usage Arguments Details Value Author(s) Examples

View source: R/vkGetDbCities.R

Description

Returns a list of cities and countries.

Usage

1
2
3
vkGetDbCities(country_id = TRUE, region_id = NULL, q = NULL,
                 need_all = TRUE, api_version = NULL, access_token =
                 NULL)

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.

access_token

API access token, obtained using the functions vkAuth or vkGetToken

api_version

Vkontakte API version.

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
## auth
my_tok <- vkAuth(app_id = 1, app_secret = "H2Pk8htyFD8024mZaPHm")

## Get a list of cities for Ukraine, because Ukraine id = 2
vk_cities <- vkGetDbCities(country_id = 2,
                           access_token = my_tok$access_token)

## Get the list of cities for the search query "St."
vk_cities_search <- vkGetDbCities(country_id = 1,
                                  q = "St.",
                                  access_token = my_tok$access_token)


## End(Not run)

grkhr/rvkstat documentation built on Dec. 10, 2019, 2:27 p.m.