---
title: "Introduction to vcr"
author: "Scott Chamberlain"
date: "`r Sys.Date()`"
output:
  html_document:
    toc: true
    toc_float: true
    theme: readable
vignette: >
  %\VignetteIndexEntry{1. vcr introduction}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r echo=FALSE}
knitr::opts_chunk$set(
	comment = "#>",
	collapse = TRUE,
	warning = FALSE,
	message = FALSE,
  eval = FALSE
)
```

vcr introduction
================

`vcr` is an R port of the Ruby gem [VCR](https://github.com/vcr/vcr) (i.e., a translation, there's no Ruby here :))

`vcr` helps you stub and record HTTP requests so you don't have to repeat HTTP requests.

The main use case is for unit tests, but you can use it outside of the unit test use case.

`vcr` works with the `crul` and `httr` HTTP request packages.

Check out the [HTTP testing book](https://books.ropensci.org/http-testing/) for a lot more documentation on `vcr`, `webmockr`, and `crul`, and other packages.

## Elevator pitch

```{r child='../man/rmdhunks/elevator-pitch.Rmd', eval=TRUE} 
```

## Installation

CRAN

```{r eval=FALSE}
install.packages("vcr")
```

Development version

```{r eval=FALSE}
remotes::install_github("ropensci/vcr")
```

```{r}
library("vcr")
```

## Getting Started

```{r child='../man/rmdhunks/setup.Rmd', eval=TRUE} 
```

## Basic usage

```{r child='../man/rmdhunks/basic-usage.Rmd', eval=TRUE} 
```


## Terminology

```{r child='../man/rmdhunks/glossary.Rmd', eval=TRUE} 
```

## Workflows

```{r child='../man/rmdhunks/workflows.Rmd', eval=TRUE} 
```

## Configuration

```{r child='../man/rmdhunks/configuration.Rmd', eval=TRUE} 
```

## Matching/Matchers

```{r child='../man/rmdhunks/matching.Rmd', eval=TRUE} 
```

## Note about missing features

```{r child='../man/rmdhunks/missing-features.Rmd', eval=TRUE} 
```


