auth,KorAPConnection-method {RKorAPClient}R Documentation

Authorize RKorAPClient

Description

Authorize RKorAPClient to make KorAP queries and download results on behalf of the user.

Usage

## S4 method for signature 'KorAPConnection'
auth(
  kco,
  app_id = generic_kor_app_id,
  app_secret = NULL,
  scope = kco@oauthScope
)

Arguments

kco

KorAPConnection object

app_id

OAuth2 application id. Defaults to the generic KorAP client application id.

app_secret

OAuth2 application secret. Used with confidential client applications. Defaults to NULL.

scope

OAuth2 scope. Defaults to "search match_info".

Value

KorAPConnection object with access token set in ⁠@accessToken⁠.

See Also

persistAccessToken(), clearAccessToken()

Other initialization functions: KorAPConnection-class, clearAccessToken,KorAPConnection-method, persistAccessToken,KorAPConnection-method

Examples

## Not run: 
kco <- KorAPConnection(verbose = TRUE) %>% auth()
df <- collocationAnalysis(kco, "focus([marmot/p=ADJA] {Ameisenplage})",
  leftContextSize = 1, rightContextSize = 0
)

## End(Not run)


[Package RKorAPClient version 1.1.0 Index]