vkGetDbRegions: Regions list.

Description Usage Arguments Details Value Author(s) Examples

View source: R/vkGetDbRegions.R

Description

Get regions dictionary.

Usage

1
2
vkGetDbRegions(country_id = NULL, q = NULL, api_version = NULL,
                 access_token = NULL)

Arguments

country_id

country identifier obtained using the vkGetDbCountries function.

q

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

access_token

API access token, obtained using the functions vkAuth or vkGetToken.

api_version

Vkontakte API version for send rquest.

Details

If the q parameter is not specified, then a list of all regions in the given country will be returned. If the q parameter is specified, a list of regions that are relevant to the search query will be returned.

Value

Data frame contains community statistics with the following values:

1. region_id

region identifier.

2. title

name of the region.

Author(s)

Alexey Seleznev

Examples

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

## Get a list of regions for Ukraine, because Ukraine id = 2
vk_regions  <- vkGetDbRegions(country_id = 2,
                              access_token = my_tok$access_token)

##get a list of cities of Ukraine on request "Ode"
vk_regions_search  <- vkGetDbRegions(country_id = 2,
                                     q = "Ode",
                                     access_token = my_tok$access_token)



## End(Not run)

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