Open MrFly72 opened 3 years ago
https://gist.github.com/bagbag/a2888478d27de0e989cf777f81fb33de
I believe #3 was not clearly stated. What I mean is eg: Title=Ein Fall für zwei Title=Der Staatsanwalt Title=Die Chefin
All in one query. I believe that currently the two query you mean in the request do extend each other and will be combined with "and". I was thinking about an "or"
It's an AND for different fields, but an or for different fields.
following will work (here is an working example: https://s3.mediathekviewweb.de/public/or-query.html)
[
{
"fields": [
"title"
],
"query": "Ein Fall für zwei"
},
{
"fields": [
"title"
],
"query": "Der Staatsanwalt"
},
{
"fields": [
"title"
],
"query": "Die Chefin"
}
]
Ok, but I think I was looking more for a way to submit more than one full query (my example was maybe misleading). So basically an array of full queries, which can contain any combination of title, topic, channel and which will then be merged into one output. As said, I am fine at the moment, I am doing a couple of queries after each other and join them myself in powershell.
It's an AND for different fields, but an or for different fields.
following will work (here is an working example: https://s3.mediathekviewweb.de/public/or-query.html)
One question, is there a main page for these documentations about the api? I was sending my requests so far without making fields an array. so basically only sometimes sending fields : "topic" and a query. The example above only works if fields is an array. single "topic" does not work. So i wonder, does the API always expect an array and I should cast a single value to an array for all entries?
@bagbag Any chance for an additional query option like date_from? Would be great to limit by date, as currently I can only download xx entries, then check for date and only use the ones inside the date range. Would be best To filter it in the request directly
@MrFly72 yes, it wants an array. You can create a Pull request for a date filter if you want.
Hi,
the rest API is really cool! Thank you for that. During my development of a script in powershell, I figured thatsome additional API Functions would be great:
anyhow my powershell script makes heavy usage of the API and works great. It reads the entries from the Mediathek, has some configuration settings around it (eg. Destination folder, rename scheme and autorename options). It will present the user with a currently very simple output screen (out-gridview with passthru) and will then start the downloads on the Synology, wait for the jobs to finish and then rename them to the pattern given (something like [date][topic][title].mp4 or similar, depends on the airing.