I am trying to create a kind of twitter bot as a discourse plugin.
I already managed to crawl tweets with the twitter gem (BTW. i had to require tons of gems in the plugin.rb with gem 'gemname', '0.4.2', {require: false}
to get it working, is there a cleaner way to do it?)
But now i want to send those tweets in a discourse topic. Lets say, the plugin checks every 10 seconds if there is a new tweet, and if so it creates a new reply to the topic.
I am not really sure how to use the Discourse API to achieve that.
What i am also curious about would be to get it managed to just get any kind of input on my discourse server via api - Would really appreciate if someone could help me there.
And: My tweets are at the moment as a hash map in a variable tweets. Can i display the variable in any way on my discourse server just for testing purposes?
For example show tweets.to_a.last.full_text and then somewhere the last crawled tweet is showing up?