latest_tweets 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/latest_tweets.rb +2 -2
- data/lib/latest_tweets/twitter_timeline.rb +2 -2
- data/lib/latest_tweets/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 163e99a03620a09ee37a7bb0e0aea85dd2c98312
|
|
4
|
+
data.tar.gz: a84c37c26432caeb2def1ad368bd36d59e70d6bb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8a0b2c443c64cb6cd95b36435ba92082342ae4cfeb0bd6ce674b1657d63d7ff3a0167436a6549d71d89f1e06d5bf14fe7c0ec6fbcba10e8871920fdcbd4d4f1e
|
|
7
|
+
data.tar.gz: 50efe179c09ee8255f59b6aa2e618a06a22d5a6da56c25d48402a14a866d29e3f0c59031b29f927edc057235b08b700d1afa284517e66b180fb35844dab7a2f4
|
data/lib/latest_tweets.rb
CHANGED
|
@@ -4,8 +4,8 @@ require 'latest_tweets/twitter_setup'
|
|
|
4
4
|
require 'latest_tweets/twitter_timeline'
|
|
5
5
|
|
|
6
6
|
module LatestTweets
|
|
7
|
-
def self.from_account(account, count = 3)
|
|
8
|
-
LatestTweets::TwitterTimeline.new({account: account, count: count}).tweets
|
|
7
|
+
def self.from_account(account, count = 3, options = {})
|
|
8
|
+
LatestTweets::TwitterTimeline.new({account: account, count: count}.merge(options)).tweets
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def self.from_query(query, count = 3)
|
|
@@ -12,7 +12,7 @@ module LatestTweets
|
|
|
12
12
|
|
|
13
13
|
def tweets
|
|
14
14
|
if options[:account]
|
|
15
|
-
client.user_timeline(options[:account], count: options[:count])
|
|
15
|
+
client.user_timeline(options[:account], count: options[:count], exclude_replies: options[:exclude_replies])
|
|
16
16
|
elsif options[:query]
|
|
17
17
|
client.search(options[:query], count: options[:count]).to_a
|
|
18
18
|
end
|
|
@@ -20,7 +20,7 @@ module LatestTweets
|
|
|
20
20
|
|
|
21
21
|
private
|
|
22
22
|
def default_options
|
|
23
|
-
{count: 3}
|
|
23
|
+
{ count: 3, exclude_replies: false }
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def config_twitter
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: latest_tweets
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jamie Allen
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2014-
|
|
13
|
+
date: 2014-07-09 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: bundler
|