As already written on Github:
how to query ALL videos on a PeerTube instance?
I got told that the API clearly states to involve the « include » parameter.
Well, has anybody a working example for me?
thx
As already written on Github:
how to query ALL videos on a PeerTube instance?
I got told that the API clearly states to involve the « include » parameter.
Well, has anybody a working example for me?
thx
https://docs.joinpeertube.org/api-rest-reference.html#tag/Video/operation/getVideos
If you are not used to using this API, you should also read:
Ah yeah, this is the perfect example of saying NOTHING.
I DID read this.
I also tried this, because i am after 20+ years with Linux somehow familiar with cURL (Github issue 6910 simply got closed, but as you can see, i already did not query publicly, i also did it with an admin token, etc…).
I also contacted several other developer colleagues, which also f*cked up (not able to get output at all).
So, please, instead of sending links which i already know (and still give 0 output), please could you give a WORKING example (as i requested initially)?
If no, please do not answer anymore.
Thanks.
You are talking about github, but without giving any context.
You don’t neither give any context about yourserlf.
I don’t know who you are, i don’t know if you are a dev or not. I don’t know your skills.
Especially, i don’t know if you know how to read an OPENAPI documentation.
So, as i am responding ON MY FREE TIME, i start by assuming you are a dev who knows how to read a documentation. So i start by just giving the links to them, in case you did not find it.
If this is not enough, i can respond to other questions.
But you don’t even tell what is the error when you try to use this API. I can’t read in your mind. And i can’t give you 1 hour OF MY FREE TIME, juste because you are not explicit about your question.
And if you want a working example… Just go to /admin/overview/videos/list?search=isLocal%3Atrue
on your instance, and check your browser network console to get the API call.
Gives me a 404.
All i am asking is a WORKING API example how to get ALL videos from an PeerTube instance.
No references to the API documentation, because i have read it.
And i do understand how an API works.
What i do NOT understand is, how PeerTube wants an API call, because the obvious documented way gives me 0 as output, which is kinda strange.
Also tried this now with SEVERAL other instances, again 0.
So EITHER this is a bug (then i want an apology from Chocobozzz for just not caring about Github), or i want to get shown how PeerTube wants it done, because then i can also tell all my friends and colleagues how to use cURL properly in the future.
And no, i did not ask you for your free time.
I asked a specific question and got AGAIN no answer (like on Github).
This makes me feel uncomfortable.
I have NO problem being called dumb or incompetent.
But when asking ONE specific question and again and again getting NO answers… how can people get smarter?
are you logged in as an admin?
Y E S.
If your Peertube version is < 7.0.0, the url is /admin/videos/list?search=isLocal%3Atrue
.
Yes, and THANKFULLY TO YOU i am now able to see how sh*tty the API is documented.
(the tip with the browser console showed me A LOT)
THANK YOU!
You edited your message after my response, and i did not see this.
Well, maybe if YOU share your non-working code, we can find the error?
Anyway, you are very rude, so this is my last answer. Good luck champ’.
@lonesomewalker Please keep discussions civil and respectful. That’s not a proper way to ask for help or treat people who took time to help you.
If you have noticed any problems or gaps in our documentation that you can specifically identify, please let us know and help us improve it.
@tcit
I asked a simple question.
« please give me a proper working example ».
I already mentioned API, so everybody can see that i was aware of this.
What do i get?
Another RTFM.
Which is also NOT polite/respectful (and therefore wasting also MY lifetime).
Yes, PeerTube is free.
But still: if you want to attract more professional developers, either fix the documentation (which is clearly broken) or expect some more forum threads.
Other open source projects are also able to keep up in this task and therefore attracting more professionals which then in return also give their free time to solve others problems.
And as i already wrote: i already asked on Github, because i thought it is a bug (which it is), but got told: read the fucking manual.
Which i did.
And was still not able to get my problem solved.
So, what do you suggest?
Ask again how to solve my problem to get again told: hey, read documentation?
And i already gave an example on Github, just to find out: RTFM.
Yeah, nice project.
We still don’t know what was missing…
You did not share the error you were facing…
If you are interested:
Github issue 6912
It is always nice to blame others, but when finding out that something was missing it would be a sign of greatness to admit that.
If somebody is stumbling over it:
a single query for all videos can’t be done by the query parameter « include », it needs more. But it is nowhere written which ones are mandatory.
It’s not a question of blaming someone or not. The point is that your question lacked context for us to understand it. Among other things, I don’t read all the github issues. At least recognize that just with your first post, without context, it was complicated to understand your question.
At no point did we claim that the documentation was perfect. And we’re all in favor of improving it. But we need to be able to understand each other before we resort to insults.
There are a lot of people here, with various profiles. Some are devs, other are not. Reading your first message, I can’t guess what are your skills. That’s why I started by just providing links to documentation. And as you can see, at no point i stopped trying to help you. Despite yours insults.
Do you find which other parameter is mandatory to get a result (so that we can make the documentation clearer). Would it be privacyOneOf
?
For the record, I made some tests.
Seems there is no mandatory parameters. I have results even without any parameter:
I can even omit the include
parameter
According to your previous messages, i guess are using an old Peertube version.
I did my test on Peertube v7.
Maybe the limitation you are facing is on Peertube <=7.
Yeah, ChocoBozzz already corrected that with another commit.
And yes, this is working for regular videos, not hidden ones
And i never said that you are a bad person, you were just not helpfull by pasting the link to the API (because i already got this advice on Github, very helpfull when it is not working…)
Just try it yourself:
make a demo, upload only non-published videos.
With the include parameter you still get 0 as output, even when authenticated.
Only when you add « privacyOneOf » (and adding this multiple times for 1-5) then there is output, but it is nowhere statet that this is mandatory in the current version.
And then it is crazy when somebody writes: it is working, RTFM.
Ah, you missed the parameter « include », and RTFM.
Therefore i just asked for a working example.
If you would have written: /api/v1/videos
Then i would have answered you: i get {« total »:0,« data »:}
Then we would have come up to the conclusion, that only adding ?include=1(or any number to 63) will still give you {« total »:0,« data »:}
Or maybe you are on an instance without any public videos? Only with private and internal videos?
In such case, yes, there are some filters to add. By default, i think only public videos are listed.
If you are in this use case, that is probably the missing part in the documentation: just say that by default only public videos are listed, and that we should add the include
parameter to get other video types.
(and still, i can’t find any other required parameter…)
ok, cross post.
That was the missing information!
You did not say it on this forum. This changes everything.
The fact you keep saying that there was 0 result, i thought there was an error somewhere.