Skip to content

Instantly share code, notes, and snippets.

View ejiro-precious's full-sized avatar
:octocat:

Ejiroghene Precious ejiro-precious

:octocat:
View GitHub Profile
import monix.eval.Task
import java.util.concurrent.TimeUnit
import scala.concurrent.duration._
/** Request limiter for APIs that have quotas per second, minute, hour, etc.
*
* {{{
* // Rate-limits to 100 requests per second
* val limiter = TaskLimiter(TimeUnit.SECONDS, limit = 100)
*