As I remember, it is possible to reset subscription.contentDetails.newItemCount to 0 but now I can't find a way. Does anyone know how to do that? Thanks.
This is only readable JSON, you can't modify the values
Related
I currently use something like https://www.googleapis.com/youtube/v3/search?part=id&order=date&channelId=CHANNELID&maxResults=1&type=video&key=KEY and I want to be able to retrieve only the latest video and to totally exclude shorts.
How can I achieve this? 🤔
The Youtube search method
Will allow you to search for things like keyword, location, events, your own videos and related videos.
There is no way to filter or limit videos returned. Your only hope would be to sort them out locally when you get the results.
You may want to add a feature request here there is this one but it's really old Search API: More flexible/logical videoDuration requests
(sorry its my 1st time answering at stackoverflow, so might not be descriptive)
if you you use youtube serch method
then you'll realise that shorts description are assigned as empty string "" where as the videos have some description . so with an if condition like below can slove your problem (js)
if(!(video.snippet.description == ""))
I hope this isn't too basic, but I have two Raspberry Pi's. On Pi#1, I have an object like this:
{ "payload":"on", "bri":100 }
But when I send this to Pi#2, the "bri" gets stripped off because MQTT only sends the payload value. I'm certain there's something obvious that has escaped me, but a few hours of searching and experimenting hasn't gotten me any further. How do I get both the payload of "on" and the brightness of 100 into a single payload so that MQTT will send both?
(Then I have to figure out how to retrieve the data for the light that's being controlled).
If anyone can help, I would truly appreciate it.
Yes, node-red on both Pi's.
In my search for a solution, I stumbled across a node called msgpack that has some promise.
But, my solution was to just send the bri value and on the receiving end, if the payload is zero, then the light is off. If it's >0 then the light is on.
(I know this is breaking the rules, but thank you)
I tried to get youtube search from this link
https://www.googleapis.com/youtube/v3/search?part=snippet&key={my_api_key}&q=plane
it's work good. But i want to know how can i get result morethan 5 ?
ref : https://developers.google.com/youtube/v3/docs/search/list
Just in case anyone needs a solution for this.
You just need to add &maxResults=50 (to get a maximum of 50 results of course) at the end of the link / API call.
The person who asked the question was using &max-results... and not &maxResults... which is why it did not work.
The only thing you need to set here is maxResults. Now, if you're still getting 5, the problem maybe that there's really no other videos to list or your search filter is wrong.
The nextPageToken solution do not apply if you have maxResult set to 50 but are only getting 5. The problem could be your filter or the number of videos available.
Hello I have a strange problem(I am new in php and zend).
When trying to upload an image with twitter api, I am getting media_id like 5.5244895286041E+17.
Can somebody tell me why is this happening and how to fix it?
Thanks.
cast a (string) before setting the variable. The media_id most likely can't be represented as such a high floating number value. Consdiering its Twitter it mostlikely is a billion something.
can someone tell me how to order this feed by date?
http://gdata.youtube.com/feeds/base/users/USERNAME/newsubscriptionvideos?alt=json
This does not work oO
http://gdata.youtube.com/feeds/base/users/USERNAME/newsubscriptionvideos?orderby=published&alt=json
Thanks in advance!
Peter
Not sure if you've figured this out. But it seems to work fine for me. I just added the orderby=published.
And I'm using "users/default/newsubscriptionvideos" instead of actually specifying the username. Maybe that makes a difference.