blob: ff41b6b376ba4c3e8b8b80df17ee9634200ca66d [file] [log] [blame]
Marc Kupietza4f51d72025-01-25 16:23:18 +01001% 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{
8\S4method{auth}{KorAPConnection}(kco, app_id = generic_kor_app_id, scope = "search match_info")
9}
10\arguments{
11\item{kco}{KorAPConnection object}
12
13\item{app_id}{OAuth2 application id. Defaults to the generic KorAP client application id.}
14
15\item{scope}{OAuth2 scope. Defaults to "search match_info".}
16}
17\value{
18KorAPConnection object with access token set in \verb{@accessToken}.
19}
20\description{
21\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}}
22
23Authorize RKorAPClient to make KorAP queries and download results on behalf of the user.
24}
25\examples{
26\dontrun{
27kco <- new("KorAPConnection", verbose = TRUE) \%>\% auth()
Marc Kupietza5501652025-01-28 20:25:42 +010028df <- collocationAnalysis(kco, "focus([marmot/p=ADJA] {Ameisenplage})",
29 leftContextSize=1, rightContextSize=0)
Marc Kupietza4f51d72025-01-25 16:23:18 +010030}
31
32}
33\seealso{
34\code{\link[=persistAccessToken]{persistAccessToken()}}, \code{\link[=clearAccessToken]{clearAccessToken()}}
35}