{"id":21025768,"url":"https://github.com/koderkow/twitchr","last_synced_at":"2025-05-15T10:31:10.861Z","repository":{"id":44614387,"uuid":"314986183","full_name":"KoderKow/twitchr","owner":"KoderKow","description":"R Interface for the Twitch API","archived":false,"fork":false,"pushed_at":"2022-08-07T05:54:22.000Z","size":188,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T07:22:54.018Z","etag":null,"topics":["r","twitch","twitch-api","twitchtv"],"latest_commit_sha":null,"homepage":"https://koderkow.github.io/twitchr","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KoderKow.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-22T07:51:29.000Z","updated_at":"2024-09-05T10:55:16.000Z","dependencies_parsed_at":"2022-08-12T11:20:46.682Z","dependency_job_id":null,"html_url":"https://github.com/KoderKow/twitchr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KoderKow%2Ftwitchr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KoderKow%2Ftwitchr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KoderKow%2Ftwitchr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KoderKow%2Ftwitchr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KoderKow","download_url":"https://codeload.github.com/KoderKow/twitchr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254322811,"owners_count":22051669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["r","twitch","twitch-api","twitchtv"],"created_at":"2024-11-19T11:36:33.425Z","updated_at":"2025-05-15T10:31:10.073Z","avatar_url":"https://github.com/KoderKow.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# twitchr\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/KoderKow/twitchr/workflows/R-CMD-check/badge.svg)](https://github.com/KoderKow/twitchr/actions)\n[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)\n\u003c!-- badges: end --\u003e\n\nR wrapper for the Twitch API.\n\n## Installation\n\n### From Github\n\n```{r, eval=FALSE}\n# install.packages(\"devtools\")\ndevtools::install_github(\"koderkow/twitch\")\n```\n\n## Setup\n\n### Steps\n\n1. Go to https://dev.twitch.tv/login\n2. Login with Twitch\n3. Click *Register Your Application*\n4. Fill out the App information\n    - Name: Name of the app. Something to label it for the own personal use\n    - OAuth Redirect URLs: Fill this in if one if you have one. If not put `http://localhost`\n    - Category: Pick related category such as *Analytics Tool*\n5. Click Create\n6. On the new app, click *Manage*\n7. This page will have the Client ID and Client Secret\n8. Open the `.Renviron` to add these values\n    - Run `usethis::edit_r_environ()` in the RStudio R console\n9. Enter the two key values into this file with the following key names\n    - `TWITCH_CLIENT_ID=YOUR CLIENT ID`\n    - `TWITCH_SECRET=YOUR SECRET`\n10. Restart the RStudio session\n\n### More Information\n\nRead about getting authorization tokens [here](https://dev.twitch.tv/docs/authentication/).\n\n## Examples\n\n```{r}\nlibrary(twitchr)\n```\n\n### Authorize\n\nGet auth token by using `twitch_auth()`. This will be appended to future API calls\n\n```{r}\ntwitch_auth()\n```\n\n### Get user information\n\nLook up a user by their display name to get user information. This is userful to obtain `broadcaster_id` for other functions\n\n```{r}\nuser \u003c- get_users(login = \"KowAndToilet\")\n\nuser\n```\n\n### Get Videos\n\nObtain a users recent videos \n\n```{r}\nvideos \u003c- get_videos(user_id = user$id)\n```\n\n### Get Followers\n\nDisplay the followers of a channel\n\n```{r}\nfollowers \u003c- get_follows(to_id = user$id)\n```\n\n### Get chatters\n\nDisplay who is currently in a broadcasters chat\n\n```{r}\nchatters \u003c- get_chatters(\"KowAndToilet\")\n```\n\n### Other functions\n\nI have covered most of the Twitch API endpoints which can be viewed [here](https://koderkow.github.io/twitchr/reference/index.html). If there are any you would like added please create an issue! :)\n\n## Thanks to\n\n- [Freguglia](https://github.com/Freguglia/rTwitchAPI/) for getting me started on the oauth code\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoderkow%2Ftwitchr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoderkow%2Ftwitchr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoderkow%2Ftwitchr/lists"}