An open API service indexing awesome lists of open source software.

https://github.com/hrbrmstr/forcequotes

⊩Retrieve and optionally display to the console random quotes from Star Wars films
https://github.com/hrbrmstr/forcequotes

r rest-api rstats star-wars

Last synced: about 1 year ago
JSON representation

⊩Retrieve and optionally display to the console random quotes from Star Wars films

Awesome Lists containing this project

README

          

---
output: rmarkdown::github_document
editor_options:
chunk_output_type: console
---
```{r pkg-knitr-opts, include=FALSE}
knitr::opts_chunk$set(collapse=TRUE, fig.retina=2, message=FALSE, warning=FALSE)
options(width=120)
```

[![Travis-CI Build Status](https://travis-ci.org/hrbrmstr/forcequotes.svg?branch=master)](https://travis-ci.org/hrbrmstr/forcequotes)
[![Coverage Status](https://codecov.io/gh/hrbrmstr/forcequotes/branch/master/graph/badge.svg)](https://codecov.io/gh/hrbrmstr/forcequotes)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/forcequotes)](https://cran.r-project.org/package=forcequotes)

![](man/figures/force-quotes.png)

# forcequotes

Return Random Star Wars Quotes

## Description

Now you can use the R 'Force' to get random quotes from your favorite
space opera. This is a thin wrapper to the 'Star Wars Quote API'
().

## What's Inside The Tin

The following functions are implemented:

- `quote_console`: Get a random Star Wars quote and display it stylishly to the console
- `random_quote: Return a Random Star Wars Quote

## Installation

```{r install-ex, eval=FALSE}
devtools::install_git("https://gitlab.com/hrbrmstr/forcequotes.git")
# or
devtools::install_github("hrbrmstr/forcequotes")
```

## Usage

```{r lib-ex}
library(forcequotes)

# current version
packageVersion("forcequotes")

```

### Basic use

```{r basics}
random_quote()

random_quote(faction=0)

random_quote(faction=1)

random_quote(faction=2)

random_quote(faction=3)

random_quote(faction=4)

```

### Console shenanigans

```{r console}
quote_console()
```

## forcequotes Metrics

```{r cloc, echo=FALSE}
cloc::cloc_pkg_md()
```

## Code of Conduct

Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md).
By participating in this project you agree to abide by its terms.