Skip to content

Commit 9199f15

Browse files
committed
Add hub.podcastindex.org endpoint and podping parameters to hubnotify
https://podcastindex.social/@dave/110974683492205531
1 parent b162026 commit 9199f15

File tree

10 files changed

+306
-4
lines changed

10 files changed

+306
-4
lines changed

Postman Docs/PodcastIndex.postman_collection.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,6 +1478,59 @@
14781478
{
14791479
"name": "hub",
14801480
"item": [
1481+
{
1482+
"name": "Pub Notify (Hub)",
1483+
"request": {
1484+
"auth": {
1485+
"type": "noauth"
1486+
},
1487+
"method": "GET",
1488+
"header": [],
1489+
"url": {
1490+
"raw": "{{baseHubUrl}}/pubnotify",
1491+
"host": [
1492+
"{{baseHubUrl}}"
1493+
],
1494+
"path": [
1495+
"pubnotify"
1496+
],
1497+
"query": [
1498+
{
1499+
"key": "id",
1500+
"value": "75075",
1501+
"description": "The PodcastIndex Feed ID\n\nThe `id` or the `url` is required.",
1502+
"disabled": true
1503+
},
1504+
{
1505+
"key": "url",
1506+
"value": "https://feeds.theincomparable.com/batmanuniversity",
1507+
"description": "The Podcast Feed URL\n\nThe `id` or the `url` is required.",
1508+
"disabled": true
1509+
},
1510+
{
1511+
"key": "reason",
1512+
"value": "",
1513+
"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",
1514+
"disabled": true
1515+
},
1516+
{
1517+
"key": "podping",
1518+
"value": "",
1519+
"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",
1520+
"disabled": true
1521+
},
1522+
{
1523+
"key": "pretty",
1524+
"value": "",
1525+
"description": "If present, makes the output “pretty” to help with debugging.\n\nParameter shall not have a value\n",
1526+
"disabled": true
1527+
}
1528+
]
1529+
},
1530+
"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"
1531+
},
1532+
"response": []
1533+
},
14811534
{
14821535
"name": "Pub Notify",
14831536
"request": {
@@ -1508,6 +1561,12 @@
15081561
"description": "The Podcast Feed URL\n\nThe `id` or the `url` is required.",
15091562
"disabled": true
15101563
},
1564+
{
1565+
"key": "reason",
1566+
"value": "",
1567+
"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",
1568+
"disabled": true
1569+
},
15111570
{
15121571
"key": "pretty",
15131572
"value": "",
@@ -1801,6 +1860,10 @@
18011860
{
18021861
"key": "baseAppleUrl",
18031862
"value": "https://api.podcastindex.org/"
1863+
},
1864+
{
1865+
"key": "baseHubUrl",
1866+
"value": "https://hub.podcastindex.org/"
18041867
}
18051868
]
18061869
}
Lines changed: 11 additions & 0 deletions
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
Lines changed: 15 additions & 0 deletions
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: ""
Lines changed: 15 additions & 0 deletions
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

Lines changed: 34 additions & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
openapi: 3.0.2
22
info:
3-
version: 1.11.0
3+
version: 1.11.1
44
title: PodcastIndex.org API
55
termsOfService: 'https://github.com/Podcastindex-org/legal/blob/main/TermsOfService.md'
66
contact:
@@ -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

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"openapi": "3.0.2",
33
"info": {
4-
"version": "1.11.0",
4+
"version": "1.11.1",
55
"title": "PodcastIndex.org API",
66
"termsOfService": "https://github.com/Podcastindex-org/legal/blob/main/TermsOfService.md",
77
"contact": {
@@ -1519,6 +1519,51 @@
15191519
}
15201520
}
15211521
},
1522+
"/pubnotify": {
1523+
"get": {
1524+
"tags": [
1525+
"Hub"
1526+
],
1527+
"summary": "Pub Notify (Hub)",
1528+
"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",
1529+
"operationId": "pubnotify",
1530+
"security": [],
1531+
"servers": [
1532+
{
1533+
"url": "https://hub.podcastindex.org",
1534+
"description": "Server for handling feed publish/update notifications"
1535+
}
1536+
],
1537+
"parameters": [
1538+
{
1539+
"$ref": "#/components/parameters/id_feed_podcast_pi_pubnotify"
1540+
},
1541+
{
1542+
"$ref": "#/components/parameters/url_pubnotify"
1543+
},
1544+
{
1545+
"$ref": "#/components/parameters/reason"
1546+
},
1547+
{
1548+
"$ref": "#/components/parameters/podping"
1549+
},
1550+
{
1551+
"$ref": "#/components/parameters/pretty"
1552+
}
1553+
],
1554+
"responses": {
1555+
"200": {
1556+
"$ref": "#/components/responses/hub_pubnotify"
1557+
},
1558+
"400": {
1559+
"$ref": "#/components/responses/400"
1560+
},
1561+
"401": {
1562+
"$ref": "#/components/responses/401"
1563+
}
1564+
}
1565+
}
1566+
},
15221567
"/hub/pubnotify": {
15231568
"get": {
15241569
"tags": [
@@ -1535,6 +1580,9 @@
15351580
{
15361581
"$ref": "#/components/parameters/url_pubnotify"
15371582
},
1583+
{
1584+
"$ref": "#/components/parameters/reason_liveonly"
1585+
},
15381586
{
15391587
"$ref": "#/components/parameters/pretty"
15401588
}
@@ -2271,6 +2319,43 @@
22712319
},
22722320
"example": "https://feeds.theincomparable.com/batmanuniversity"
22732321
},
2322+
"reason": {
2323+
"name": "reason",
2324+
"in": "query",
2325+
"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",
2326+
"schema": {
2327+
"type": "string",
2328+
"enum": [
2329+
"",
2330+
"live",
2331+
"liveEnd"
2332+
]
2333+
},
2334+
"example": ""
2335+
},
2336+
"podping": {
2337+
"name": "podping",
2338+
"in": "query",
2339+
"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",
2340+
"schema": {
2341+
"type": "boolean"
2342+
},
2343+
"allowEmptyValue": true
2344+
},
2345+
"reason_liveonly": {
2346+
"name": "reason",
2347+
"in": "query",
2348+
"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",
2349+
"schema": {
2350+
"type": "string",
2351+
"enum": [
2352+
"",
2353+
"live",
2354+
"liveEnd"
2355+
]
2356+
},
2357+
"example": ""
2358+
},
22742359
"chash": {
22752360
"name": "chash",
22762361
"in": "query",

0 commit comments

Comments
 (0)