blob: cf06c01934fad27dd6ccc9e64f30414f83bbd3ae [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{
Marc Kupietzf83d59a2025-02-01 14:48:30 +01008\S4method{auth}{KorAPConnection}(
9 kco,
10 app_id = generic_kor_app_id,
11 app_secret = NULL,
12 scope = kco@oauthScope
13)
Marc Kupietza4f51d72025-01-25 16:23:18 +010014}
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 Kupietzf83d59a2025-02-01 14:48:30 +010020\item{app_secret}{OAuth2 application secret. Used with confidential client applications. Defaults to \code{NULL}.}
21
Marc Kupietza4f51d72025-01-25 16:23:18 +010022\item{scope}{OAuth2 scope. Defaults to "search match_info".}
23}
24\value{
25KorAPConnection 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
30Authorize RKorAPClient to make KorAP queries and download results on behalf of the user.
31}
32\examples{
33\dontrun{
34kco <- new("KorAPConnection", verbose = TRUE) \%>\% auth()
Marc Kupietza5501652025-01-28 20:25:42 +010035df <- collocationAnalysis(kco, "focus([marmot/p=ADJA] {Ameisenplage})",
36 leftContextSize=1, rightContextSize=0)
Marc Kupietza4f51d72025-01-25 16:23:18 +010037}
38
39}
40\seealso{
41\code{\link[=persistAccessToken]{persistAccessToken()}}, \code{\link[=clearAccessToken]{clearAccessToken()}}
42}