Klatura API: How do I retrieve a list of all media entries, not just those that have content? - kaltura

I'm using the Kaltura v3 API, uploading a video to the server. I'd like to be able to query the API and ask if I have a MediaEntry added, but with no media (or upload token) associated with it. It seems like media:list would be the correct action, but it doesn't return any results that don't have media already associated.
Is there a parameter I can send to media:list to get these entries? Or another API call I should be using?

If you're looking to list all media entries that don't have video associated, use the following. Example is in PHP, but will be the same in every language if you use a client library -
$filter = new KalturaMediaEntryFilter();
$filter->statusEqual = KalturaEntryStatus::NO_CONTENT;
$result = $client->media->listAction($filter);

Related

How to store user data in firefox web extension

I want to store data (increasing everytime the extension is "triggered") in a json file to display it for the user. I can't find a solution on how to add a json file where I can store and overwrite data.
To store persistent data between between uses, you'll need to use the "storage" API which you can read about here.
Basically, you'll want to include the storage API in your manifest, then call it with methods like let gettingAllStorageItems = browser.storage.local.get(null);. Here's an example.

Filter results from YouTube data API based on date

I am trying to filter data from YouTube data API (using commentThreads).
Goal here is to get all the comments published for the channel after 2018-03-25. I have tried different date formats and it looks like the filter is not working as I get all the results back.
Any ideas?
https://www.googleapis.com/youtube/v3/commentThreads?part=snippet&allThreadsRelatedToChannelId=UCU34OIeAyiD4BaDwihx5QpQ&key=xxxx&maxResults=100&publishedAfter=2018-03-25T13:15:30Z
I've never used the Youtube google api, but assuming that this is the API reference: https://developers.google.com/youtube/v3/docs/commentThreads/list
It doesn't mention the publishedAfter-option, which leads me to believe that it doesn't exist?
This probably means that you'll need to use the order option along with maxResults to achieve your goal.

Get Region of the video viewers using YouTube API

I'm in the research using YouTube-Data-Api. I get like count, comment count like that. I need to get region(Country) list of the viewers of that video one by one in my list. How do I get that.
No you can't, it is only for user who upload the video. In youtube api v3 docs. A url is given something like
https://www.googleapis.com/youtube/v3/videos?id={video->id}&key={$key->key}&part=snippet,contentDetails,statistics,status&regionCode=es
The part of url in which regionCode is given by you. It is only application if The regionCode parameter instructs the API to select a video chart available in the specified region. This parameter can only be used in conjunction with the chart parameter. The parameter value is an ISO 3166-1 alpha-2 country code. For more information You can use this below link.
https://developers.google.com/youtube/v3/docs/videos/list#chart
Hope it helps you.

RegionCode in YouTube API v3

I can't seem to find any information on the implications of using/not using regionCode in the YouTube v3 API, for example the search/list resource.
In the specific, if the regionCode is not specified in the call to the API, will all the videos matching the criteria be returned?
If a video is allowed only in certain regions, not specifying the regionCode in the search request, will the API return it? Or only the unrestricted videos will be returned?
Where can I find some clarification on the topic?
If you do not specify the Region Code then the API automatically determines the region based on your location. So, for example, if I queried the API on my laptop in New Zealand, then the region code would be NZ.
The API outputs the region code. In JSON it is under the tag regionCode.
Generally Region Code is not required. You will get a good matching results output without it.
The regionCode parameter instructs the API to return search results for the specified country. The parameter value is an ISO 3166-1 alpha-2 country code. (string)

Youtube API v3 Search own videos by tag

Is it possible to search videos by tags using Youtube API v3 ?
I would like to search among my own videos.
Use search method with ##tagname search string for q parameter and set type:video parameter. You can find other search operators here. Old one - tag:tangle doesn't work with new api for me. ## works fine.
Recently tried the solution given by user 350D, but q=##{YOUR_TAG} does not appear to work with the latest YouTube API. It appears that the tag can only be retrieved when the video ID is provided as a parameter. I found that the following works for me:
First, retrieve a list of videos (returning minimal needed information, e.g. the video ID, title, and the high quality thumbnail URL):
https://www.googleapis.com/youtube/v3/search?key={YOUR API KEY}&fields=items(id(videoId),snippet(title,thumbnails(high(url))))&part=id,snippet;
Then batch the video IDs into one request to retrieve the associated tags:
https://www.googleapis.com/youtube/v3/videos?key={YOUR API KEY}&fields=items(id,snippet(tags))&part=snippet&id={videoID01,videoID02,etc};
You can do a videos->list with with settings video ids as the ones in your playlist and iterate through them checking with tags. But searching by tags is not available in API anymore.

Resources