Dailymotion graph API user activities - dailymotion-api

I am using the graph API of dailymotion and in particular the /user/<id>/activities feature.
There is no parameter to sort the list and no specification for the default sort order. Is there any guarantee that it is sorted by created_time (or something else) ?
The documentation :
https://www.dailymotion.com/doc/api/explorer#/user/activities/list
The api explorer :
http://www.dailymotion.com/doc/api/obj-user.html#user-activities-connection
Thanks a lot for your input on this!

Thank you for reporting this issue. You where right, the order was already assumed to be created_time behind the scene. From now on, there is a new sort parameter that you can use to order the result set on /activities and /user/<xid>/activities. For example:
https://api.dailymotion.com/user/<xid>/activities?fields=id,type&sort=recent

Related

product search filter by store

The Walmart Open API doesn't seem to honor storeID as a filter parameter.
For example, I want my backend code (java) to search for BREAD filtered to a particular store. Is this possible with Any Open API ?
Here is my query
https://developer.api.walmart.com/api-proxy/service/affil/product/v2/searchquery=bread&facet=on&facet.filter=brand:Wonder&numItems=3&storeId=5294
The returned result seems to always ignore the storeId.
Any thoughts ?

missing devops REST API asOf parameter for workitem comments

devops REST API provides a very handy asOf paramater for workitems in order to get a past snapshot of their state.
https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work%20items/list?view=azure-devops-rest-5.1#uri-parameters
we would like to include the comments at that snapshot/asOf moment, however we aren't able to use $expand (tested with 'All')
our fallback is then to use the comments endpoint : https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/comments/get%20comments?view=azure-devops-rest-5.1
but this one lacks asOf parameter, I tried with just to be sure it's not hidden/undocumented, but with no luck.
GET https://dev.azure.com/xxxx/xxxx/_apis/wit/workitems/16247/comments?api-version=5.1-preview.3&asOf=2020-06-01T07:00:56.89Z
any idea/workaround how to address this ? we can play with comment createdDate & changedDate to find similar behavior, and/or fetching all comment revisions. however I wanted to know if I didn't missed an obvious approach.
You can get the comment in System.History field using the Work Items - List Api, but in this api, it only returns the latest revision of the work items you list:
To list all comments, you need to use Comments - Get Comments api, but asOf parameter doesn't work in this api. So the workaround is using createdDate & changedDate to find the items you need.

How can I search the channel in a specific country using the YouTube API 3.0?

I use the url to search channels in a specific country like this https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=8&order=viewCount&q=news&type=channel&regionCode=US&key=API-Key.
But when i changed the regionCode parameter to IT(italy) or any other one,the search result is always identical.So the search result is not changed with the regionCode.
How can I search the channel by country using the YouTube API 3.0,thanks.
I also try to search channel with the optional parameter regionCode, and it seems that this parameter is not to filter the results base on the country code of a Country. I found in this related SO question that the region parameter only applies to movie charts, and is not something that works as a parameter for general searches.
So the only possible parameter that I think you can use to filter the results of YouTube API in a specific country or place is by using the parameter location.
The location parameter, in conjunction with the locationRadius parameter, defines a circular geographic area and also restricts a search to videos that specify, in their metadata, a geographic location that falls within that area. The parameter value is a string that specifies latitude/longitude coordinates e.g. (37.42307,-122.08427).
Hope it helps you.
There is no way to solve this problem. I tried location with locationRadius, but second parameter is limited to 1000km, so, I cant find all videos from Russian Federation or USA using that option and 1 api request.
Also, that api request performs slow for understandable reason.

Youtube - How to browse all channels in a given category?

For example, there are 884 channels under beauty and fashion, however, Youtube only shows about 50 of them. How do i get the complete list? Either through API or web.
https://www.youtube.com/channels/beauty_fashion
Thanks,
The first thing to do is to get the Guide Category ID that you're interested in. If you do a call to
https://www.googleapis.com/youtube/v3/guideCategories?part=snippet&hl=en&regionCode=US&key={YOUR_API_KEY}
where the hl parameter is the language and the regionCode is the country code (as some categories may not be available for particular languages/regions), you'll get a list of all the categories and their IDs.
For example, that call tells us that the Beauty and Fashion guide category ID is GCQmVhdXR5ICYgRmFzaGlvbg. With that ID, we can then do a channels list call:
https://www.googleapis.com/youtube/v3/channels?part=snippet&maxResults=50&categoryId=GCQmVhdXR5ICYgRmFzaGlvbg&key={YOUR_API_KEY}
This will give you 50 channels in that category. It will also give you a 'nextPageToken' ... you do the same request as above, but add "&pageToken={WHATEVER THAT NEXT PAGE TOKEN VALUE IS}" to get the next 50, and so on.
You can retrieve up to 500 that way ... that's the limit through the API.
Note that all of these calls require an API key from console.developers.google.com
Visit this site: http://www.channelcrawler.com/
You can list the channel in selected category and many other options.

youtube analyticsService Report parameters

I am authenticating with google to try and get youtube analytics my problem is that i don't know how to filled you the parameters when quering youtube
here i am making a new service: and then try to query it
I am not sure what to put in the "ids" parameter or where to find it?
What do I put there?
_analyticService = new YoutubeAnalyticsService(_authenticator = CreateAuthenticator());
...
_analyticService.Reports.Query("ids", "2013-01-01", "2013-02-02", "views").Fetch();
The ids parameter is the an expression with the id of your channel. If you go to http://www.youtube.com/analytics and click on the title with your own channel name, you get a link like http://www.youtube.com/channel/UCYHMS8hN8s49F93iJuEgG6w The last part is the id of your channel. You have to use this as the ids parameter in an expression like "channel==UCYHMS8hN8s49F93iJuEgG6w". This is to query in the context of your own channel. This is needed as you might have access to several channels.
I can query views for one of my videos by: https://www.googleapis.com/youtube/analytics/v1/reports?ids=channel%3D%3DUCYHMS8hN8s49F93iJuEgG6w&start-date=2013-01-01&end-date=2013-02-02&metrics=views&dimensions=day&filters=video%3D%3D_iwmv6644dA&sort=day&key={YOUR_API_KEY}
Try to use the API explorer at the bottom of this page, there are some text explaining the different parameters there as well. https://developers.google.com/youtube/analytics/v1/
Hope it goes well!

Resources