osm_permissions {osmapiR}R Documentation

Retrieving permissions

Description

Returns the permissions granted to the current API connection.

Usage

osm_permissions(format = c("R", "xml", "json"))

Arguments

format

Format of the output. Can be "R" (default), "xml", or "json".

Details

Currently the following permissions can appear in the result, corresponding directly to the ones used in the OAuth 1.0a application definition:

Value

If the API client is not authorized, an empty list of permissions will be returned. Otherwise, the list will be based on the granted scopes of the logged user.

Note

For compatibility reasons, all OAuth 2.0 scopes will be prefixed by "allow_", e.g. scope "read_prefs" will be shown as permission "allow_read_prefs".

See Also

Other API functions: authenticate_osmapi(), osm_api_versions(), osm_capabilities(), set_osmapi_connection()

Examples

## Not run: 
perms <- osm_permissions()
perms

## End(Not run)

[Package osmapiR version 0.1.0 Index]