How to retrieve Topics/Topics List, Replies from Activity Tab using Ruby?

Hi!,
Is there any way we can retrieve Topics/Topics List ,Replies From Activity Tab using Ruby?
Any help would be appreciated.
Image 1 : (Non admin User)


Image 2 : (Admin User)

What problem are you trying to solve?

You want to get the posts from a particular user?

./launcher enter app
rails c
u = User.find_by_username("pat")
posts=Post.where(user_id: u.id)

You can get them with the data explorer plugin.


When we click on a user’s avatar, we are directed to that user’s activity page, where we can see the topics and posts in which that user has participated. I want to retrieve these topics along with the posts from the Activity tab using Ruby.
Is there any event where I can achieve this?

Did you try the code that I supplied?

Why do you want to retrieve the information with ruby?

Yes, I tried the code, and it works. I’m attempting to retrieve the posts under an event that accesses the Activity tab

I think using the function post_query in the UserSummary class can help me achieve this. Please correct me if I’m wrong.

I want to use Ruby because I think it allows me to modify my data quickly, unlike JavaScript, which lags and takes time to load pages,Please correct me if I’m wrong.