Podcastindex-org / docs-api

Developer documentation for the podcastindex.org api.
https://podcastindex-org.github.io/docs-api/
MIT License
52 stars 29 forks source link

Wrong schema description and example for /search/byperson #97

Closed pluto-dev closed 1 year ago

pluto-dev commented 1 year ago

What is expected according to the documentation:

{
    "id": 16795088,
    "title": "Batman University",
    "link": "https://www.theincomparable.com/batmanuniversity/",
    "description": "Batman University is back in session! James Thomson and Nathan Alderman join Tony for a discussion of Fox’s “Gotham.” Tune in to hear our thoughts on how a half-baked comic book show was reborn into an unmissable train wreck.",
    "guid": "incomparable/batman/19",
    "datePublished": 1546399813,
    "dateCrawled": 1598369047,
    "enclosureUrl": "https://www.theincomparable.com/podcast/batmanuniversity302.mp3",
    "enclosureType": "audio/mp3",
    "enclosureLength": 26385472,
    "duration": 54,
    "explicit": 0,
    "episode": 19,
    "episodeType": "full",
    "season": 3,
    "image": "https://www.theincomparable.com/imgs/logos/logo-batmanuniversity-3x.jpg?cache-buster=2019-06-11",
    "feedItunesId": 1441923632,
    "feedImage": "https://www.theincomparable.com/imgs/logos/logo-batmanuniversity-3x.jpg?cache-buster=2019-06-11",
    "feedId": 75075,
    "feedUrl": "https://feeds.theincomparable.com/batmanuniversity",
    "feedAuthor": "Tony Sindelar",
    "feedTitle": "Batman University",
    "feedLanguage": "en-us",
    "chaptersUrl": "https://studio.hypercatcher.com/chapters/podcast/http:feed.nashownotes.comrss.xml/episode/http:1322.noagendanotes.com",
    "transcripts": [{
            "url": "https://mp3s.nashownotes.com/NA-1385-Captions.srt",
            "type": "application/srt"
        }
    ]
}

What we actual get if we make a call to https://api.podcastindex.org/api/1.0/search/byperson?q=adam%20curry&pretty

{
    "id": 14672996829,
    "title": "91: Scott Free",
    "link": "http:\/\/adam.curry.com\/html\/MoeFactzwithAdamCurr-K30F1PpGnNCbKtmpjrbL2f35SgzjXS.html",
    "description": "<h2>Moe Factz with Adam Curry for April 5th 2023, Episode number 91 - \"Scott Free\"<\/h2>\n\n<p>Moe and Adam Break down the the question posed by the Rasmussen poll<\/p>\n<p>Download the mp3<\/p>\n<p>Chapter Architect: Dreb Scott<\/p>\n<p>Big Baller<\/p>\n<p>Miguel Espinala<\/p>\n<p>Executive Producers:<\/p>\n<p>Miguel Espinala<\/p>\n<p>brian burgess<\/p>\n<p>Tajvia Willis<\/p>\n<p>Timothy Kato<\/p>\n<p>Rochelle Stowe<\/p>\n<p>William Taylor<\/p>\n<p>Amy Mullin<\/p>\n<p>Kyle Mann<\/p>\n<p>Lucas Bedia<\/p>\n<p>Associate Executive Producers<\/p>\n<p>Anastasia Trekles<\/p>\n<p>Matt...",
    "guid": "MF91",
    "datePublished": 1680741994,
    "dateCrawled": 1680744497,
    "enclosureUrl": "https:\/\/op3.dev\/e\/mp3s.nashownotes.com\/MF-91-2023-04-05-Final.mp3",
    "enclosureType": "audio\/mpeg",
    "enclosureLength": 134641520,
    "duration": 11215,
    "explicit": 1,
    "episode": null,
    "episodeType": "full",
    "season": 0,
    "image": "https:\/\/noagendaassets.com\/enc\/1646515841.279_moefactzfeedimage.jpg",
    "feedItunesId": 1475652640,
    "feedImage": "https:\/\/noagendaassets.com\/enc\/1646515841.279_moefactzfeedimage.jpg",
    "feedId": 207356,
    "feedUrl": "http:\/\/feed.nashownotes.com\/mfrss.xml",
    "feedAuthor": "Adam Curry",
    "feedTitle": "Moe Factz with Adam Curry",
    "feedLanguage": "en",
    "chaptersUrl": "https:\/\/storage.googleapis.com\/com-hypercatcher-chapters\/http%3Afeed.nashownotes.commfrss.xml\/MF91",
    "transcriptUrl": "https:\/\/mp3s.nashownotes.com\/MF-91-Captions.srt"
}

To be specific, we expect an array for the transcript key

    "transcripts": [{
            "url": "https://mp3s.nashownotes.com/NA-1385-Captions.srt",
            "type": "application/srt"
        }
    ]

But we get an url

"transcriptUrl": "https:\/\/mp3s.nashownotes.com\/MF-91-Captions.srt"
daveajones commented 1 year ago

"transcriptUrl" is deprecated and only exists for backwards compatibility with apps that used that old functionality. "transcripts" is the new property and should be present. That's the bug. I'll fix it.

daveajones commented 1 year ago

This should be fixed now.