URL templating following RFC6570 (https://tools.ietf.org/html/rfc6570#page-14).

install

devtools::install_github("ropenscilabs/urltemplate")
library(urltemplate)

variables

Get the set of keywords in a uri template

variables("http:www{.domain*}{/top,next}{?q:20}")
#> [1] "domain" "top"    "next"   "q"
variables("http://www.{domain}/")
#> [1] "domain"
variables("find{?year*}")
#> [1] "year"

TODO

  • Implement expand() method
  • test suite
  • vignette

Similar art

Meta

ropensci_footer