clean: Methods, grouped by type of request calling «clean».

Description Usage Arguments Warning See Also Examples

View source: R/getting_functions.R

Description

Calls DADATA's REST API, with one of the available methods. All supported methods related with «suggestion» you can see in supported_cleans()

Usage

1
clean(method, query, tidy = TRUE, ...)

Arguments

method

Name of supported method. Use supported_cleans() to see all supported methods.

query

Main request. See examples or https://dadata.ru/api/ for more.

tidy

If TRUE returns response from the server as tidy tibble. Else, returns JSON as nested list.

...

Specify additional calling parameters, if necessary. For more information on available parameters of corresponding method, see the description page on https://dadata.ru/api/

Warning

All methods presented in this section are for a fee. Learn more about costs on DADATA API Documentation

See Also

For more information about DADATA API visit the following link: DADATA API Documentation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#save your tokens first
## Not run: 
save_dadata_tokens(api_token = '__INSERT_YOUR_API_TOKEN_HERE__',
                   secret_token = '__INSERT_YOUR_SECRET_TOKEN_HERE__')
# Validate and cleanse address
clean(method = "address", "msk suhonska 11/-89")
# Validate and cleanse name
clean(method = "name", query = "sergei vladimirovich ivan")
# Validate and cleanse phone
clean(method = "phone", "rab 846)231.60.14 *139")

## End(Not run)

3DaVinci/rdadata documentation built on Dec. 17, 2021, 6:38 a.m.