Marc Kupietz | e95108e | 2019-09-18 13:23:58 +0200 | [diff] [blame] | 1 | % Generated by roxygen2: do not edit by hand |
| 2 | % Please edit documentation in R/KorAPConnection.R |
| 3 | \docType{class} |
| 4 | \name{KorAPConnection-class} |
| 5 | \alias{KorAPConnection-class} |
| 6 | \alias{KorAPConnection} |
| 7 | \alias{initialize,KorAPConnection-method} |
Marc Kupietz | d0d3e9b | 2019-09-24 17:36:03 +0200 | [diff] [blame] | 8 | \alias{apiCall,KorAPConnection-method} |
| 9 | \alias{apiCall} |
Marc Kupietz | 0a96b28 | 2019-10-01 11:05:31 +0200 | [diff] [blame] | 10 | \alias{clearCache,KorAPConnection-method} |
| 11 | \alias{clearCache} |
Marc Kupietz | e95108e | 2019-09-18 13:23:58 +0200 | [diff] [blame] | 12 | \alias{show,KorAPConnection-method} |
| 13 | \title{Class KorAPConnection} |
| 14 | \usage{ |
| 15 | \S4method{initialize}{KorAPConnection}(.Object, |
Marc Kupietz | f94a6c8 | 2019-09-19 11:32:07 +0200 | [diff] [blame] | 16 | KorAPUrl = "https://korap.ids-mannheim.de/", apiVersion = "v1.0", |
Marc Kupietz | d0d3e9b | 2019-09-24 17:36:03 +0200 | [diff] [blame] | 17 | apiUrl, userAgent = "R-KorAP-Client", timeout = 10, |
Marc Kupietz | 0a96b28 | 2019-10-01 11:05:31 +0200 | [diff] [blame] | 18 | verbose = FALSE, cache = TRUE) |
Marc Kupietz | d0d3e9b | 2019-09-24 17:36:03 +0200 | [diff] [blame] | 19 | |
| 20 | \S4method{apiCall}{KorAPConnection}(kco, url) |
Marc Kupietz | e95108e | 2019-09-18 13:23:58 +0200 | [diff] [blame] | 21 | |
Marc Kupietz | 0a96b28 | 2019-10-01 11:05:31 +0200 | [diff] [blame] | 22 | \S4method{clearCache}{KorAPConnection}(kco) |
| 23 | |
Marc Kupietz | e95108e | 2019-09-18 13:23:58 +0200 | [diff] [blame] | 24 | \S4method{show}{KorAPConnection}(object) |
| 25 | } |
| 26 | \arguments{ |
| 27 | \item{.Object}{KorAPConnection object} |
| 28 | |
| 29 | \item{KorAPUrl}{the URL of the KorAP server instance you want to access.} |
| 30 | |
| 31 | \item{apiVersion}{which version of KorAP's API you want to connect to.} |
| 32 | |
| 33 | \item{apiUrl}{URL of the KorAP web service.} |
| 34 | |
Marc Kupietz | d0d3e9b | 2019-09-24 17:36:03 +0200 | [diff] [blame] | 35 | \item{userAgent}{user agent string.} |
| 36 | |
| 37 | \item{timeout}{time out in seconds.} |
| 38 | |
Marc Kupietz | 7776dec | 2019-09-27 16:59:02 +0200 | [diff] [blame] | 39 | \item{verbose}{logical. Decides whether following operations will default to be verbose.} |
Marc Kupietz | 5a51982 | 2019-09-20 21:43:52 +0200 | [diff] [blame] | 40 | |
Marc Kupietz | 0a96b28 | 2019-10-01 11:05:31 +0200 | [diff] [blame] | 41 | \item{cache}{logical. Decides if API calls are cached locally. You can clear the cache with \code{\link{clearCache}()}.} |
| 42 | |
Marc Kupietz | d0d3e9b | 2019-09-24 17:36:03 +0200 | [diff] [blame] | 43 | \item{kco}{KorAPConnection object} |
| 44 | |
| 45 | \item{url}{request url} |
| 46 | |
Marc Kupietz | e95108e | 2019-09-18 13:23:58 +0200 | [diff] [blame] | 47 | \item{object}{KorAPConnection object} |
| 48 | } |
| 49 | \value{ |
| 50 | \code{\link{KorAPConnection}} object that can be used e.g. with \code{\link{corpusQuery}} |
| 51 | } |
| 52 | \description{ |
Marc Kupietz | 7776dec | 2019-09-27 16:59:02 +0200 | [diff] [blame] | 53 | \code{KorAPConnection} objects represent the connection to a KorAP server. |
| 54 | New \code{KorAPConnection} objects can be created by \code{KorAPConnection()}. |
Marc Kupietz | e95108e | 2019-09-18 13:23:58 +0200 | [diff] [blame] | 55 | } |
| 56 | \note{ |
| 57 | Currently it is not possible to authenticate the client |
| 58 | } |
| 59 | \examples{ |
Marc Kupietz | 5a51982 | 2019-09-20 21:43:52 +0200 | [diff] [blame] | 60 | kcon <- new("KorAPConnection", verbose = TRUE) |
Marc Kupietz | e95108e | 2019-09-18 13:23:58 +0200 | [diff] [blame] | 61 | kq <- corpusQuery(kcon, "Ameisenplage") |
Marc Kupietz | 5a51982 | 2019-09-20 21:43:52 +0200 | [diff] [blame] | 62 | kq <- fetchAll(kq) |
Marc Kupietz | e95108e | 2019-09-18 13:23:58 +0200 | [diff] [blame] | 63 | |
| 64 | } |