Get Random Quotes from Quotes on Design API

Connects to the site < http://quotesondesign.com/> that uses the 'WordPress' JSON REST API to provide a way for you to grab quotes.


Build Status codecov

Description

This package connects to the site http://quotesondesign.com/ that uses the WordPress JSON REST API to provide a way for you to grab quotes.

Overview

This package contains the following function: randquote() that fetches a random quote and returns a dataframe along with the author name and link to the quote.

Installation

devtools::install_github("amrrs/randquotes")

This package fetches data from API hence an active internet connection is required for this package to function.

Current Version

library(randquotes)
 
# current verison
packageVersion("randquotes")
## [1] '0.1.0'

Usage

Get Random Quote

library(randquotes)
 
randquote()
##    ID          title                                                        content
## 1 835 Cool Hand Luke <p>What we got here is&hellip; failure to communicate.  </p>\n
##                                         link                                                           Source
## 1 https://quotesondesign.com/cool-hand-luke/ <a href="http://www.imdb.com/title/tt0061512/taglines">movie</a>

Get only the Quote

Sometimes you may not be interested in getting a dataframe that has ID and link, so this function randquote_simple() outputs only the quote with author name.

library(randquotes)
 
randquote_simple()
## [1] "To attempt mastery of everything inevitably makes us mediocre in many areas. \n-Simon Collison"

Courtesy

This R package is powered by Quotes on Design API

Code of Conduct

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

News

0.1.0

  • Initial release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("randquotes")

0.1.0 by AbdulMajedRaja RS, 9 months ago


https://github.com/amrrs/randquotes


Report a bug at https://github.com/amrrs/randquotes/issues


Browse source code at https://github.com/cran/randquotes


Authors: AbdulMajedRaja RS [aut, cre]


Documentation:   PDF Manual  


AGPL license


Imports jsonlite, xml2, curl

Suggests testthat


See at CRAN