Skip to content

Commit 0996d9b

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

File tree

10 files changed

+306
-4
lines changed

10 files changed

+306
-4
lines changed

Diff for: Postman Docs/PodcastIndex.postman_collection.json

+63
Original file line numberDiff line numberDiff line change
@@ -1472,6 +1472,59 @@
14721472
{
14731473
"name": "hub",
14741474
"item": [
1475+
{
1476+
"name": "Pub Notify (Hub)",
1477+
"request": {
1478+
"auth": {
1479+
"type": "noauth"
1480+
},
1481+
"method": "GET",
1482+
"header": [],
1483+
"url": {
1484+
"raw": "{{baseHubUrl}}/pubnotify",
1485+
"host": [
1486+
"{{baseHubUrl}}"
1487+
],
1488+
"path": [
1489+
"pubnotify"
1490+
],
1491+
"query": [
1492+
{
1493+
"key": "id",
1494+
"value": "75075",
1495+
"description": "The PodcastIndex Feed ID\n\nThe `id` or the `url` is required.",
1496+
"disabled": true
1497+
},
1498+
{
1499+
"key": "url",
1500+
"value": "https://feeds.theincomparable.com/batmanuniversity",
1501+
"description": "The Podcast Feed URL\n\nThe `id` or the `url` is required.",
1502+
"disabled": true
1503+
},
1504+
{
1505+
"key": "reason",
1506+
"value": "",
1507+
"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",
1508+
"disabled": true
1509+
},
1510+
{
1511+
"key": "podping",
1512+
"value": "",
1513+
"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",
1514+
"disabled": true
1515+
},
1516+
{
1517+
"key": "pretty",
1518+
"value": "",
1519+
"description": "If present, makes the output “pretty” to help with debugging.\n\nParameter shall not have a value\n",
1520+
"disabled": true
1521+
}
1522+
]
1523+
},
1524+
"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"
1525+
},
1526+
"response": []
1527+
},
14751528
{
14761529
"name": "Pub Notify",
14771530
"request": {
@@ -1502,6 +1555,12 @@
15021555
"description": "The Podcast Feed URL\n\nThe `id` or the `url` is required.",
15031556
"disabled": true
15041557
},
1558+
{
1559+
"key": "reason",
1560+
"value": "",
1561+
"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",
1562+
"disabled": true
1563+
},
15051564
{
15061565
"key": "pretty",
15071566
"value": "",
@@ -1795,6 +1854,10 @@
17951854
{
17961855
"key": "baseAppleUrl",
17971856
"value": "https://api.podcastindex.org/"
1857+
},
1858+
{
1859+
"key": "baseHubUrl",
1860+
"value": "https://hub.podcastindex.org/"
17981861
}
17991862
]
18001863
}

Diff for: api_src/components/parameters/podping.yaml

+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

Diff for: api_src/components/parameters/reason.yaml

+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: ""

Diff for: api_src/components/parameters/reason_liveonly.yaml

+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, 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: ""

Diff for: 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'

Diff for: 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':

Diff for: api_src/root.yaml

+3-1
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':

Diff for: docs/pi_api.json

+86-1
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": {
@@ -1516,6 +1516,51 @@
15161516
}
15171517
}
15181518
},
1519+
"/pubnotify": {
1520+
"get": {
1521+
"tags": [
1522+
"Hub"
1523+
],
1524+
"summary": "Pub Notify (Hub)",
1525+
"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",
1526+
"operationId": "pubnotify",
1527+
"security": [],
1528+
"servers": [
1529+
{
1530+
"url": "https://hub.podcastindex.org",
1531+
"description": "Server for handling feed publish/update notifications"
1532+
}
1533+
],
1534+
"parameters": [
1535+
{
1536+
"$ref": "#/components/parameters/id_feed_podcast_pi_pubnotify"
1537+
},
1538+
{
1539+
"$ref": "#/components/parameters/url_pubnotify"
1540+
},
1541+
{
1542+
"$ref": "#/components/parameters/reason"
1543+
},
1544+
{
1545+
"$ref": "#/components/parameters/podping"
1546+
},
1547+
{
1548+
"$ref": "#/components/parameters/pretty"
1549+
}
1550+
],
1551+
"responses": {
1552+
"200": {
1553+
"$ref": "#/components/responses/hub_pubnotify"
1554+
},
1555+
"400": {
1556+
"$ref": "#/components/responses/400"
1557+
},
1558+
"401": {
1559+
"$ref": "#/components/responses/401"
1560+
}
1561+
}
1562+
}
1563+
},
15191564
"/hub/pubnotify": {
15201565
"get": {
15211566
"tags": [
@@ -1532,6 +1577,9 @@
15321577
{
15331578
"$ref": "#/components/parameters/url_pubnotify"
15341579
},
1580+
{
1581+
"$ref": "#/components/parameters/reason_liveonly"
1582+
},
15351583
{
15361584
"$ref": "#/components/parameters/pretty"
15371585
}
@@ -2259,6 +2307,43 @@
22592307
},
22602308
"example": "https://feeds.theincomparable.com/batmanuniversity"
22612309
},
2310+
"reason": {
2311+
"name": "reason",
2312+
"in": "query",
2313+
"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",
2314+
"schema": {
2315+
"type": "string",
2316+
"enum": [
2317+
"",
2318+
"live",
2319+
"liveEnd"
2320+
]
2321+
},
2322+
"example": ""
2323+
},
2324+
"podping": {
2325+
"name": "podping",
2326+
"in": "query",
2327+
"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",
2328+
"schema": {
2329+
"type": "boolean"
2330+
},
2331+
"allowEmptyValue": true
2332+
},
2333+
"reason_liveonly": {
2334+
"name": "reason",
2335+
"in": "query",
2336+
"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",
2337+
"schema": {
2338+
"type": "string",
2339+
"enum": [
2340+
"",
2341+
"live",
2342+
"liveEnd"
2343+
]
2344+
},
2345+
"example": ""
2346+
},
22622347
"chash": {
22632348
"name": "chash",
22642349
"in": "query",

0 commit comments

Comments
 (0)