Closed zmarty closed 6 years ago
Unfortunately, it's not part of the reddit JSON (which is lame in my opinion). Does the Shortlink
property work for your needs?
Could it be derived based on post id and the comment id? The post title isn't actually necessary and can be filled with ...
instead. For example,
https://www.reddit.com/r/funny/comments/78amfn/.../dosltoc/
is perfectly valid
It is perfectally able to be dervied from the comment id and post id, actually, I have been using it on my bot for awhile now, and have literally just come up for a use case for myself for this, the format is specifically able to be found Here if you want to look at my code and it's surroundings, but the key code that is relevant is:
string postID = comment.LinkId.Substring(3);
string commentLink = $"https://www.reddit.com/comments/{postID}/_/{comment.Id}";
So, this is what I believe the Shortlink
property on the comment does. It's kinda weird. I guess in theory Shortlink would be derived from Permalink but either one works.
https://www.reddit.com/r/redditdev/comments/78yqit/reddit_change_comment_models_returned_by_the_api/
Well that's convenient for this issue.
Okay, well this issue is an easy fix where PRAW's is broken. I'll submit a PR soon for this.
@CrustyJew Did this change make it into MyGet? RedditSharp 2.0.0-CI00056 does not seem to have it.
It should have but I'll have to double check.
@CrustyJew As far as I can tell VotableThing in 56 does not have Permalink. I noticed the MyGet badge says Failed, could it be related?
I cannot seem to find a Permalink in the Comment class.
Example expected URL: https://www.reddit.com/r/teslamotors/comments/6ujtwe/weekly_thread_index/dm0u4y1/
I am using NuGet 2.0.0-CI00028