blob: 8a1ab5defe30a8501984c4dab963b923b20298eb [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()
28df <- collocationAnalysis(kco, "focus([marmot/p=ADJA] {Ameisenplage})", leftContextSize=1, rightContextSize=0)
29}
30
31}
32\seealso{
33\code{\link[=persistAccessToken]{persistAccessToken()}}, \code{\link[=clearAccessToken]{clearAccessToken()}}
34}