get_api: Get API

View source: R/operations.R

get_apiR Documentation

Get API

Description

Create API object from Swagger specification

Usage

get_api(url, config = NULL, ext)

Arguments

url

API URL or file (can be json or yaml format)

config

httr::config() curl options.

ext

the file extension of the API file (either 'yaml' or 'json'). By default, it is obtained from the URL with 'tools::file_ext' and should be provided when the file URL is missing an extension.

Value

API object

See Also

See also get_operations and get_schemas

Examples

## Not run: 
# create operation and schema functions
api_url <- "http://petstore.swagger.io/v2/swagger.json"
api <- get_api(api_url)
operations <- get_operations(api)
schemas <- get_schemas(api)

## End(Not run)

rapiclient documentation built on Oct. 1, 2024, 1:06 a.m.