Skip to content

Commit 3c5cce1

Browse files
committed
Add hub.podcastindex.org endpoint and podping parameters to hubnotify
https://podcastindex.social/@dave/110974683492205531
1 parent 84351c7 commit 3c5cce1

File tree

9 files changed

+298
-0
lines changed

9 files changed

+298
-0
lines changed

Postman Docs/PodcastIndex.postman_collection.json

+59
Original file line numberDiff line numberDiff line change
@@ -1484,6 +1484,59 @@
14841484
{
14851485
"name": "hub",
14861486
"item": [
1487+
{
1488+
"name": "Pub Notify (Hub)",
1489+
"request": {
1490+
"auth": {
1491+
"type": "noauth"
1492+
},
1493+
"method": "GET",
1494+
"header": [],
1495+
"url": {
1496+
"raw": "https://hub.podcastindex.org/pubnotify",
1497+
"host": [
1498+
"https://hub.podcastindex.org"
1499+
],
1500+
"path": [
1501+
"pubnotify"
1502+
],
1503+
"query": [
1504+
{
1505+
"key": "id",
1506+
"value": "75075",
1507+
"description": "The PodcastIndex Feed ID\n\nThe `id` or the `url` is required.",
1508+
"disabled": true
1509+
},
1510+
{
1511+
"key": "url",
1512+
"value": "https://feeds.theincomparable.com/batmanuniversity",
1513+
"description": "The Podcast Feed URL\n\nThe `id` or the `url` is required.",
1514+
"disabled": true
1515+
},
1516+
{
1517+
"key": "reason",
1518+
"value": "",
1519+
"description": "Send a [podping](https://github.com/Podcastindex-org/podping-hivewriter#podping-reasons) with the specified reason.\n\nTo just send an `update` podping, the `podping` parameter can be used instead.\n",
1520+
"disabled": true
1521+
},
1522+
{
1523+
"key": "podping",
1524+
"value": "",
1525+
"description": "Send a [podping](https://github.com/Podcastindex-org/podping-hivewriter#podping-reasons) with an `update` reason.\n\nParameter shall not have a value\n",
1526+
"disabled": true
1527+
},
1528+
{
1529+
"key": "pretty",
1530+
"value": "",
1531+
"description": "If present, makes the output “pretty” to help with debugging.\n\nParameter shall not have a value\n",
1532+
"disabled": true
1533+
}
1534+
]
1535+
},
1536+
"description": "Notify the index that a feed has changed\n\nNote: No API key needed for this endpoint.\n\nExamples:\n - https://api.podcastindex.org/api/1.0/hub/pubnotify?id=920666&pretty\n - https://api.podcastindex.org/api/1.0/hub/pubnotify?url=https://feeds.theincomparable.com/batmanuniversity&pretty\n"
1537+
},
1538+
"response": []
1539+
},
14871540
{
14881541
"name": "Pub Notify",
14891542
"request": {
@@ -1514,6 +1567,12 @@
15141567
"description": "The Podcast Feed URL\n\nThe `id` or the `url` is required.",
15151568
"disabled": true
15161569
},
1570+
{
1571+
"key": "reason",
1572+
"value": "",
1573+
"description": "Send a [podping](https://github.com/Podcastindex-org/podping-hivewriter#podping-reasons) with the specified reason.\n\nTo just send an `update` podping, use the [https://hub.podcastindex.org/pubnotify](#get-/pubnotify) server instead.\n",
1574+
"disabled": true
1575+
},
15171576
{
15181577
"key": "pretty",
15191578
"value": "",
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: podping
2+
in: query
3+
# language=Markdown
4+
description: |
5+
Send a [podping](https://github.com/Podcastindex-org/podping-hivewriter#podping-reasons) with an `update` reason.
6+
7+
8+
Parameter shall not have a value
9+
schema:
10+
type: boolean
11+
allowEmptyValue: true
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: reason
2+
in: query
3+
# language=Markdown
4+
description: |
5+
Send a [podping](https://github.com/Podcastindex-org/podping-hivewriter#podping-reasons) with the specified reason.
6+
7+
8+
To just send an `update` podping, the `podping` parameter can be used instead.
9+
schema:
10+
type: string
11+
enum:
12+
- ""
13+
- "live"
14+
- "liveEnd"
15+
example: ""
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: reason
2+
in: query
3+
# language=Markdown
4+
description: |
5+
Send a [podping](https://github.com/Podcastindex-org/podping-hivewriter#podping-reasons) with the specified reason.
6+
7+
8+
To just send an `update` podping, use the [https://hub.podcastindex.org/pubnotify](#get-/pubnotify) server instead.
9+
schema:
10+
type: string
11+
enum:
12+
- ""
13+
- "live"
14+
- "liveEnd"
15+
example: ""

api_src/paths/hub/hub.pubnotify.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
get:
2+
tags:
3+
- Hub
4+
summary: Pub Notify (Hub)
5+
# language=Markdown
6+
description: |
7+
Notify the index that a feed has changed
8+
9+
10+
Note: No API key needed for this endpoint.
11+
12+
13+
Examples:
14+
15+
- https://hub.podcastindex.org/pubnotify?id=920666&pretty
16+
- https://hub.podcastindex.org/pubnotify?url=https://feeds.theincomparable.com/batmanuniversity&pretty
17+
operationId: pubnotify
18+
security: [] # no security required
19+
servers:
20+
- url: https://hub.podcastindex.org
21+
description: "Server for handling feed publish/update notifications"
22+
parameters:
23+
- $ref: '../../components/parameters/id_feed_podcast_pi_pubnotify.yaml'
24+
- $ref: '../../components/parameters/url_pubnotify.yaml'
25+
- $ref: '../../components/parameters/reason.yaml'
26+
- $ref: '../../components/parameters/podping.yaml'
27+
- $ref: '../../components/parameters/pretty.yaml'
28+
responses:
29+
'200':
30+
$ref: '../../components/responses/hub_pubnotify.yaml'
31+
'400':
32+
$ref: '../../components/responses/400.yaml'
33+
'401':
34+
$ref: '../../components/responses/401.yaml'

api_src/paths/hub/pubnotify.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ get:
1919
parameters:
2020
- $ref: '../../components/parameters/id_feed_podcast_pi_pubnotify.yaml'
2121
- $ref: '../../components/parameters/url_pubnotify.yaml'
22+
- $ref: '../../components/parameters/reason_liveonly.yaml'
2223
- $ref: '../../components/parameters/pretty.yaml'
2324
responses:
2425
'200':

api_src/root.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ paths:
233233
$ref: 'paths/stats/current.yaml'
234234
'/categories/list':
235235
$ref: 'paths/categories/list.yaml'
236+
'/pubnotify':
237+
$ref: 'paths/hub/hub.pubnotify.yaml'
236238
'/hub/pubnotify':
237239
$ref: 'paths/hub/pubnotify.yaml'
238240
'/add/byfeedurl':

docs/pi_api.json

+85
Original file line numberDiff line numberDiff line change
@@ -1522,6 +1522,51 @@
15221522
}
15231523
}
15241524
},
1525+
"/pubnotify": {
1526+
"get": {
1527+
"tags": [
1528+
"Hub"
1529+
],
1530+
"summary": "Pub Notify (Hub)",
1531+
"description": "Notify the index that a feed has changed\n\n\nNote: No API key needed for this endpoint.\n\n\nExamples:\n\n - https://hub.podcastindex.org/pubnotify?id=920666&pretty\n - https://hub.podcastindex.org/pubnotify?url=https://feeds.theincomparable.com/batmanuniversity&pretty\n",
1532+
"operationId": "pubnotify",
1533+
"security": [],
1534+
"servers": [
1535+
{
1536+
"url": "https://hub.podcastindex.org",
1537+
"description": "Server for handling feed publish/update notifications"
1538+
}
1539+
],
1540+
"parameters": [
1541+
{
1542+
"$ref": "#/components/parameters/id_feed_podcast_pi_pubnotify"
1543+
},
1544+
{
1545+
"$ref": "#/components/parameters/url_pubnotify"
1546+
},
1547+
{
1548+
"$ref": "#/components/parameters/reason"
1549+
},
1550+
{
1551+
"$ref": "#/components/parameters/podping"
1552+
},
1553+
{
1554+
"$ref": "#/components/parameters/pretty"
1555+
}
1556+
],
1557+
"responses": {
1558+
"200": {
1559+
"$ref": "#/components/responses/hub_pubnotify"
1560+
},
1561+
"400": {
1562+
"$ref": "#/components/responses/400"
1563+
},
1564+
"401": {
1565+
"$ref": "#/components/responses/401"
1566+
}
1567+
}
1568+
}
1569+
},
15251570
"/hub/pubnotify": {
15261571
"get": {
15271572
"tags": [
@@ -1538,6 +1583,9 @@
15381583
{
15391584
"$ref": "#/components/parameters/url_pubnotify"
15401585
},
1586+
{
1587+
"$ref": "#/components/parameters/reason_liveonly"
1588+
},
15411589
{
15421590
"$ref": "#/components/parameters/pretty"
15431591
}
@@ -2284,6 +2332,43 @@
22842332
},
22852333
"example": "https://feeds.theincomparable.com/batmanuniversity"
22862334
},
2335+
"reason": {
2336+
"name": "reason",
2337+
"in": "query",
2338+
"description": "Send a [podping](https://github.com/Podcastindex-org/podping-hivewriter#podping-reasons) with the specified reason.\n\n\nTo just send an `update` podping, the `podping` parameter can be used instead.\n",
2339+
"schema": {
2340+
"type": "string",
2341+
"enum": [
2342+
"",
2343+
"live",
2344+
"liveEnd"
2345+
]
2346+
},
2347+
"example": ""
2348+
},
2349+
"podping": {
2350+
"name": "podping",
2351+
"in": "query",
2352+
"description": "Send a [podping](https://github.com/Podcastindex-org/podping-hivewriter#podping-reasons) with an `update` reason.\n\n\nParameter shall not have a value\n",
2353+
"schema": {
2354+
"type": "boolean"
2355+
},
2356+
"allowEmptyValue": true
2357+
},
2358+
"reason_liveonly": {
2359+
"name": "reason",
2360+
"in": "query",
2361+
"description": "Send a [podping](https://github.com/Podcastindex-org/podping-hivewriter#podping-reasons) with the specified reason.\n\n\nTo just send an `update` podping, use the [https://hub.podcastindex.org/pubnotify](#get-/pubnotify) server instead.\n",
2362+
"schema": {
2363+
"type": "string",
2364+
"enum": [
2365+
"",
2366+
"live",
2367+
"liveEnd"
2368+
]
2369+
},
2370+
"example": ""
2371+
},
22872372
"chash": {
22882373
"name": "chash",
22892374
"in": "query",

docs/pi_api.yaml

+76
Original file line numberDiff line numberDiff line change
@@ -1395,6 +1395,40 @@ paths:
13951395
$ref: '#/components/responses/400'
13961396
'401':
13971397
$ref: '#/components/responses/401'
1398+
/pubnotify:
1399+
get:
1400+
tags:
1401+
- Hub
1402+
summary: Pub Notify (Hub)
1403+
description: |
1404+
Notify the index that a feed has changed
1405+
1406+
1407+
Note: No API key needed for this endpoint.
1408+
1409+
1410+
Examples:
1411+
1412+
- https://hub.podcastindex.org/pubnotify?id=920666&pretty
1413+
- https://hub.podcastindex.org/pubnotify?url=https://feeds.theincomparable.com/batmanuniversity&pretty
1414+
operationId: pubnotify
1415+
security: []
1416+
servers:
1417+
- url: https://hub.podcastindex.org
1418+
description: Server for handling feed publish/update notifications
1419+
parameters:
1420+
- $ref: '#/components/parameters/id_feed_podcast_pi_pubnotify'
1421+
- $ref: '#/components/parameters/url_pubnotify'
1422+
- $ref: '#/components/parameters/reason'
1423+
- $ref: '#/components/parameters/podping'
1424+
- $ref: '#/components/parameters/pretty'
1425+
responses:
1426+
'200':
1427+
$ref: '#/components/responses/hub_pubnotify'
1428+
'400':
1429+
$ref: '#/components/responses/400'
1430+
'401':
1431+
$ref: '#/components/responses/401'
13981432
/hub/pubnotify:
13991433
get:
14001434
tags:
@@ -1416,6 +1450,7 @@ paths:
14161450
parameters:
14171451
- $ref: '#/components/parameters/id_feed_podcast_pi_pubnotify'
14181452
- $ref: '#/components/parameters/url_pubnotify'
1453+
- $ref: '#/components/parameters/reason_liveonly'
14191454
- $ref: '#/components/parameters/pretty'
14201455
responses:
14211456
'200':
@@ -2172,6 +2207,47 @@ components:
21722207
schema:
21732208
type: string
21742209
example: https://feeds.theincomparable.com/batmanuniversity
2210+
reason:
2211+
name: reason
2212+
in: query
2213+
description: |
2214+
Send a [podping](https://github.com/Podcastindex-org/podping-hivewriter#podping-reasons) with the specified reason.
2215+
2216+
2217+
To just send an `update` podping, the `podping` parameter can be used instead.
2218+
schema:
2219+
type: string
2220+
enum:
2221+
- ''
2222+
- live
2223+
- liveEnd
2224+
example: ''
2225+
podping:
2226+
name: podping
2227+
in: query
2228+
description: |
2229+
Send a [podping](https://github.com/Podcastindex-org/podping-hivewriter#podping-reasons) with an `update` reason.
2230+
2231+
2232+
Parameter shall not have a value
2233+
schema:
2234+
type: boolean
2235+
allowEmptyValue: true
2236+
reason_liveonly:
2237+
name: reason
2238+
in: query
2239+
description: |
2240+
Send a [podping](https://github.com/Podcastindex-org/podping-hivewriter#podping-reasons) with the specified reason.
2241+
2242+
2243+
To just send an `update` podping, use the [https://hub.podcastindex.org/pubnotify](#get-/pubnotify) server instead.
2244+
schema:
2245+
type: string
2246+
enum:
2247+
- ''
2248+
- live
2249+
- liveEnd
2250+
example: ''
21752251
chash:
21762252
name: chash
21772253
in: query

0 commit comments

Comments
 (0)