LukeHagar / plex-api-spec

An open source Plex Media Server API Specification
MIT License
27 stars 8 forks source link

Updating type search for getContent #9

Closed johnhebron closed 5 months ago

johnhebron commented 5 months ago

Playing around with /library/sections/:sectionId and in the returned Directory it shows the different type searches. I've updated the client to accept all four that I'm aware of.

Response Directory:

{
    "prompt": "Search for Shows",
    "search": true,
    "key": "search?type=2",
    "title": "Search Shows..."
},
{
    "prompt": "Search for Episodes",
    "search": true,
    "key": "search?type=4",
    "title": "Search Episodes..."
}
LukeHagar commented 5 months ago

Hey John!

Great catch!

With this new data found search should probably be broken out into its own endpoint, and the type should be a query parameter.

If you want to take a stab at it you can refer to the similar section/refresh endpoint.

Or I can take a crack at it later tonight.

Cheers 🎉

johnhebron commented 5 months ago

@LukeHagar I took a first stab and created pms/paths/library-content-search.yaml.

I copied the query content from the pms/paths/library-content.yaml file since it seems they use all the same filters, which are all optional.

I'm still learning the API, so i'm not 100% on this stuff, so please 👀 for me, if you can.

Thank you!