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{ |
| 28 | \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} |
| 29 | |
| 30 | Authorize RKorAPClient to make KorAP queries and download results on behalf of the user. |
| 31 | } |
| 32 | \examples{ |
| 33 | \dontrun{ |
| 34 | kco <- new("KorAPConnection", verbose = TRUE) \%>\% auth() |
Marc Kupietz | a550165 | 2025-01-28 20:25:42 +0100 | [diff] [blame] | 35 | df <- collocationAnalysis(kco, "focus([marmot/p=ADJA] {Ameisenplage})", |
| 36 | leftContextSize=1, rightContextSize=0) |
Marc Kupietz | a4f51d7 | 2025-01-25 16:23:18 +0100 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | } |
| 40 | \seealso{ |
| 41 | \code{\link[=persistAccessToken]{persistAccessToken()}}, \code{\link[=clearAccessToken]{clearAccessToken()}} |
| 42 | } |