api_template: API path template

Description Usage Arguments See Also Examples

View source: R/api_template.R

Description

API path template

Usage

1
api_template(.data, template, data)

Arguments

.data

Result of a call to api

template

Template to contstruct API route

data

Data to pass to the template parameter

See Also

Other dsl: api_body, api_config, api_error_handler, api_path, api_query, api, auth

Examples

1
2
3
4
5
6
## Not run: 
repo_info <- list(username = 'craigcitro', repo = 'r-travis')
api('https://api.github.com/') %>%
  api_template(template = 'repos/{{username}}/{{repo}}/issues', data = repo_info)

## End(Not run)

sckott/request documentation built on Sept. 5, 2017, 7:22 p.m.