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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0936202557b83e619d0e765494850b5f931b64fd
4
- data.tar.gz: 28f03b256ff27ce89fdbe3562b7e235dd7561edd
3
+ metadata.gz: 90817fe91b16bdebbffa64fc11555b7af9c69ffe
4
+ data.tar.gz: b519f4f97cf8d1b507b4945892e3b703721b3026
5
5
  SHA512:
6
- metadata.gz: 0a22abc8ed4452e8c196f95e776bcbbe819732ad34c751afb3a33a0c192435843b482750958825bc0dea3a3c94ebbe7065e414ea419f2b22118e77bc7f5436c3
7
- data.tar.gz: f9b29e6159243fbbf5dd61cdcfa19b5b7aca514783a8e45a97f19d7c235e10b8c050377b5f3ac11f30c6250f52b2d04a18fb0f35306023c932e2336598a1696c
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
@@ -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: true, import_hashtags: true)
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)
@@ -3,7 +3,7 @@ $:.unshift lib unless $:.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "neo4apis-twitter"
6
- s.version = '0.3.1'
6
+ s.version = '0.4.0'
7
7
  s.required_ruby_version = ">= 1.9.1"
8
8
 
9
9
  s.authors = "Brian Underwood"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neo4apis-twitter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Underwood