Learn R Programming

RKorAPClient (version 1.0.0)

auth,KorAPConnection-method: Authorize RKorAPClient

Description

[Experimental]

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

Usage

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

Value

KorAPConnection object with access token set in @accessToken.

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".

See Also

persistAccessToken(), clearAccessToken()

Examples

Run this code
if (FALSE) {
kco <- new("KorAPConnection", verbose = TRUE) %>% auth()
df <- collocationAnalysis(kco, "focus([marmot/p=ADJA] {Ameisenplage})",
  leftContextSize=1, rightContextSize=0)
}

Run the code above in your browser using DataLab