api_delay: API Delay Function

View source: R/api_delay.R

api_delayR Documentation

API Delay Function

Description

A function to control the wait time between API calls to OpenDota, user needs to specify the start time of a call to the API. The wait time is 1s by default since OpenDota ask you to restrict your call to 1 call per second with a free API.

Usage

api_delay(start_time, wait_time = 1)

Arguments

start_time

Time of last API call

wait_time

Wait time between API calls

Value

No return. The function put the system to sleep if the time between your last API call to the current one is less than 1s.

Examples

## Not run: 
api_key(start_time, wait_time)

## End(Not run)

huayingq1996/DotaR documentation built on March 31, 2022, 2:03 a.m.