Marc Kupietz | a4f51d7 | 2025-01-25 16:23:18 +0100 | [diff] [blame] | 1 | % Generated by roxygen2: do not edit by hand |
| 2 | % Please edit documentation in R/KorAPConnection.R |
| 3 | \name{auth,KorAPConnection-method} |
| 4 | \alias{auth,KorAPConnection-method} |
| 5 | \alias{auth} |
| 6 | \title{Authorize RKorAPClient} |
| 7 | \usage{ |
Marc Kupietz | f83d59a | 2025-02-01 14:48:30 +0100 | [diff] [blame] | 8 | \S4method{auth}{KorAPConnection}( |
| 9 | kco, |
| 10 | app_id = generic_kor_app_id, |
| 11 | app_secret = NULL, |
| 12 | scope = kco@oauthScope |
| 13 | ) |
Marc Kupietz | a4f51d7 | 2025-01-25 16:23:18 +0100 | [diff] [blame] | 14 | } |
| 15 | \arguments{ |
| 16 | \item{kco}{KorAPConnection object} |
| 17 | |
| 18 | \item{app_id}{OAuth2 application id. Defaults to the generic KorAP client application id.} |
| 19 | |
Marc Kupietz | f83d59a | 2025-02-01 14:48:30 +0100 | [diff] [blame] | 20 | \item{app_secret}{OAuth2 application secret. Used with confidential client applications. Defaults to \code{NULL}.} |
| 21 | |
Marc Kupietz | a4f51d7 | 2025-01-25 16:23:18 +0100 | [diff] [blame] | 22 | \item{scope}{OAuth2 scope. Defaults to "search match_info".} |
| 23 | } |
| 24 | \value{ |
| 25 | KorAPConnection object with access token set in \verb{@accessToken}. |
| 26 | } |
| 27 | \description{ |
Marc Kupietz | a4f51d7 | 2025-01-25 16:23:18 +0100 | [diff] [blame] | 28 | Authorize RKorAPClient to make KorAP queries and download results on behalf of the user. |
| 29 | } |
| 30 | \examples{ |
| 31 | \dontrun{ |
Marc Kupietz | 617266d | 2025-02-27 10:43:07 +0100 | [diff] [blame] | 32 | kco <- KorAPConnection(verbose = TRUE) \%>\% auth() |
Marc Kupietz | a550165 | 2025-01-28 20:25:42 +0100 | [diff] [blame] | 33 | df <- collocationAnalysis(kco, "focus([marmot/p=ADJA] {Ameisenplage})", |
Marc Kupietz | a824d50 | 2025-05-02 15:40:23 +0200 | [diff] [blame] | 34 | leftContextSize = 1, rightContextSize = 0 |
| 35 | ) |
Marc Kupietz | a4f51d7 | 2025-01-25 16:23:18 +0100 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | } |
| 39 | \seealso{ |
| 40 | \code{\link[=persistAccessToken]{persistAccessToken()}}, \code{\link[=clearAccessToken]{clearAccessToken()}} |
Marc Kupietz | a8c40f4 | 2025-06-24 15:49:52 +0200 | [diff] [blame] | 41 | |
| 42 | Other initialization functions: |
| 43 | \code{\link{KorAPConnection-class}}, |
| 44 | \code{\link{clearAccessToken,KorAPConnection-method}}, |
| 45 | \code{\link{persistAccessToken,KorAPConnection-method}} |
Marc Kupietz | a4f51d7 | 2025-01-25 16:23:18 +0100 | [diff] [blame] | 46 | } |
Marc Kupietz | a8c40f4 | 2025-06-24 15:49:52 +0200 | [diff] [blame] | 47 | \concept{initialization functions} |