Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rpodcast/op3r
R client to the Open Podcast Prefix Project
https://github.com/rpodcast/op3r
Last synced: 1 day ago
JSON representation
R client to the Open Podcast Prefix Project
- Host: GitHub
- URL: https://github.com/rpodcast/op3r
- Owner: rpodcast
- License: other
- Created: 2024-05-11T02:01:05.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-26T03:03:03.000Z (7 months ago)
- Last Synced: 2024-12-20T16:18:35.769Z (3 days ago)
- Language: R
- Homepage: https://rpodcast.github.io/op3r/
- Size: 606 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%"
)httptest2::start_vignette("vignette-mocks/README")
```# op3r
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
`op3r` is an R package providing a tidy interface to the Open Prefix Project (OP3) API created by [John Spurlock](https://twitter.com/johnspurlock) available at
> The Open Podcast Prefix Project (OP3) is a free and open-source podcast prefix analytics service committed to open data and listener privacy.
## Installation
You can install the development version of op3r from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("rpodcast/op3r")
```## Configuration
The API endpoints supported by `op3r` require an API token. To obtain your own set, create a free developer account at and save the token as an environment variables called `OP3_API_TOKEN` within a project-level or default user-directory `.Renviron` file.
## Basic Usage
### Authentication
Save your OP3 API token in a project-level or user-level `.Renviron` file using the following as a template:
```
OP3_API_TOKEN="abcd123"
```You can check whether authentication is working correctly with the `op3_token_isset()` function:
```{r}
#| echo: true
#| eval: false
library(op3r)
op3_token_isset()
```### Example: Download Metrics
The following example shows how to obtain OP3 download metrics of the [R Weekly Highlights](https://serve.podhome.fm/r-weekly-highlights) Podcast.
```{r}
#| echo: false
#| eval: true
library(op3r)
``````{r}
# using the OP3 UUID for R Weekly Highlights
show_id <- "c008c9c7cfe847dda55cfdde54a22154"
op3_downloads_show(show_id = show_id)
``````{r, include=FALSE}
httptest2::end_vignette()
```### Learn More
You can find a complete reference of the available functions as well as a comprehensive getting started guide at .