https://github.com/koderkow/ttvcollections
Download Twitch Highlights
https://github.com/koderkow/ttvcollections
Last synced: 2 months ago
JSON representation
Download Twitch Highlights
- Host: GitHub
- URL: https://github.com/koderkow/ttvcollections
- Owner: KoderKow
- License: other
- Created: 2020-11-22T01:09:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-22T01:42:15.000Z (over 5 years ago)
- Last Synced: 2025-12-28T04:30:29.804Z (6 months ago)
- Language: R
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# ttvCollections
The goal of ttvCollections is to download our highlights! This may turn into a separate package focusing on being a R wrapper for the Twitch API.
## Installation
- Make sure [youtube-dl](http://ytdl-org.github.io/youtube-dl/) is installed
- Download from here with `remotes::install_github("koderkow/ttvCollections")`
## Envirnment Variables
There are three environment variables that are default values to function parameters. Set in .Renviron with `usethis::edit_r_environ()`.
- TWITCH_CLIENT_ID
- TWITCH_SECRET
- TWITCH_USER_ID
## Sample code
### Auth
```{r}
library(ttvCollections)
twitch_auth()
```
### Extract Highlights
```{r}
d <- get_hightlights()
d
```
### Download a Hightlight
```{r}
urls <- d$url
download_video(urls[5], "sample-prefix")
```