Closed bitcoinminersuk closed 5 years ago
One way:
(println (:id (:user tweet)) (:screen_name (:user tweet)) (:text tweet))
Basic clojure.core
provides a legion of other ways, too — destructuring, juxt, get-in, select-keys, etc.
Thanks for the response, I have tried a few variations and when I try the following function I just get the response nil nil nil
(defn filter-tweets [keyword]
(api/search-tweets (creds) :params {:q keyword})
(println (:statuses (:user keyword)) (:screen_name (:id_str keyword)) (:text keyword)))
Thanks
Okay, um, can you read through http://riemann.io/clojure.html#maps (and maybe the rest of that page, if it looks useful) and then come back here if you're still having trouble? You might also find more guides (both written and embodied) at various Clojure forums, e.g.:
I am trying to get to grips with twttr and have found it better to work with, however, I am new to clojure and struggling with trying to filter the text from this function
What would be a way of just printing the user_id, screen_name and the text from the tweet?
Really appreciate some help, once I have that done I should be able to peice the rest of it together