README.md

christmaswrap

Christmaswrap Build + Test CI Badge

Overview

christmaswrap is an API wrapper written in R for the Christmas Countdown API.

Installation

if (!require("remotes")) {
  install.packages("remotes")
}
remotes::install_github("Sean-C-Casey/christmaswrap")

Usage

> library(christmaswrap)
>  
> time_left(timezone = "PST")
$months
[1] 10

$weeks
[1] 44

$sleeps
[1] 313

$days
[1] 312

$hours
[1] 7510

$minutes
[1] 450651

$seconds
[1] 27039087
> total_time_left(timezone = "PST")
$days
[1] 312

$hours
[1] 22

$minutes
[1] 49

$seconds
[1] 59
> period_left("weeks", timezone = "PST")
[1] 44
> weekday(return_index = FALSE)
[1] "Sunday"
> joke()
$question
[1] "Why has Debenhams been forced to cancel its Christmas nativity play?"

$answer
[1] "No prophet!"
> all_jokes()
[[1]]
[[1]]$question
[1] "What does Santa suffer from if he gets stuck in a chimney?"

[[1]]$answer
[1] "Claus-trophobia!"

...

[[110]]
[[110]]$question
[1] "Why has Boris Johnson bought mistletoe this year?"

[[110]]$answer
[1] "Because he’s tired of being in the single market!"


Sean-C-Casey/christmaswrap documentation built on Feb. 24, 2022, 12:33 a.m.