in revision of August 15, 2013 says that "The API now supports the ability to specify a website as a promoted item." reflecting details with "invideoPromotion" object.I need to get the items set.
However when i call the method as below,almost for 10 channels, none of them has the mentioned promoted item.
https://www.googleapis.com/youtube/v3/channels?part=id,status,snippet,brandingSettings,contentDetails,invideoPromotion,statistics,topicDetails&forUsername={CHANNEL}&key={API-KEY}
Is there a specific query parameter for it?
I believe you can only get your own channel's invideoPromotion settings.
Here's a video talking about invideoPromotion.
Also here's a JAVA Sample code.
Related
While calling the commentThreads API with a channelId is a parameter.
I'm getting commentsDisabled (403) error - which refers to "The video identified by the videoId parameter has disabled comments." However, as I indicated I'm using the channel ID.
I tested some other channels - that do have disabled videos - and I did not get that error.
I get it on a few specific channels.
Please advise.
TLDR: There isn't anymore any way to retrieve community tab comments.
Here are some channel ids in line with what you were stating:
Request: https://www.googleapis.com/youtube/v3/commentThreads?channelId=UCWIdqSQekeGmUWlSFeCiEnA&key=YOUR_API_KEY
Answer: 403 The video identified by the <code>videoId</code> parameter has disabled comments.
However there is a video with comments: https://youtu.be/3F8dFt8LsXY
Request: https://www.googleapis.com/youtube/v3/commentThreads?channelId=UCXptamDYEVcU4JCio30hYTw&key=YOUR_API_KEY
Answer: 403 The video identified by the <code>videoId</code> parameter has disabled comments.
Furthermore there isn't any public video with comments (checked by algorithm based on the "uploads" playlist)
channelId field isn't about videos so videos restriction shouldn't change visibility of the community tab (that's comments from this section that we retrieved with the channelId field)
The channelId parameter instructs the API to return comment threads containing comments about the specified channel. (The response will not include comments left on videos that the channel uploaded.)
On both channels above, they have their community tab disabled.
However after tests on "normal" channels like officialpsy there isn't any error in the answer however there isn't any comment either.
If you are looking for community tab comments I would recommend you to use allThreadsRelatedToChannelId which works but will also return you comments left on videos.
However even allThreadsRelatedToChannelId doesn't seem to work anymore for community tab comments https://www.googleapis.com/youtube/v3/commentThreads?allThreadsRelatedToChannelId=UCMD4joGtfFO5DoH_GeRP4Cg&key=YOUR_API_KEY
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.
What is the page size for every delta query?
https://developer.microsoft.com/en-us/graph/docs/concepts/delta_query_users
https://developer.microsoft.com/en-us/graph/docs/concepts/delta_query_groups
My understanding is the $top doesn't work with delta query on users and groups. So we cannot set a custom page size.
TL;DR: For delta queries page size is not fixed/guaranteed. There's Prefer: odata.maxpagesize=X parameter but it doesn't work for all queries.
If you try to reproduce this situation in Graph Explorer using the following:
https://graph.microsoft.com/v1.0/me/calendarView/delta?startDateTime=2010-01-01 00:00:00&endDateTime=2020-01-01 00:00:00&$top=5
It'll give you the following error:
The '$top' parameter is not supported with change tracking over the 'CalendarView' resource as page size cannot be guaranteed. Express page size preferences using the Prefer: odata.maxpagesize= header instead.
As stated in this error page size is not guaranteed. However, by adding additional header
Prefer: odata.maxpagesize=10
you will be able to see that only 10 results are returned.
One remark - this param is not supported for some of the resources (also for the ones you asked about - user and group).
To see if the delta query for the other resource is supported, go to this page, choose the API and go to Request headers paragraph in its documentation. If you find header with odata.maxpagesize={x}. Optional. in the description - it's supported.
As for today (July '18) the following APIs support odata.maxpagesize param: event, mailFolder, message, contactFolder, contact and the following don't support it: group, user, driveItem, plannerUser.
Feel free to play with Graph Explorer as it might be very helpful in troubleshooting.
My intention is to build a Machine Learning program that will give a recommendation for archiving email item by reading all previous email history.
For that, I am trying to read all the email item from:
https://graph.microsoft.com/beta/me/messages
First I am getting the total number of email items in my account using /messages?$count=true which returns 1881 as the result.
Then I am trying to get all the 1881 item using:
https://graph.microsoft.com/beta/me/messages?$top=1881
But the problem is that returns 976 email items. Where are the rest of the email item? How I can find them?
Are you getting a #odata:nextLink property in your response?
If that's the case, you might need to send another request with a skiptoken parameter. It should contain a value from the #odata:nextLink response property.
On the "paging" documentation page - https://developer.microsoft.com/en-us/graph/docs/concepts/paging - it is specified that different APIs have different max page size. It's possible that the endpoint for fetching emails does not support a page size of 1881. In that case, you might need to access a second page of the results.
Another suggestion is to replace beta endpoint with the V1 API call because me/messages is available there also - https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_list_messages
I'm using ColdFusion MonkehTweets component. But actually, all I'm trying to do is get the single most recent tweet for #allblacks.
Here is the URL MonkehTweets generates. I have blanked out the keys etc for the purposes of this post:
https://api.twitter.com/1.1/search/tweets.json?checkheader=false&count=1&include_entities=true&lang=en&oauth_consumer_key=blah123&oauth_nonce=blah123&oauth_signature=blah123&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1378795729&oauth_token=blah123&oauth_version=1.0&q=from%253Aallblacks
This constantly returns the first Tweet on 7th September at https://twitter.com/allblacks
instead of the latest tweet.
Not sure what's going on and would appreciate some help please.
According to documentation: https://dev.twitter.com/docs/api/1.1/get/search/tweets you could use the optional parameter result_type with value recent. That should return only the most recent results in the response.
And I'd use #allblacks for the q parameter.