Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add fillerama wrapper #51

Merged
merged 11 commits into from
Dec 15, 2016
7 changes: 7 additions & 0 deletions R/say.r
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,13 @@ say <- function(what="Hello world!", by="cat", type="message", length=18,

if (what == "rms") {
what <- rmsfact::rmsfact()
}

if ( what %in% c("arresteddevelopment", "doctorwho", "dexter", "futurama", "holygrail", "simpsons", "starwars", "loremipsum")) {
check4jsonlite()
what <-
jsonlite::fromJSON(
paste0('http://api.chrisvalleskey.com/fillerama/get.php?count=1&format=json&show=', what))$db$quote
}

switch(type,
Expand Down
5 changes: 3 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ If you are familiar with `cowsay` on the cli, then you know what this is, but fo
* Franz-Sebastian Krah
* Lucy D'Agostino McGowan
* Guangchuang Yu
* Paolo Sonego

That's right, it takes 12 people to make `cowsay` - it's that hard.
That's right, it takes 13 people to make `cowsay` - it's that hard.

### Where to find ASCII animal art

Expand Down Expand Up @@ -246,7 +247,7 @@ say(fortune=59, by="clippy")
### Yoda

```{r}
say("Unlearn you must what learned you have", by="yoda")
say("starwars", by="yoda")
```

### Bats!
Expand Down
6 changes: 6 additions & 0 deletions man/say.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.