Skip to content

Commit 4d04a1d

Browse files
authored
Add new GUID endpoints (#109)
* Clarify the only support bytag is the value tag https://podcastindex.social/@hypercatcher/110800498311457973 * Add support for getting feed value data from guid https://podcastindex.social/@dave/110851275127076366 * Add support for getting episode value data from feed and episode guid https://podcastindex.social/@dave/110879169344223126 * Remove security for value endpoints * Add support for batch value endpoint https://podcastindex.social/@dave/110895277939377191 * Update version to 1.11.0 * Update to redocly cli 1.0.2 * Change server to use node http-server instead of python * Fix file case issue
1 parent f5c07ce commit 4d04a1d

File tree

278 files changed

+11907
-9782
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

278 files changed

+11907
-9782
lines changed

.redocly.yaml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
# See https://redoc.ly/docs/cli/configuration/ for more information.
2-
apiDefinitions:
3-
main: ./api_src/root.yaml
4-
lint:
5-
extends:
6-
- recommended
7-
rules:
8-
no-unused-components: warning
9-
referenceDocs:
10-
htmlTemplate: ./docs/template.html
11-
hideDownloadButton: true
12-
expandDefaultServerVariables : all # nice for debugging
13-
expandResponses: all # nice for debugging
14-
expandSingleSchemaField: all # nice for debugging
15-
jsonSampleExpandLevel: all # nice for debugging
16-
hideSchemaTitles: true
17-
requiredPropsFirst: true
18-
theme:
19-
spacing:
20-
sectionVertical: 10
21-
colors:
22-
primary:
23-
main: "#e90000"
24-
# Additional configuration options: https://github.com/Redocly/redoc
2+
extends:
3+
- recommended
4+
5+
apis:
6+
core@v2:
7+
root: ./api_src/root.yaml
8+
rules:
9+
no-unused-components: warn
10+
11+
theme:
12+
openapi:
13+
htmlTemplate: ./docs/template.html
14+
hideDownloadButton: true
15+
expandDefaultServerVariables : true # nice for debugging
16+
expandResponses: all # nice for debugging
17+
expandSingleSchemaField: true # nice for debugging
18+
jsonSampleExpandLevel: all # nice for debugging
19+
hideSchemaTitles: true
20+
requiredPropsFirst: true
21+
theme:
22+
spacing:
23+
sectionVertical: 10
24+
colors:
25+
primary:
26+
main: "#e90000"

Postman Docs/PodcastIndex.postman_collection.json

Lines changed: 110 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@
418418
}
419419
]
420420
},
421-
"description": "This call returns all feeds that support the specified\n[podcast namespace](https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md) tag.\n\n\nWhen called without a `start_at` value, the top 500 feeds sorted by popularity are returned in descending order.\n\n\nWhen called with a `start_at` value, the feeds are returned sorted by the `feedId` starting with the specified value\nup to the max number of feeds to return. The `nextStartAt` specifies the value to pass to the next `start_at`.\nRepeat this sequence until no items are returned.\n\n\nExamples:\n - https://api.podcastindex.org/api/1.0/podcasts/bytag?podcast-value&max=200&pretty\n - https://api.podcastindex.org/api/1.0/podcasts/bytag?podcast-value&max=200&start_at=1&pretty"
421+
"description": "This call returns all feeds that support the specified\n[podcast namespace](https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md) tag.\n\nThe only supported tag is `podcast:value` using the `podcast-value` parameter.\n\nWhen called without a `start_at` value, the top 500 feeds sorted by popularity are returned in descending order.\n\n\nWhen called with a `start_at` value, the feeds are returned sorted by the `feedId` starting with the specified value\nup to the max number of feeds to return. The `nextStartAt` specifies the value to pass to the next `start_at`.\nRepeat this sequence until no items are returned.\n\n\nExamples:\n - https://api.podcastindex.org/api/1.0/podcasts/bytag?podcast-value&max=200&pretty\n - https://api.podcastindex.org/api/1.0/podcasts/bytag?podcast-value&max=200&start_at=1&pretty"
422422
},
423423
"response": []
424424
},
@@ -1246,7 +1246,7 @@
12461246
}
12471247
]
12481248
},
1249-
"description": "This call returns the information for supporting the podcast via one of the \"Value for Value\" methods from the PodcastIndex ID.\nAdditionally, the value block data can be accessed using static JSON files (updated every 15 minutes).\n - Feeds: https://tracking.podcastindex.org/feedValueBlocks.json\n - Episodes: https://tracking.podcastindex.org/episodeValueBlocks.json\n\nExamples:\n\n - https://api.podcastindex.org/api/1.0/value/byfeedid?id=920666&pretty\n - https://api.podcastindex.org/api/1.0/value/byfeedid?id=779873&pretty\n"
1249+
"description": "This call returns the information for supporting the podcast via one of the \"Value for Value\" methods from the PodcastIndex ID.\nAdditionally, the value block data can be accessed using static JSON files (updated every 15 minutes).\n - Feeds: https://tracking.podcastindex.org/feedValueBlocks.json\n - Episodes: https://tracking.podcastindex.org/episodeValueBlocks.json\n\nNote: No API key needed for this endpoint.\n\nExamples:\n\n - https://api.podcastindex.org/api/1.0/value/byfeedid?id=920666&pretty\n - https://api.podcastindex.org/api/1.0/value/byfeedid?id=779873&pretty\n"
12501250
},
12511251
"response": []
12521252
},
@@ -1278,7 +1278,113 @@
12781278
}
12791279
]
12801280
},
1281-
"description": "This call returns the information for supporting the podcast via one of the \"Value for Value\" methods from feed URL.\n\nAdditionally, the value block data can be accessed using static JSON files (updated every 15 minutes).\n - Feeds: https://tracking.podcastindex.org/feedValueBlocks.json\n - Episodes: https://tracking.podcastindex.org/episodeValueBlocks.json\n\nExamples:\n\n - https://api.podcastindex.org/api/1.0/value/byfeedurl?url=https://mp3s.nashownotes.com/pc20rss.xml&pretty\n - https://api.podcastindex.org/api/1.0/value/byfeedurl?url=https://lespoesiesdheloise.fr/@heloise/feed.xml&pretty\n"
1281+
"description": "This call returns the information for supporting the podcast via one of the \"Value for Value\" methods from feed URL.\n\nAdditionally, the value block data can be accessed using static JSON files (updated every 15 minutes).\n - Feeds: https://tracking.podcastindex.org/feedValueBlocks.json\n - Episodes: https://tracking.podcastindex.org/episodeValueBlocks.json\n\nNote: No API key needed for this endpoint.\n\nExamples:\n\n - https://api.podcastindex.org/api/1.0/value/byfeedurl?url=https://mp3s.nashownotes.com/pc20rss.xml&pretty\n - https://api.podcastindex.org/api/1.0/value/byfeedurl?url=https://lespoesiesdheloise.fr/@heloise/feed.xml&pretty\n"
1282+
},
1283+
"response": []
1284+
},
1285+
{
1286+
"name": "By Feed GUID",
1287+
"request": {
1288+
"method": "GET",
1289+
"header": [],
1290+
"url": {
1291+
"raw": "{{baseUrl}}/value/bypodcastguid?guid=917393e3-1b1e-5cef-ace4-edaa54e1f810",
1292+
"host": [
1293+
"{{baseUrl}}"
1294+
],
1295+
"path": [
1296+
"value",
1297+
"bypodcastguid"
1298+
],
1299+
"query": [
1300+
{
1301+
"key": "guid",
1302+
"value": "917393e3-1b1e-5cef-ace4-edaa54e1f810",
1303+
"description": "(Required) The GUID from the `podcast:guid` tag in the feed. This value is a unique, global identifier for the podcast.\n\nSee the namespace spec for\n[guid](https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#guid) for details.\n"
1304+
},
1305+
{
1306+
"key": "pretty",
1307+
"value": "",
1308+
"description": "If present, makes the output “pretty” to help with debugging.\n\nParameter shall not have a value\n",
1309+
"disabled": true
1310+
}
1311+
]
1312+
},
1313+
"description": "This call returns the information for supporting the podcast via one of the \"Value for Value\" methods from podcast GUID.\n\nNote: No API key needed for this endpoint.\n\nExample: https://api.podcastindex.org/api/1.0/value/bypodcastguid?guid=917393e3-1b1e-5cef-ace4-edaa54e1f810&pretty\n"
1314+
},
1315+
"response": []
1316+
},
1317+
{
1318+
"name": "By Episode GUID",
1319+
"request": {
1320+
"method": "GET",
1321+
"header": [],
1322+
"url": {
1323+
"raw": "{{baseUrl}}/value/byepisodeguid?podcastguid=917393e3-1b1e-5cef-ace4-edaa54e1f810&episodeguid=PC20143",
1324+
"host": [
1325+
"{{baseUrl}}"
1326+
],
1327+
"path": [
1328+
"value",
1329+
"byepisodeguid"
1330+
],
1331+
"query": [
1332+
{
1333+
"key": "podcastguid",
1334+
"value": "917393e3-1b1e-5cef-ace4-edaa54e1f810",
1335+
"description": "(Required) The GUID from the `podcast:guid` tag in the feed. This value is a unique, global identifier for the podcast.\n\nSee the namespace spec for\n[guid](https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#guid) for details."
1336+
},
1337+
{
1338+
"key": "episodeguid",
1339+
"value": "PC20143",
1340+
"description": "(Required) The guid specified by the `<guid>` in the episode `<item>`."
1341+
},
1342+
{
1343+
"key": "pretty",
1344+
"value": "",
1345+
"description": "If present, makes the output “pretty” to help with debugging.\n\nParameter shall not have a value\n",
1346+
"disabled": true
1347+
}
1348+
]
1349+
},
1350+
"description": "This call returns the information for supporting the podcast episode via one of the \"Value for Value\" methods from\npodcast GUID and the episode GUID.\n\nThe `podcastguid` is the GUID from the `podcast:guid` tag in the feed. This value is a unique, global identifier\nfor the podcast. See the namespace spec for\n[guid](https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#guid) for details.\n\nThe `episodeguid` is the unique guid specified for the `<item>` in the feed but may not be globally unique.\n\nNote: No API key needed for this endpoint.\n\nExamples:\n - https://api.podcastindex.org/api/1.0/value/byepisodeguid?podcastguid=917393e3-1b1e-5cef-ace4-edaa54e1f810&episodeguid=PC20143&pretty\n - https://api.podcastindex.org/api/1.0/value/byepisodeguid?podcastguid=c73b1a23-1c28-5edb-94c3-10d1745d0877&episodeguid=bdea6759-a7b6-4c0d-9d1e-acca3133f4a9&pretty\n"
1351+
},
1352+
"response": []
1353+
},
1354+
{
1355+
"name": "Batch By Episode GUID",
1356+
"request": {
1357+
"method": "POST",
1358+
"header": [],
1359+
"body": {
1360+
"mode": "raw",
1361+
"raw": "{\r\n \"917393e3-1b1e-5cef-ace4-edaa54e1f810\": [\r\n \"PC20141\",\r\n \"PC20142\",\r\n \"PC20143\"\r\n ],\r\n \"c73b1a23-1c28-5edb-94c3-10d1745d0877\": [\r\n \"bdea6759-a7b6-4c0d-9d1e-acca3133f4a9\"\r\n ]\r\n}",
1362+
"options": {
1363+
"raw": {
1364+
"language": "json"
1365+
}
1366+
}
1367+
},
1368+
"url": {
1369+
"raw": "{{baseUrl}}/value/batch/byepisodeguid",
1370+
"host": [
1371+
"{{baseUrl}}"
1372+
],
1373+
"path": [
1374+
"value",
1375+
"batch",
1376+
"byepisodeguid"
1377+
],
1378+
"query": [
1379+
{
1380+
"key": "pretty",
1381+
"value": "",
1382+
"description": "If present, makes the output “pretty” to help with debugging.\n\nParameter shall not have a value\n",
1383+
"disabled": true
1384+
}
1385+
]
1386+
},
1387+
"description": "This call returns the information for supporting the podcast episode via one of the \"Value for Value\" methods from\na JSON object containing one or more podcast GUID and one or more episode GUID for the podcast.\n\nThe JSON object key shall be the `podcastguid` from the `podcast:guid` tag in the feed.\nThis value is a unique, global identifier for the podcast. See the namespace spec for\n[guid](https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#guid) for details.\n\nThe value of the `podcastguid` shall be an array of `episodeguid` values.\nThis is the unique guid specified for the `<item>` in the feed but may not be globally unique.\n\nNote: No API key needed for this endpoint."
12821388
},
12831389
"response": []
12841390
}
@@ -1386,7 +1492,7 @@
13861492
}
13871493
]
13881494
},
1389-
"description": "Notify the index that a feed has changed\n\nExamples:\n\n - https://api.podcastindex.org/api/1.0/hub/pubnotify?id=920666&pretty\n - https://api.podcastindex.org/api/1.0/hub/pubnotify?id=920666&update&pretty\n"
1495+
"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"
13901496
},
13911497
"response": []
13921498
}

