-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrough.foo
More file actions
87 lines (51 loc) · 1.83 KB
/
Copy pathrough.foo
File metadata and controls
87 lines (51 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
t=[]; lisa2.client.search("twitter", :lang => "en", :filter => "images") do |tweet|
puts tweet[:text]
t<<tweet
end
lisa.stream.filter({:follow => "2592724712,99530011,"}) {|object|
puts "@#{object.user.handle} : #{object.text}" if object.is_a?(Twitter::Tweet)
}
require 'rubygems'
require 'chatterbot/dsl'
require "pp"
config = {
:auth => {
:consumer_key => '07y02Rx3pjpVlAqmwiLZeONBQ',
:consumer_secret =>'SFN4ennNrCRu8eL7piWRRvJrpupi8IV5dDcN3gnPcms97LlRAt',
:token =>'2592724712-sATvge1OdeqOd1zpE2riTKpiPaCmn0o3Jarnppe',
:secret => 'XtH5VQKXVURUDfQ0GPqxrcYO4wGMqdUcLnF26PP0YoVz0'
}
}
consumer_key(config[:auth][:consumer_key])
consumer_secret(config[:auth][:consumer_secret])
token(config[:auth][:token])
secret(config[:auth][:secret])
exclude "foo"
t=[];search(["twitter", "fb"]) {|tt| t<<tt}
User search
Bing : site:twitter.com tweets "android" "blog"
Gem : http://rdoc.info/gems/twitter/Twitter/REST/Users#user_search-instance_method
AndroidBlog_br OR blog_android OR AndroidBlogNews
Mail.deliver do
from 'hello@yobitch.me'
to 'maku@makuchaku.in'
subject 'Here is the image you wanted'
body "Foo message"
end
#seo AND #marketing filter:replies -RT since:2014-09-04 until:2014-09-06
def find_parent(lisa, tweet_id)
begin
tweet = lisa.client.status(tweet_id)
rescue
return nil
end
puts "[#{tweet.uri}, R?=#{tweet.reply?}] #{tweet.text}"
return tweet.reply? == true ? find_parent(lisa, tweet.in_reply_to_status_id) : tweet
end
t=[]; search_text = "#android AND #app filter:replies -RT since:2014-09-01 until:2014-09-06"
lisa2.client.search(search_text, {:lang => "en", :result_type => "recent"}).each { |tweet|
t << tweet
puts "----------------------------------"
find_parent(lisa2, tweet.id) if tweet.class != "".class
puts "----------------------------------"
}