Documentation + Scraping #7
-
Hello! I am pretty new when it comes to API usage. I am currently making a Discord bot and have it working, but wanting to scrape Reddit and have it output posts from a specific subreddit. I have been trying to get this API wrapper to work, but I am having major difficulties. I have been mainly trying to use .getSubredditPosts but only ever get outputs like "masecla.reddit4j.requests.SubredditPostListingEndpointRequest@c267ef4". I honestly have no idea how to make use of this wrapper and do what I need to do. The documentation seems very barebones and I can't find anything on google using this wrapper to help. All I can ever find is Python usages!!! Is there anywhere where there is extra documentation besides the wiki? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Can drop a code example? |
Beta Was this translation helpful? Give feedback.
-
Update: I ended up just using OkHttp and Jackson to do everything. EDIT: At the time of the original post I was very new to Java. I rewrote the program I was working on and I solved my original issue rather quickly. I needed to add .submit() to the end of the getSubredditPosts method call. Works great now! My "solution" beforehand worked, but with my lack of Java understanding, it was messy and inefficient and laced with bugs. |
Beta Was this translation helpful? Give feedback.
Update: I ended up just using OkHttp and Jackson to do everything.
EDIT: At the time of the original post I was very new to Java. I rewrote the program I was working on and I solved my original issue rather quickly. I needed to add .submit() to the end of the getSubredditPosts method call. Works great now! My "solution" beforehand worked, but with my lack of Java understanding, it was messy and inefficient and laced with bugs.