{"id":22636657,"url":"https://github.com/freguglia/rtwitchapi","last_synced_at":"2025-07-27T07:12:27.546Z","repository":{"id":115799564,"uuid":"119831541","full_name":"Freguglia/rTwitchAPI","owner":"Freguglia","description":"A Twitch.tv API wrapper for R","archived":false,"fork":false,"pushed_at":"2022-12-05T15:56:55.000Z","size":53,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T17:17:46.654Z","etag":null,"topics":["r","rpackage","twitch-api"],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Freguglia.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-01T12:15:13.000Z","updated_at":"2024-05-24T18:59:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"19400dbd-2c60-4ba9-848c-2821173bedf1","html_url":"https://github.com/Freguglia/rTwitchAPI","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/Freguglia%2FrTwitchAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freguglia%2FrTwitchAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freguglia%2FrTwitchAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freguglia%2FrTwitchAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Freguglia","download_url":"https://codeload.github.com/Freguglia/rTwitchAPI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248480421,"owners_count":21110939,"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","rpackage","twitch-api"],"created_at":"2024-12-09T03:29:29.062Z","updated_at":"2025-04-11T21:21:13.914Z","avatar_url":"https://github.com/Freguglia.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# rTwitchAPI\n\n\u003c!-- badges: start --\u003e\n  [![Travis build status](https://travis-ci.org/Freguglia/rTwitchAPI.svg?branch=master)](https://travis-ci.org/Freguglia/rTwitchAPI)\n\u003c!-- badges: end --\u003e\n\n`rTwitchAPI` allows you to make calls to the [API](https://dev.twitch.tv/docs/api/reference/) of the popular streaming website [twitch.tv](twitch.tv) with simple R functions, allowing users to interact with the API even without great understaing of REST APIs and http. Since R is primarily used for statistical analysis, currently, the package only provides access to endpoints that return data, for example, [`GET https://api.twitch.tv/helix/streams`](https://dev.twitch.tv/docs/api/reference/#get-streams). Users who might need other functionalities are very likely to also need integration with tools from other programming languages and/or have enough background to directly implement the call with [`httr`](https://github.com/r-lib/httr).\n\nIn summary, `rTwitchAPI` removes the burden of writing the calls to specific endpoints and proccess results, making code cleaner, simpler and more accessible. It is just an interface to access the API and is in no way related to Twitch or the Twitch API. As stated in the [official documentation](https://dev.twitch.tv/docs/), by using it, you agree to [Twitch Developer Services Agreement](https://www.twitch.tv/p/legal/developer-agreement/).\n\n## Installation\n\n\u003c!---You can install the released version of rTwitchAPI from [CRAN](https://CRAN.R-project.org) with:\n\n``` r\ninstall.packages(\"rTwitchAPI\")\n```--\u003e\n\nYou can install the development version from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"Freguglia/rTwitchAPI\")\n```\n\n## Authentication\n\nAs most API's, Twitch API requires authentication for some types of calls, in the form of a **Client-ID** and/or an **Oauth token**. You can setup your Client-ID with the `twitch_auth()` function. For more information access on Client-ID and how to register your app, read [this link](https://dev.twitch.tv/dashboard/apps/create).\n\n**Define your Client-ID and Client-Secret variable.**\n\nIn order to add your Client-ID and Client-Secret to your environment file, you can use the function `edit_r_environ()` from the [`usethis` package](https://usethis.r-lib.org/).\n\n```{r, eval = F}\nusethis::edit_r_environ()\n```\n\n\nThis will open your .Renviron file in your text editor. Now, you can add the following line to it:\n\n```{r, eval = F}\nTWITCH_CLIENT_ID=YOUR_CLIENT_ID\nTWITCH_CLIENT_SECRET=YOUR_CLIENT_SECRET\n```\n\nSave the file and restart R for the changes to take effect.\n\n## Example\n\n```{r}\nlibrary(rTwitchAPI)\n\n# Setup authentication\ntwitch_auth()\n\n# An example request to the streams endpoint\nstreams_live \u003c- get_streams(first = 15, language = \"en\")\nstreams_live$data\n```\n\n## Contributions\n\nIf you find anything wrong in the package, have a suggestion, comment or request, please file an issue. Pull requests are also welcome.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreguglia%2Frtwitchapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreguglia%2Frtwitchapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreguglia%2Frtwitchapi/lists"}