Skip to content

Commit 1a406ef

Browse files
authored
Merge pull request #100 from nb823/podcastindex
Podcastindex extensions for feed
2 parents 4dc4cdc + fc89b52 commit 1a406ef

File tree

11 files changed

+1181
-32
lines changed

11 files changed

+1181
-32
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
/laminas-mkdoc-theme.tgz
88
/laminas-mkdoc-theme/
99
/phpunit.xml
10-
/vendor/
10+
/vendor/

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"require": {
3232
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
3333
"ext-dom": "*",
34+
"ext-filter": "*",
3435
"ext-libxml": "*",
3536
"laminas/laminas-escaper": "^2.9",
3637
"laminas/laminas-stdlib": "^3.6"
Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,55 @@
11
# Podcast Index
22

3-
The Podcast Index Extension adds support for the [Podcast Index RSS namespace](https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md),
3+
The Podcast Index Extension adds support for
4+
the [Podcast Index RSS namespace](https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md),
45
an open source project which consolidates new features for podcasts into a
56
single namespace.
67

7-
Channel API methods:
8+
## Channel API
89

9-
Method | Description
10-
------ | -----------
11-
`isLocked()` | Returns whether the feed is open for importing to new platforms.
12-
`getLockOwner()` | Returns the email address for owner verification.
13-
`getFunding()` | Returns funding information. The output is an object with "url" and "value" properties.
10+
### GET methods
1411

15-
Item API methods:
12+
| Method | Description |
13+
|-----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|
14+
| `isLocked()` | Returns whether the feed is open for importing to new platforms. |
15+
| `getLockOwner()` `getPodcastIndexLockOwner()` | Returns the email address for owner verification. |
16+
| `getFunding()` `getPodcastIndexFunding()` | Returns funding information. The output is an object with "url" and "value" properties. |
17+
| `getPodcastIndexLicense()` | Returns license information. The output is an object with "identifier" and "url" properties. |
18+
| `getPodcastIndexLocation()` | Returns funding information. The output is an object with "description", "geo" and "osm" properties. |
19+
| `getPodcastIndexImages()` | Returns information on responsive images. The output is an object with a "srcset" property. |
20+
| `getPodcastIndexUpdateFrequency()` | Returns information on the intended release schedule. The output is an object with "description", "complete", "dtstart" and "rrule" properties. |
21+
| `getPodcastIndexPeople()` | Returns information on the involved people. The output is an array of objects, each with the properties "name", "role", "group", "img" and "href". |
1622

17-
Method | Description
18-
------ | -----------
19-
`getTranscript()` | Returns transcript information for the entry. The output is an object with "url", "type", "language" and "rel" properties/
20-
`getChapters()` | Returns chapter information for the entry. The output is an object with "url" and "type" properties.
21-
`getSoundbites()` | Returns soundbites for the entry. The output is an array of objects with "title", "startTime" and "duration" properties.
23+
### SET methods
24+
25+
| Method | Description |
26+
|------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
27+
| `setPodcastIndexLocked()` | Expects an array with the required keys "value" and "owner". |
28+
| `setPodcastIndexFunding()` | Expects an array with the required keys "title" and "url". |
29+
| `setPodcastIndexLicense()` | Expects an array with the required keys "identifier" and "url". |
30+
| `setPodcastIndexLocation()` | Expects an array with the required key "description" and the optional keys "geo" and "osm". |
31+
| `setPodcastIndexImages()` | Expects an array with the required key "srcset". |
32+
| `setPodcastIndexUpdateFrequency()` | Expects an array with the required key "description" and the optional keys "complete" (bool), "dtstart" (ISO8601 string) and "rrule". |
33+
| `addPodcastIndexPerson()` | Expects an array with the required key "name" and the optional keys "role", "group", "img" and "href". |
34+
| `setPodcastIndexPeople()` | Expects an array of objects with each the required key "name" and the optional keys "role", "group", "img" and "href". |
35+
36+
## Episode API
37+
38+
### GET methods
39+
40+
| Method | Description |
41+
|-------------------|----------------------------------------------------------------------------------------------------------------------------|
42+
| `getTranscript()` | Returns transcript information for the entry. The output is an object with "url", "type", "language" and "rel" properties. |
43+
| `getChapters()` | Returns chapter information for the entry. The output is an object with "url" and "type" properties. |
44+
| `getSoundbites()` | Returns soundbites for the entry. The output is an array of objects with "title", "startTime" and "duration" properties. |
45+
46+
### SET methods
47+
48+
| Method | Description |
49+
|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
50+
| `setPodcastIndexTranscript()` | Expects an array with the required keys "url" and "type", and with the optional keys "language" and "rel". |
51+
| `setPodcastIndexChapters()` | Expects an array with the required keys "url" and "type". |
52+
| `addPodcastIndexSoundbites()` | Expects an array of soundbite entries, each itself an array with the required keys "title" and "startTime", and with the optional key "duration". |
2253

2354
See the [Podcast Index website](https://podcastindex.org) for more information
2455
about the project.

psalm-baseline.xml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="5.18.0@b113f3ed0259fd6e212d87c3df80eec95a6abf19">
2+
<files psalm-version="5.19.0@06b71be009a6bd6d81b9811855d6629b9fe90e1b">
33
<file src="src/PubSubHubbub/AbstractCallback.php">
44
<DocblockTypeContradiction>
55
<code><![CDATA[$this->httpResponse === null]]></code>
@@ -1582,17 +1582,13 @@
15821582
</MixedReturnStatement>
15831583
</file>
15841584
<file src="src/Reader/Extension/PodcastIndex/Feed.php">
1585-
<MismatchingDocblockReturnType>
1586-
<code>null|object{url: string, title: string}</code>
1587-
</MismatchingDocblockReturnType>
15881585
<MixedAssignment>
15891586
<code>$locked</code>
15901587
<code>$owner</code>
15911588
</MixedAssignment>
15921589
<MixedInferredReturnType>
15931590
<code>?string</code>
15941591
<code>bool</code>
1595-
<code>null|object{url: string, title: string}</code>
15961592
</MixedInferredReturnType>
15971593
<MixedReturnStatement>
15981594
<code><![CDATA[$this->data['locked']]]></code>
@@ -3100,13 +3096,32 @@
31003096
</PossiblyUnusedProperty>
31013097
</file>
31023098
<file src="src/Writer/Extension/PodcastIndex/Feed.php">
3099+
<DocblockTypeContradiction>
3100+
<code><![CDATA[! is_string($value['url'])]]></code>
3101+
<code><![CDATA[is_string($value['description'])]]></code>
3102+
<code><![CDATA[is_string($value['description'])]]></code>
3103+
<code><![CDATA[is_string($value['identifier'])]]></code>
3104+
<code><![CDATA[is_string($value['name'])]]></code>
3105+
<code><![CDATA[is_string($value['srcset'])]]></code>
3106+
<code><![CDATA[isset($value['complete']) && ! is_bool($value['complete'])]]></code>
3107+
<code><![CDATA[isset($value['geo']) && ! is_string($value['geo'])]]></code>
3108+
<code><![CDATA[isset($value['group']) && ! is_string($value['group'])]]></code>
3109+
<code><![CDATA[isset($value['osm']) && ! is_string($value['osm'])]]></code>
3110+
<code><![CDATA[isset($value['role']) && ! is_string($value['role'])]]></code>
3111+
<code><![CDATA[isset($value['rrule']) && ! is_string($value['rrule'])]]></code>
3112+
</DocblockTypeContradiction>
31033113
<PossiblyUnusedMethod>
31043114
<code>__call</code>
31053115
<code>__construct</code>
31063116
<code>getEncoding</code>
31073117
<code>setEncoding</code>
31083118
<code>setPodcastIndexFunding</code>
3119+
<code>setPodcastIndexImages</code>
3120+
<code>setPodcastIndexLicense</code>
3121+
<code>setPodcastIndexLocation</code>
31093122
<code>setPodcastIndexLocked</code>
3123+
<code>setPodcastIndexPeople</code>
3124+
<code>setPodcastIndexUpdateFrequency</code>
31103125
</PossiblyUnusedMethod>
31113126
<PossiblyUnusedParam>
31123127
<code>$params</code>
@@ -3129,10 +3144,6 @@
31293144
</RedundantCastGivenDocblockType>
31303145
</file>
31313146
<file src="src/Writer/Extension/PodcastIndex/Renderer/Feed.php">
3132-
<MixedMethodCall>
3133-
<code>getPodcastIndexFunding</code>
3134-
<code>getPodcastIndexLocked</code>
3135-
</MixedMethodCall>
31363147
<RedundantCastGivenDocblockType>
31373148
<code><![CDATA[(string) $funding['title']]]></code>
31383149
<code><![CDATA[(string) $locked['value']]]></code>

0 commit comments

Comments
 (0)