You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Posts are silently discarded if over 25 are requested. Please add documentation and an error to protect against users silently losing posts. Thanks
The text was updated successfully, but these errors were encountered:
largenumberhere
changed the title
RedditClientGetPosts(List<string> fullnames)
RedditClientGetPosts(List<string> fullnames) drops posts if over 25 is requested
Jan 17, 2023
largenumberhere
changed the title
RedditClientGetPosts(List<string> fullnames) drops posts if over 25 is requested
redditClient.GetPosts(List<string> fullnames) drops posts if over 25 is requested
Jan 17, 2023
Can you post some code to go with this example? As far as I'm aware, there is no such limit. If you request 30 posts, you should get 30 posts. I've done quite a bit of testing to make sure of this.
So my first guess would be an issue with your code, but I'd need to see it in order to be sure.
I've noticed the same 25 limit in GetPosts.
Here's an example, using Base36Library to create a list of 50 id's:
string startID = "16xyz93";
//create a list of 50 id's using Base36Library
long startNumber = Base36.Decode(startID);
List<string> ids = new List<string>();
int nextId = 0;
while (nextId < 50)
{
ids.Add("t3_" + Base36.Encode(startNumber + nextId).ToLower());
nextId++;
}
//get posts by id
List<Post> posts = new List<Post>();
var refreshToken = AuthorizeUser("appId", "appSecret");
var reddit = new RedditClient("appId", "appSecret", "refreshToken");
posts = reddit.GetPosts(ids);
I've found this reddit post that explains the /by_id? endpoint only gives 25 results, and recommends using the /info endpoint for 100 results. But I can't find how to call that endpoint with Reddit.NET.
Posts are silently discarded if over 25 are requested. Please add documentation and an error to protect against users silently losing posts. Thanks
The text was updated successfully, but these errors were encountered: