Title: | A Podcast Index API Library for R |
---|---|
Description: | Access and download data from the Podcast Index Database directly from R using the 'PodcastIndex' <https://podcastindex-org.github.io/docs-api> API. |
Authors: | Eric Nantz [aut, cre] |
Maintainer: | Eric Nantz <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-11-15 02:50:21 UTC |
Source: | https://github.com/rpodcast/podindexr |
Create a custom authentication token required by the podcastindex api utilizing the podcastindex API key and secret pair
create_hash(epoch_time = NULL)
create_hash(epoch_time = NULL)
epoch_time |
string of time in UTC unix format. If NULL, the current system time will be used. |
string representing hash (sha1) of API key, secret and epoch time
created with the digest
package
episodes_byfeedid()
obtains all episodes from the a podcast specified by
one or more PodcastIndex feed ID(s)
episodes_byfeedid(feedid, max = 10, fulltext = FALSE, since = NULL)
episodes_byfeedid(feedid, max = 10, fulltext = FALSE, since = NULL)
feedid |
vector of one or more integers representing PodcastIndex Feed IDs. |
max |
Maximum number of results to return. Value must be a single integer between 1 and 1000. |
fulltext |
boolean to return the full text value of any text fields within the result data. If set to FALSE, all text fields are truncated to 100 words. |
since |
optional date string in format |
tibble
data frame with metadata associated with episodes
# Requires API key and secret episodes_byfeedid(feedid = 920666)
# Requires API key and secret episodes_byfeedid(feedid = 920666)
episodes_byguid()
obtains metadata for a single episode from a podcast
specified by a guid and either a feed ID or URL
episodes_byguid(guid, feedurl = NULL, feedid = NULL, fulltext = FALSE)
episodes_byguid(guid, feedurl = NULL, feedid = NULL, fulltext = FALSE)
guid |
character string of guid value for episode to retrieve |
feedurl |
character string of podcast feed URL |
feedid |
vector of one or more integers representing PodcastIndex Feed IDs. |
fulltext |
boolean to return the full text value of any text fields within the result data. If set to FALSE, all text fields are truncated to 100 words. |
tibble
data frame with metadata associated with the episode
# Requires API key and secret # using guid and feedid episodes_byguid(guid = "PC2084", feedid = 920666) # using guid and feedurl episodes_byguid(guid = "PC2084", feedurl = "http://mp3s.nashownotes.com/pc20rss.xml")
# Requires API key and secret # using guid and feedid episodes_byguid(guid = "PC2084", feedid = 920666) # using guid and feedurl episodes_byguid(guid = "PC2084", feedurl = "http://mp3s.nashownotes.com/pc20rss.xml")
episodes_byid()
obtains all metadata associated with a single episode
specified by ID.
episodes_byid(id, fulltext = FALSE)
episodes_byid(id, fulltext = FALSE)
id |
integer of the PodcastIndex episode ID to search for. |
fulltext |
boolean to return the full text value of any text fields within the result data. If set to FALSE, all text fields are truncated to 100 words. |
tibble
data frame with metadata associated with the episode
# Requires API key and secret episodes_byid(id = 75075)
# Requires API key and secret episodes_byid(id = 75075)
episodes_byfeedid()
obtains all episodes from the a podcast specified by
a feed URL
episodes_byurl(url, max = 10, fulltext = FALSE, since = NULL)
episodes_byurl(url, max = 10, fulltext = FALSE, since = NULL)
url |
character string of podcast feed URL |
max |
Maximum number of results to return. Value must be a single integer between 1 and 1000. |
fulltext |
boolean to return the full text value of any text fields within the result data. If set to FALSE, all text fields are truncated to 100 words. |
since |
optional date string in format |
tibble
data frame with metadata associated with episodes
# Requires API key and secret episodes_byurl(url = "https://engineered.network/pragmatic/feed/index.xml")
# Requires API key and secret episodes_byurl(url = "https://engineered.network/pragmatic/feed/index.xml")
episodes_live()
obtains metadata for episodes that have the
podcast-liveitem tag enabled in the feed, meaning episodes airing
live at the time of running this function.
episodes_live(max = 10)
episodes_live(max = 10)
max |
Maximum number of results to return. Value must be a single integer between 1 and 1000. |
tibble
data frame with metadata associated with live episodes
# Requires API key and secret episodes_live(max = 20)
# Requires API key and secret episodes_live(max = 20)
episodes_random()
obtains a random selection of podcast episodes
from the Podcast Index database
episodes_random( max = 2, lang = "en", cat_terms = NULL, notcat_terms = NULL, fulltext = FALSE )
episodes_random( max = 2, lang = "en", cat_terms = NULL, notcat_terms = NULL, fulltext = FALSE )
max |
Maximum number of results to return. Value must be a single integer between 1 and 1000. |
lang |
optional two-letter language code that when specified will only return podcasts/episodes having that specific language. |
cat_terms |
optional character vector of one or more categories that when specified will only return podcasts/episodes under those categories. |
notcat_terms |
optional character vector of one or more categories that when specified will only return podcasts/episodes not under those categories. |
fulltext |
boolean to return the full text value of any text fields within the result data. If set to FALSE, all text fields are truncated to 100 words. |
tibble
data frame with metadata associated with episodes
# Requires API key and secret episodes_random(max = 20)
# Requires API key and secret episodes_random(max = 20)
episodes_recent()
obtains the most recent max
number of podcast
episodes across the entire PodcastIndex database, sorted in reverse
chronological order.
episodes_recent( max = 7, exclude_string = NULL, before = NULL, fulltext = FALSE )
episodes_recent( max = 7, exclude_string = NULL, before = NULL, fulltext = FALSE )
max |
Maximum number of results to return. Value must be a single integer between 1 and 1000. |
exclude_string |
character string used to exclude any episodes with title or URL containing the specified string. |
before |
episode ID string that when specified will only return episodes created before the specified episode ID, allowing you to walk back through episode history sequentially. |
fulltext |
boolean to return the full text value of any text fields within the result data. If set to FALSE, all text fields are truncated to 100 words. |
tibble
data frame with metadata associated with episodes
# Requires API key and secret episodes_recent(max = 20)
# Requires API key and secret episodes_recent(max = 20)
feeds_bymedium
obtains all feeds marked with the specified medium tag
value.
feeds_bymedium( medium = c("audiobook", "blog", "film", "music", "newsletter", "podcast", "video") )
feeds_bymedium( medium = c("audiobook", "blog", "film", "music", "newsletter", "podcast", "video") )
medium |
character string of medium to search for. Must be one of
|
tibble
data frame with metadata associated with feeds
## Not run: # Requires API key and secret feeds_bymedium(medium = "film") ## End(Not run)
## Not run: # Requires API key and secret feeds_bymedium(medium = "film") ## End(Not run)
feeds_recent()' retrieves the newest podcast feeds added to the podcastindex over the past 24 hours.
feeds_new(max = 60, since = NULL, feedid = NULL, desc = FALSE)
feeds_new(max = 60, since = NULL, feedid = NULL, desc = FALSE)
max |
Maximum number of results to return. Value must be a single integer between 1 and 1000. |
since |
optional date string in format |
feedid |
string of the Podcastindex Feed ID to start from
(or go to if |
desc |
boolean to display feeds in descending order. Only applicable
when specifying |
tibble
data frame with metadata associated with new feeds
# Requires API key and secret feeds_new(max = 20)
# Requires API key and secret feeds_new(max = 20)
feeds_recent()
retrieves the most recent podcast feeds added
to the podcastindex.
feeds_recent( max = 40, lang = "en", since = NULL, cat_terms = NULL, notcat_terms = NULL )
feeds_recent( max = 40, lang = "en", since = NULL, cat_terms = NULL, notcat_terms = NULL )
max |
Maximum number of results to return. Value must be a single integer between 1 and 1000. |
lang |
optional two-letter language code that when specified will only return podcasts/episodes having that specific language. |
since |
optional date string in format |
cat_terms |
optional character vector of one or more categories that when specified will only return podcasts/episodes under those categories. |
notcat_terms |
optional character vector of one or more categories that when specified will only return podcasts/episodes not under those categories. |
tibble
data frame with metadata associated with recent feeds
in chronological order
# Requires API key and secret feeds_recent() feeds_recent(max = 100, since = "2021-01-01", cat_terms = c("News", "Finance"))
# Requires API key and secret feeds_recent() feeds_recent(max = 100, since = "2021-01-01", cat_terms = c("News", "Finance"))
feeds_trending()
obtains the feeds in the Podcast Index that are trending.
feeds_trending( max = 10, lang = "en", since = NULL, cat_terms = NULL, notcat_terms = NULL )
feeds_trending( max = 10, lang = "en", since = NULL, cat_terms = NULL, notcat_terms = NULL )
max |
Maximum number of results to return. Value must be a single integer between 1 and 1000. |
lang |
optional two-letter language code that when specified will only return podcasts/episodes having that specific language. |
since |
optional date string in format |
cat_terms |
optional character vector of one or more categories that when specified will only return podcasts/episodes under those categories. |
notcat_terms |
optional character vector of one or more categories that when specified will only return podcasts/episodes not under those categories. |
tibble
data frame with metadata associated with feeds
feeds_withvalue
obtains all feeds from the Podcast Index database that
support the value
tag in the podcast namespace
feeds_withvalue()
feeds_withvalue()
tibble
data frame with metadata associated with feeds
## Not run: # Requires API key and secret feeds_withvalue() ## End(Not run)
## Not run: # Requires API key and secret feeds_withvalue() ## End(Not run)
Obtain the podcastindex API key and secret values from a .Renviron
file, either stored in the current directory or the user's home directory.
get_podcastindex_api_keys()
get_podcastindex_api_keys()
list with API key and API secret values
Detect if podcastindex API key/secret pair is defined
podcastindex_api_isset()
podcastindex_api_isset()
boolean, TRUE if both PODCASTINDEX_API_KEY
and
PODCASTINDEX_API_SECRET
environment variables are defined
in the current R session.
podcasts_byfeedid()
obtains all available metadata from the Podcast
Index database associated with a particular feed ID
podcasts_byfeedid(feedid)
podcasts_byfeedid(feedid)
feedid |
integer representing a Podcast Index feed ID |
tibble
data frame with metadata associated with feed
# Requires API key and secret podcasts_byfeedid(feedid = 920666)
# Requires API key and secret podcasts_byfeedid(feedid = 920666)
podcasts_byfeedurl()
obtains all available metadata from the Podcast
Index database associated with a particular feed URL
podcasts_byfeedurl(url)
podcasts_byfeedurl(url)
url |
character string of podcast feed URL |
tibble
data frame with metadata associated with feed
# Requires API key and secret podcasts_byfeedurl(url = "https://feeds.theincomparable.com/batmanuniversity")
# Requires API key and secret podcasts_byfeedurl(url = "https://feeds.theincomparable.com/batmanuniversity")
podcasts_byfeedguid()
obtains all available metadata from the Podcast
Index database associated with a particular feed GUID
podcasts_byguid(guid)
podcasts_byguid(guid)
guid |
string representing a Podcast Index feed GUID |
tibble
data frame with metadata associated with feed
# Requires API key and secret podcasts_byguid(guid = "9b024349-ccf0-5f69-a609-6b82873eab3c")
# Requires API key and secret podcasts_byguid(guid = "9b024349-ccf0-5f69-a609-6b82873eab3c")
podcasts_byitunesid()
obtains all available metadata from the Podcast
Index database associated with a particular iTunes ID
podcasts_byitunesid(itunesid)
podcasts_byitunesid(itunesid)
itunesid |
integer representing a Podcast Index iTunes feed ID |
tibble
data frame with metadata associated with feed
# Requires API key and secret podcasts_byitunesid(itunesid = 1441923632)
# Requires API key and secret podcasts_byitunesid(itunesid = 1441923632)
podcasts_categories()
obtains all of the possible categories supported
by the Podcast Index.
podcasts_categories()
podcasts_categories()
tibble
data frame with category id and name
# Requires API key and secret podcasts_categories()
# Requires API key and secret podcasts_categories()
search_apple_byterm()
replaces the Apple search API but
uses the Podcast Index database instead.
search_apple_byterm(term)
search_apple_byterm(term)
term |
character string of the term to search for |
tibble
data frame with metadata associated with podcasts
that match the search term
search_apple_byterm("metal")
search_apple_byterm("metal")
search_apple_lookup()
replaces the Apple podcast lookup api
but uses the Podcast Index database instead.
search_apple_lookup(feedid)
search_apple_lookup(feedid)
feedid |
integer of the iTunes feed ID to search for. |
tibble
data frame with metadata associated with podcasts
that match the feed ID
search_apple_lookup(feedid = 1441923632)
search_apple_lookup(feedid = 1441923632)
search_byperson()
performs a search of podcast episodes where the
specified person is mentioned.
search_byperson(q, fulltext = FALSE)
search_byperson(q, fulltext = FALSE)
q |
character string of the person to search for |
fulltext |
boolean to return the full text value of any text fields within the result data. If set to FALSE, all text fields are truncated to 100 words. |
tibble
data frame with metadata associated with episodes
that mention the person specified in the search query.
# Requires API key and secret search_byperson(q = "Adam Curry")
# Requires API key and secret search_byperson(q = "Adam Curry")
search_byterm()
performs a search of the title
, author
, or owner
of podcasts feeds within the PodcastIndex.
search_byterm(q, val = NULL, aponly = TRUE, clean = TRUE, fulltext = FALSE)
search_byterm(q, val = NULL, aponly = TRUE, clean = TRUE, fulltext = FALSE)
q |
character string of the term(s) to search for |
val |
string indicating which value block type to filter
search results. Valid entries are |
aponly |
boolean to only return feeds with an itunesId present |
clean |
boolean to only return non-explicit podcast feeds. Meaning
feeds where the |
fulltext |
boolean to return the full text value of any text fields within the result data. If set to FALSE, all text fields are truncated to 100 words. |
tibble
data frame with metadata associated with feeds
that match the search terms in the title
, author
, or owner
fields.
# Requires API key and secret search_byterm(q = "batman university")
# Requires API key and secret search_byterm(q = "batman university")
search_byterm()
performs a search of the title
field of podcasts
feeds within the PodcastIndex.
search_bytitle(q, val = NULL, clean = TRUE, fulltext = FALSE, similar = FALSE)
search_bytitle(q, val = NULL, clean = TRUE, fulltext = FALSE, similar = FALSE)
q |
character string of the term(s) to search for |
val |
string indicating which value block type to filter
search results. Valid entries are |
clean |
boolean to only return non-explicit podcast feeds. Meaning
feeds where the |
fulltext |
boolean to return the full text value of any text fields within the result data. If set to FALSE, all text fields are truncated to 100 words. |
similar |
boolean to include similar matches in search response |
tibble
data frame with metadata associated with feeds
that match (or similar to) the search terms in the title
fields.
# Requires API key and secret search_bytitle(q = "batman university")
# Requires API key and secret search_bytitle(q = "batman university")
search_music()
performs a search of the title
, author
, or owner
of podcast feeds within the PodcastIndex where the medium is music.
search_music(q, val = NULL, aponly = TRUE, clean = TRUE, fulltext = FALSE)
search_music(q, val = NULL, aponly = TRUE, clean = TRUE, fulltext = FALSE)
q |
character string of the term(s) to search for |
val |
string indicating which value block type to filter
search results. Valid entries are |
aponly |
boolean to only return feeds with an itunesId present |
clean |
boolean to only return non-explicit podcast feeds. Meaning
feeds where the |
fulltext |
boolean to return the full text value of any text fields within the result data. If set to FALSE, all text fields are truncated to 100 words. |
tibble
data frame with metadata associated with feeds
that match the search terms in the title
, author
, or owner
fields.
# Requires API key and secret search_music(q = "metal")
# Requires API key and secret search_music(q = "metal")