Advertisement
Guest User

Untitled

a guest
Aug 30th, 2015
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (defn tweet
  2.   "send a tweet"
  3.   [user body]
  4.   (println "Sending Tweet!\n" body))
  5.  
  6. (defn- handle-tweet
  7.   "figure out what we want to do with a tweet"
  8.   [tweet]
  9.   (let [provider (target-provider tweet)
  10.         recipient (target-recipient tweet)
  11.         url (target-landing-page tweet)
  12.         tweet-body (make-tweet-body recipient provider url)]
  13.     (if (to-reply? recipient)
  14.       (do
  15.         (println "should reply, starting tweet")
  16.         (tweet recipient tweet-body)
  17.         (println "good reply, great success"))
  18.       (println "not replying"))))
  19.  
  20.  
  21.  
  22. 21:33:14.133 [clojure-agent-send-off-pool-0] INFO  twitter-streaming-client.impl - received 1 message lines
  23. should reply, starting tweet
  24. good reply, great success
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement