Unable to get all comments of conversation thread of planner task - microsoft-graph-api

i am currently working on small project where i have to retrieve all comments of particular task in planner api (microsoft planner).
using microsoft graph api documentation link
i tried to call below end points
https://graph.microsoft.com/v1.0/groups/[GroupID]/threads/[ConversationID]
i replaced groupid and conversationId in above url and it works.
but it has two problem
1.) it return only one comment (recent comment), but i want to retrieve all comments.
2.) it shows only 250 character of comment (preview text), but i need to retrieve full comment.
can anyone help why api link give above two problem.
thank you

/posts will give you access to all the comments in a JSON array, and will have the full comment. However the comment will have HTML embedded in the data.
https://graph.microsoft.com/v1.0/groups/[GroupID]/threads/[ConversationID]/posts
HTH

Related

Microsoft Graph API / Power Automate

I am using Graph API to extract all the incidents and advisories from Microsoft but I encounter some issues, and I will be very happy if you can help me.
I am using the GET Method using the URL
https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/issues but in the output, I can see that not all incidents are present, and I can see that there is present pagination in the output https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/issues?$skip=100, can you guys help me how I should filter this to extract all the incidents from the API?
You'll need to make multiple calls until the response provides no further link for you to retrieve further records.
https://learn.microsoft.com/en-us/graph/paging
As is described in the above documentation ...
You can retrieve the next page of results by sending the URL value of the #odata.nextLink property to Microsoft Graph.
As previously stated, once you have reached the last page, you will no longer have a nextLink value to retrieve the next page.

Get a review link with Google My Business API

Is there a way to get the link of a review using the GMB APIs?
The closest to what I need is this:
https://www.google.com/maps/contrib/113400145807499011881/place/ChIJSRSm38NhLxMRBgg2EGMZqKc/
Where the first ID (113400145807499011881) is the ID of the user who left the review, and the second ID (ChIJSRSm38NhLxMRBgg2EGMZqKc) is the place ID.
However, the review object returned by the API does not seem to contain enough information to obtain the reviewer user ID.
Thank you,
Guido
I was searching for a way to get the url to the review overview for a specific location via the API too.
After checking the links, IDs ect. in the API Responses and lots of documentations an tuturials i found NO way to get the link over tha API.
BUT a workarround with a few manual steps can help to find the link (I know that is not a final answer to the question, but maybe it is still helpfull)
go to google search, and search for you Location/ Company that contains the reviews
on the right side you should see a pannel that shows the current stars for your location and a link "xxxx Google-Rezensionen"
klick on this link and copy the url in the browser
(optional remove parameters like "&client" ect.
Check this youtube-video of the Step by Step Tuturial to see a tuturial how you can do this.
newReviewUrl is the Parameter if someone read this:
https://developers.google.com/my-business/reference/rest/v4/accounts.locations#urlattributevalue

Reddit Endpoint for comments for a particular article

I am trying to get all of the reddit comments for a particular article.
On the Reddit API page, it seems to suggest that:
www.reddit.com/r/subreddit/comments/ARTICLE
will get me these results (article being a variable), however if I go to an endpoint with the article appended after comments, all I get is a 404 error.
How do you get comments from a specific article via the Reddit API?
I'm doing this in Javascript, but this is obviously a language agnostic question.
reddit's generated API documentation for the comments endpoint appears to be incorrect. The correct URL to use to retrieve comments for a post is:
https://www.reddit.com/r/{subreddit}/comments/{article ID}/irrelevant_string.json
Or for a specific comment:
https://www.reddit.com/r/{subreddit}/comments/{article ID}/irrelevant_string/{comment ID}.json
The "irrelevant string" can be just an underscore, it doesn't matter - on the website itself, it's a form of the title, but the API doesn't care about the title of the post.
I know this is an older post, but I'm posting because I found this when I encountered a similar 404 error when requesting the official api comments endpoint, and while the accepted solution works you can still use reddit's generated api documentation for requesting comments using oauth.
My error (and I'm guessing OP's too) was not stripping the t3_ type prefix from ARTICLE's full name. For example,https://oauth.reddit.com/r/pics/comments/t3_zmvmpn returns a 404, but https://oauth.reddit.com/r/pics/comments/zmvmpn successfully returns the expected comment json.
It's easy to confuse because the official documentation isn't clear on when to use a thing's name vs its id, but when using the json the id field holds the necessary string without the type prefix.
The format when requesting the comments for a given ARTICLE (link) is:
https://oauth.reddit.com/comments/{id}
You can specify the subreddit if you want like in my other examples, but it's not required.

How to get links in comments from the YouTube api following the move to Google+ comments

In the new YouTube Google + comments system how can I retrieve comments that contain links.
For example if someone posts a link to another youtube video as follows:
http://www.youtube.com/watch?v=AZNHuFjnmUo
This gets converted to a link by the google plus system. The title of the video is shown as the text rather that the url. i.e. The html shown within the comments is this:
Francis HATES Google+
However the api for that comment only returns the title of the video which is pretty useless seeing as I want to get the link too. I am guessing that the system converts the url into an <a> tag which is stored in the database but then the api strips out the html when its requested so it only returns the videos title.
I have posted a defect here:
https://code.google.com/p/gdata-issues/issues/detail?id=5500
But that bug list seems to have very little activity going on in terms of responses to issues.
So is there another way to get the data I need?
What you can do while this bug remains is to extract the comment id and use it in the Google+ API with an activities.get request. This will return the full post with all links.
A bit cumbersome since it needs one request for each comment you want to check, but it seems to be the only way while the bug remains.
To take an example from the video you linked in the issue:
This YouTube comment returned by the API includes a YouTube link:
http://gdata.youtube.com/feeds/api/videos/rgkDKeSc-1o
/comments/z12hvvcgxznkufyo304ci1iqlnandzxjpes
You can use the z... ID in a request to the Google+ API:
https://developers.google.com/apis-explorer/#p/plus/v1/plus.activities.get?activityId=z12hvvcgxznkufyo304ci1iqlnandzxjpes
Which includes the full post including links.

Is there a way to get a list of users based on a hashtag they used?

I want to get a list of users who have used a particular hashtag. Eg. #ManOfSteel.
How can I get a list of the users who are using that hashtag as well as their details (like which city they are tweeting from) using a twitter API or any other means?
Yes, you can. And it's quite simple, really.
According to the documentation:
GET search/tweets: - Returns a collection of relevant Tweets matching a specified query.
Resource URL: https://api.twitter.com/1.1/search/tweets.json
Now if you scroll down on that page, it gives an example of what a query for a tweet returns (I took a screen, sorry about the appalling arrow, it's 10am here and I haven't had my tea yet).
Great! So you know the URL and method (GET) that you need to get your data. As for searching for a hashtag specifically, the query documentation is what you're after.
This is basically as urlencoded string in the GET request like: ?q=#hashtag. Perform the search like that and you'll get back the data above. Then just loop through it, find the user object, and grab the value location key if you want the user's city.
Now, as for a library to interact with the twitter API, you haven't even stated what language you're using. From your profile, you use JAVA I'm guessing. Regardless, checkout the libraries page on the twitter dev site - there's one for JAVA that looks pretty good (and many for other languages too).
If you were using php, this post would be immensely helpful.

Resources