kimotter 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/kimotter +5 -1
- metadata +2 -2
data/bin/kimotter
CHANGED
@@ -14,6 +14,9 @@ parser = OptionParser.new{ |opts|
|
|
14
14
|
opts.on("-f", "--force", "Force execute, ignore api limit"){ |v|
|
15
15
|
options[:force_execute] = true
|
16
16
|
}
|
17
|
+
opts.on("-a", "--api=URL", "API Endpoint URL"){ |url|
|
18
|
+
options[:api_endpoint] = url
|
19
|
+
}
|
17
20
|
}
|
18
21
|
parser.parse!
|
19
22
|
|
@@ -33,7 +36,8 @@ if message.empty?
|
|
33
36
|
end
|
34
37
|
|
35
38
|
logger = options[:debug_mode] ? Logger.new(STDERR) : Logger.new(nil)
|
36
|
-
|
39
|
+
api = options[:api_endpoint] || "http://api.ma.la/twitter/"
|
40
|
+
kimotter = Kimotter.new(:api => api, :logger => logger)
|
37
41
|
|
38
42
|
kimotter.fetch_api_limit
|
39
43
|
if !options[:force_execute] and kimotter.api_limit?
|