neo4apis-twitter 0.3.1 → 0.4.0
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/README.md +3 -1
- data/lib/neo4apis/cli/twitter.rb +4 -1
- data/neo4apis-twitter.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 90817fe91b16bdebbffa64fc11555b7af9c69ffe
|
|
4
|
+
data.tar.gz: b519f4f97cf8d1b507b4945892e3b703721b3026
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1317b6a3ad2291764020b662b8e6b074c21c68582ec6d398e967bdbc5565bf22a1af42924d6dcacead463f4aaec3268e6c7c0cc19eb9ff428b1c687802dcaab6
|
|
7
|
+
data.tar.gz: 7a8b8efd4dfbdaa88b0b6d56cbcb7efa9a5b4f1b5b56ddc38043f09e4cb21dcfb7384d402a129d28887c57fd3dea06e5ead10dbed66fbc1bdf16e489513e417a
|
data/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
neo4apis-twitter is a ruby gem for making importing data from twitter to neo4j easy
|
|
5
5
|
|
|
6
|
-
This adapter supports objects created from the `twitter` gem. Currently supports importing User and Tweet
|
|
6
|
+
This adapter supports objects created from the [`twitter` gem](https://github.com/sferik/twitter). Currently supports importing User and Tweet
|
|
7
7
|
|
|
8
8
|
You can either use the gem to write custom ruby code to import data or you can simply use the command-line interface.
|
|
9
9
|
|
|
@@ -59,6 +59,8 @@ Supported options:
|
|
|
59
59
|
|
|
60
60
|
##### Config file
|
|
61
61
|
|
|
62
|
+
Register your app for a Twitter key and token at [https://apps.twitter.com](https://apps.twitter.com). You will need to provide a URL and can use `http://127.0.0.1`.
|
|
63
|
+
|
|
62
64
|
The default path for the config file is `config/twitter.yml`, but you can specify your path with the `--config-path` option. The configuration file should match the keys in the [twitter gem`s documentation](https://github.com/sferik/twitter/blob/master/examples/Configuration.md). The following is an example:
|
|
63
65
|
|
|
64
66
|
```yaml
|
data/lib/neo4apis/cli/twitter.rb
CHANGED
|
@@ -6,6 +6,9 @@ module Neo4Apis
|
|
|
6
6
|
class Twitter < Thor
|
|
7
7
|
class_option :config_path, type: :string, default: 'config/twitter.yml'
|
|
8
8
|
|
|
9
|
+
class_option :import_retweets, type: :boolean, default: false
|
|
10
|
+
class_option :import_hashtags, type: :boolean, default: false
|
|
11
|
+
|
|
9
12
|
desc "filter TRACK", "Streams tweets via a filter"
|
|
10
13
|
def filter(track)
|
|
11
14
|
neo4apis_client.batch do
|
|
@@ -42,7 +45,7 @@ module Neo4Apis
|
|
|
42
45
|
NEO4APIS_CLIENT_CLASS = ::Neo4Apis::Twitter
|
|
43
46
|
|
|
44
47
|
def neo4apis_client
|
|
45
|
-
@neo4apis_client ||= NEO4APIS_CLIENT_CLASS.new(Neo4j::Session.open(:server_db, parent_options[:neo4j_url]), import_retweets:
|
|
48
|
+
@neo4apis_client ||= NEO4APIS_CLIENT_CLASS.new(Neo4j::Session.open(:server_db, parent_options[:neo4j_url]), import_retweets: options[:import_retweets], import_hashtags: options[:import_hashtags])
|
|
46
49
|
end
|
|
47
50
|
|
|
48
51
|
def twitter_client(streaming)
|
data/neo4apis-twitter.gemspec
CHANGED