Skip to content

Commit

Permalink
Add reader podcast extensions docs
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Goudriaan <tim@codedmonkey.com>
  • Loading branch information
codedmonkey committed Dec 13, 2020
1 parent c52bfc4 commit 87f1dbf
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 0 deletions.
106 changes: 106 additions & 0 deletions docs/book/consuming-podcasts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Consuming Podcast Feeds

Several extensions for podcast namespaces are included and enabled by default
when importing a feed through laminas-feed's Reader subcomponent. Podcast feeds
inherit most of their properties from RSS; refer to the "Consuming
RSS Feeds" documentation for details.

## Basic Use of a Podcast Feed

Read a Podcast feed and create an audio player for each entry:

```php
$feed = Laminas\Feed\Reader\Reader::import('http://podcast.example.com/feed/');
echo '<h1>' . $feed->getTitle() . '</h1>' . "\n\n";
echo '<p>' . $feed->getSummary() . '</p>' . "\n\n";
foreach ($feed as $entry) {
echo '<h3>' . $entry->getTitle() . '</h3>' . "\n";
echo '<p>' . $entry->getSummary() . '</p>' . "\n";
echo '<audio controls src="' . $entry->getEnclosure()->url . '></audio>'. "\n";
}
```
## Get properties
### Podcast Extension properties
The Podcast Extension adds support for the iTunes Podcast specification.
Channel API methods:
Method | Description
------ | -----------
`getCastAuthor()` |
`getBlock()` |
`getItunesCategories()` |
`getExplicit()` |
`getItunesImage()` |
`getKeywords()` |
`getNewFeedUrl()` |
`getOwner()` |
`getSubtitle()` |
`getSummary()` |
`getPodcastType()` |
`isComplete()` |
Item API methods:
Method | Description
------ | -----------
`getCastAuthor()` |
`getBlock()` |
`getDuration()` |
`getExplicit()` |
`getKeywords()` |
`getTitle()` |
`getSubtitle()` |
`getSummary()` |
`getItunesImage()` |
`getEpisode()` |
`getEpisodeType()` |
`isClosedCaptioned()` |
`getSeason()` |
### PodcastIndex Extension properties
The PodcastIndex Extension adds support for the Podcast Index specification.
Channel API methods:
Method | Description
------ | -----------
`isLocked()` |
`getLockOwner()` |
`getFunding()` |
Item API methods:
Method | Description
------ | -----------
`getTranscript()` |
`getChapters()` |
`getSoundbites()` |
### GooglePlayPodcast Extension properties
The GooglePlayPodcast Extension adds support for the Google Play Podcast
specification.
Channel API methods:
Method | Description
------ | -----------
`getPlayPodcastAuthor()` |
`getPlayPodcastBlock()` |
`getPlayPodcastCategories()` |
`getPlayPodcastExplicit()` |
`getPlayPodcastImage()` |
`getPlayPodcastDescription()` |
Item API methods:
Method | Description
------ | -----------
`getPlayPodcastBlock()` |
`getPlayPodcastExplicit()` |
`getPlayPodcastDescription()` |
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ nav:
- 'Consuming RSS Feeds': consuming-rss.md
- 'Consuming Atom Feeds': consuming-atom.md
- 'Consuming Atom Entries': consuming-atom-entry.md
- 'Consuming Podcast Feeds': consuming-podcasts.md
- Security: security.md
- Writer: writer.md
- Pubsubhubbub: pubsubhubbub.md
Expand Down

0 comments on commit 87f1dbf

Please sign in to comment.