README.md

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ See the live docs at https://podcastindex-org.github.io/docs-api/
44

55
# Introduction
66

7-
This project contains the files for describing the PodcastIndex.org API using the
7+
This project contains the files for describing the PodcastIndex.org API using the
88
[openapi](https://www.openapis.org/) syntax.
99

10-
The `redocly/openapi-cli` Node package is used to compile the separate files in to a single master file.
11-
This master file can be used in many [tools](https://openapi.tools/).
10+
The `redocly/cli` Node package is used to compile the separate files in to a single master file.
11+
This master file can be used in many [tools](https://openapi.tools/).
1212

1313
The [RapiDoc](https://mrin9.github.io/RapiDoc/) software is used to generate the document webpage.
1414

@@ -24,7 +24,7 @@ In the project directory, you can run:
2424

2525
## `yarn preview`
2626

27-
Starts the redoc preview server.
27+
Starts the redoc preview server.
2828
Open [http://localhost:8080](http://localhost:8080) to view it in the browser.
2929

3030
## `yarn build`
@@ -35,7 +35,7 @@ Runs `bundle_json`, `bundle_yaml`
3535

3636
Generates the master openapi file `pi_api.json` in the `docs` folder.
3737

38-
The `pi_api.json` and `pi_api.yaml` contain the same content just shown in different formats.
38+
The `pi_api.json` and `pi_api.yaml` contain the same content just shown in different formats.
3939

4040
## `yarn bundle_yaml`
4141

@@ -49,25 +49,24 @@ Run the redoc linter on the source yaml files.
4949

5050
## `yarn reload`
5151

52-
Starts a LiveReload file watcher.
52+
Starts a LiveReload file watcher.
5353

5454
Install a compatible [browser extension](http://livereload.com/) and connect it to the livereload instance.
5555

56-
Pages connected to the file watcher will reload 2 seconds after the file changes. The 2 second delay gives the
56+
Pages connected to the file watcher will reload 2 seconds after the file changes. The 2 second delay gives the
5757
openapi preview script time to generate the new api files.
5858

5959
## `yarn server`
6060

61-
Create a simple server in the `docs` folder to serve the release files.
62-
61+
Create a simple server in the `docs` folder to serve the release files.
6362

6463
# Folder Structure
6564

6665
## `api_src`
6766

6867
This folder contains the source yaml files for describing the API. The root file is `root.yaml`.
6968

70-
See the [openapi Specification](https://www.openapis.org/) for details on the format. Additional specification details
69+
See the [openapi Specification](https://www.openapis.org/) for details on the format. Additional specification details
7170
from [Swagger](https://swagger.io/specification/) and
7271
[OpenAPI GitHub](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/).
7372

@@ -84,24 +83,24 @@ See additional suggestions for the structure from redoc in the
8483

8584
### `components`
8685

87-
In general, a folder exists for each object type in the API yaml document. A block that is used in many files should
86+
In general, a folder exists for each object type in the API yaml document. A block that is used in many files should
8887
have a separate yaml file created and be referenced from the files where it is used.
8988

90-
- `callbacks` - reusable [Callback Objects](http://spec.openapis.org/oas/v3.1.0#callback-object)
91-
- `examples` - reusable [Example Objects](http://spec.openapis.org/oas/v3.1.0#example-object)
92-
- `headers` - reusable [Header Objects](http://spec.openapis.org/oas/v3.1.0#header-object)
93-
- `links` - reusable [Link Objects](http://spec.openapis.org/oas/v3.1.0#link-object)
94-
- `parameters` - reusable [Parameter Objects](http://spec.openapis.org/oas/v3.1.0#parameter-object)
95-
- `requestBodies` - reusable [Request Body Objects](http://spec.openapis.org/oas/v3.1.0#request-body-object)
96-
- `responses` - reusable [Response Objects](http://spec.openapis.org/oas/v3.1.0#responses-object)
97-
- `schemas` - reusable [Schema Objects](http://spec.openapis.org/oas/v3.1.0#schema-object)
98-
- `securitySchemes` - reusable [Security Scheme Objects](http://spec.openapis.org/oas/v3.1.0#security-scheme-object)
89+
- `callbacks` - reusable [Callback Objects](http://spec.openapis.org/oas/v3.1.0#callback-object)
90+
- `examples` - reusable [Example Objects](http://spec.openapis.org/oas/v3.1.0#example-object)
91+
- `headers` - reusable [Header Objects](http://spec.openapis.org/oas/v3.1.0#header-object)
92+
- `links` - reusable [Link Objects](http://spec.openapis.org/oas/v3.1.0#link-object)
93+
- `parameters` - reusable [Parameter Objects](http://spec.openapis.org/oas/v3.1.0#parameter-object)
94+
- `requestBodies` - reusable [Request Body Objects](http://spec.openapis.org/oas/v3.1.0#request-body-object)
95+
- `responses` - reusable [Response Objects](http://spec.openapis.org/oas/v3.1.0#responses-object)
96+
- `schemas` - reusable [Schema Objects](http://spec.openapis.org/oas/v3.1.0#schema-object)
97+
- `securitySchemes` - reusable [Security Scheme Objects](http://spec.openapis.org/oas/v3.1.0#security-scheme-object)
9998

10099
## `docs`
101100

102101
Source directory for site source files. This folder should be deployed to the server.
103102

104-
The master api files and images are in the root directory.
103+
The master api files and images are in the root directory.
105104
The root `index.html` uses the [RapiDoc](https://mrin9.github.io/RapiDoc/) UI.
106105

107106
The `template.html` file is the necessary template file for the [redoc](https://redoc.ly/redoc/) preview generated with

api_src/components/parameters/aponly.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: aponly
22
in: query
33
# language=Markdown
4-
description: >
4+
description: |
55
Only returns feeds with an `itunesId`.
66
schema:
77
type: boolean

api_src/components/parameters/before.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: before
22
in: query
33
# language=Markdown
4-
description: >
4+
description: |
55
If you pass a PodcastIndex Episode ID, you will get recent episodes before that ID, allowing you to walk back
66
through the episode history sequentially.
77
schema:

api_src/components/parameters/cat.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: cat
22
in: query
33
# language=Markdown
4-
description: >
4+
description: |
55
Use this argument to specify that you **ONLY** want episodes with these categories in the results.
66
77

api_src/components/parameters/chash.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: chash
22
in: query
33
# language=Markdown
4-
description: >
4+
description: |
55
The md5 hash of the following feed items in hex format.
66
If known, allows for easier duplicate checking.
77

api_src/components/parameters/clean.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: clean
22
in: query
33
# language=Markdown
4-
description: >
4+
description: |
55
If present, only non-explicit feeds will be returned.
66
Meaning, feeds where the `itunes:explicit` flag is set to `false`.
77

api_src/components/parameters/desc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: desc
22
in: query
33
# language=Markdown
4-
description: >
4+
description: |
55
If present, display feeds in descending order.
66
77

api_src/components/parameters/enclosure.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: enclosure
22
in: query
33
# language=Markdown
4-
description: >
4+
description: |
55
The URL for the episode enclosure to get the information for.
66
required: false
77
schema:

0 commit comments

Comments
 (0)