Utilize the simple endpoints /info
and /table_rate_limit
. Those provide
information about available locales and the amount of requests available
for calls against the /table
endpoint.
Arguments
- language
The language to be used for labeling.
"en"
or"de"
- key
(
string
) An API key. To display your key, callsc_browse_preferences()
.- server
A STATcube API server. Defaults to the external Server via
"ext"
. Other options are"red"
for the editing server and"prod"
for the production server. External users should always use the default option"ext"
.- x
either a response-object (package
httr
), an object of classsc_table
or an object of classsc_schema
Value
sc_info()
: adata.frame
with two columns identifying possible languagessc_rate_limit_table()
,sc_rate_limit_schema()
,sc_rate_limits()
: alist
with elementsremaining
: how much requests can be sent until the rate limit is reachedlimit
: the number of requests allowed per hourreset
: a timestamp when the rate limit will be reset
sc_rate_limits()
:
Functions
sc_info()
: returns information about all available database languagessc_rate_limit_table()
: returns alist
with information about current requests-limits with respect to the/table
endpoint. It also shows when the limits reset which should be less than one hour after the current time.sc_rate_limit_schema()
: returns alist
with information about current requests-limits with respect to the/schema
endpoint. It also shows when the limits reset which should be less than one hour after the current time.sc_rate_limits()
: gets rate limits from response headers
Examples
sc_info()
#> # A data frame: 2 × 2
#> locale displayName
#> <chr> <chr>
#> 1 de Deutsch
#> 2 en English
sc_rate_limit_table()
#> 100 / 100 (Resets at [10:52:14])
#>
sc_rate_limit_schema()
#> 9998 / 10000 (Resets at [10:52:14])
#>
sc_rate_limits(sc_schema("str:group:deake005:X_B1"))
#> $schema
#> 9998 / 10000 (Resets at [10:52:14])
#>
#>
#> $table
#> 100 / 100 (Resets at [10:52:14])
#>
#>