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
Functions
sc_info()
: returns information about all available database languagessc_rate_limit_table()
: returns a3x1
dataframe with the following columnsremaining
how much requests can be sent to the/table
endpoint until the rate limit is reached.limit
the number of requests allowed per hour.reset
a tiestamp when the rate limit will be reset. Ususally, this should be less than one hour `after the current time.
sc_rate_limits()
: gets rate limits from response headers
Examples
sc_info()
#> locale displayName
#> 1 de Deutsch
#> 2 en English
sc_rate_limit_table()
#> 100 / 100 (Resets at [12:27:17])
sc_rate_limit_schema()
#> 10000 / 10000 (Resets at [12:27:17])
sc_schema("str:group:deake005:X_B1") %>%
sc_rate_limits()
#> $schema
#> 9999 / 10000 (Resets at [20:18:42])
#>
#> $table
#> 97 / 100 (Resets at [20:18:42])
#>