secondHandler 0.0.1 → 0.0.2
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 +26 -2
- data/bin/second_handler +1 -0
- data/lib/second_handler.rb +3 -2
- data/lib/second_handler/version.rb +3 -3
- data/secondhandler.gemspec +2 -2
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dff04350f7ea7c765fdf215e85a81d593f6995a7
|
4
|
+
data.tar.gz: aefc098794f4d5c1d1e3de37cac030d41033550f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf596f8daec02216bd139e15c82570c47dd5ac666a8a1cc80666fec849b1f31f360813913965e8e42e3bb6ffb84f3fd75e39764c4d421d4bd5b0e7e2c675aefa
|
7
|
+
data.tar.gz: 0047c71ca2bd3cc9ae68566231039e3c3df1de0f7291bfa20ff82db94d2190f3f5f92aa969e89fd1fca0c9f836979064615bf6c1c635e77b446e9fd0dda9fc10
|
data/README.md
CHANGED
@@ -1,8 +1,32 @@
|
|
1
|
-
|
1
|
+
SecondHandler[](https://badge.fury.io/rb/secondHandler)
|
2
2
|
==
|
3
3
|
|
4
4
|
## Description
|
5
|
-
|
5
|
+
SecondHandler is a retriever for second-hand information on Twitter and Facebook.
|
6
|
+
|
7
|
+
Usage
|
8
|
+
==
|
9
|
+
**install**
|
10
|
+
```shell
|
11
|
+
gem install secondHandler
|
12
|
+
```
|
13
|
+
**CLI**
|
14
|
+
Tips: You can use :arrow_down: & :arrow_up: arrow key to fetch next/previous page.
|
15
|
+
`Ctrl + C` to exit!
|
16
|
+
```shell
|
17
|
+
$ second_handler fb --token 'facebook_dev_access_token' --id 'public_group_id'
|
18
|
+
```
|
19
|
+
**Code Snippet**
|
20
|
+
```ruby
|
21
|
+
require 'second_handler'
|
22
|
+
fb = SecondHandler::FbGroupPost.new('access_token', 'group_id')
|
23
|
+
# fetch first page
|
24
|
+
page = fb.first_page
|
25
|
+
# get neat content
|
26
|
+
content = page.get_content
|
27
|
+
# get next page
|
28
|
+
page = page.next_page
|
29
|
+
```
|
6
30
|
|
7
31
|
## License
|
8
32
|
|
data/bin/second_handler
CHANGED
data/lib/second_handler.rb
CHANGED
@@ -37,11 +37,12 @@ module SecondHandler
|
|
37
37
|
|
38
38
|
def attachment_helper (attach_hash)
|
39
39
|
ok_data = []
|
40
|
+
|
40
41
|
if attach_hash && attach_hash["data"].first["media"]
|
41
42
|
ok_data << attach_hash["data"].first["media"]
|
42
43
|
end
|
43
|
-
if attach_hash && attach_hash["data"].first["subattachments"]
|
44
|
-
attach_hash["data"].first["subattachments"].each do |item|
|
44
|
+
if attach_hash && attach_hash["data"].first["subattachments"] && attach_hash["data"].first["subattachments"]["data"]
|
45
|
+
attach_hash["data"].first["subattachments"]["data"].each do |item|
|
45
46
|
ok_data << item
|
46
47
|
end
|
47
48
|
end
|
@@ -1,4 +1,4 @@
|
|
1
1
|
module SecondHandler
|
2
|
-
VERSION = '0.0.
|
3
|
-
DATE = '2015-10-
|
4
|
-
end
|
2
|
+
VERSION = '0.0.2'
|
3
|
+
DATE = '2015-10-25'
|
4
|
+
end
|
data/secondhandler.gemspec
CHANGED
@@ -6,11 +6,11 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.date = SecondHandler::DATE
|
7
7
|
s.executables << 'second_handler'
|
8
8
|
s.summary = ''
|
9
|
-
s.description = '
|
9
|
+
s.description = ''
|
10
10
|
s.authors = ['Sheng Jung Wu', 'Calvin Jeng', 'Henry Chang', 'Yi Wei Huang']
|
11
11
|
s.files = `git ls-files`.split("\n")
|
12
12
|
s.test_files = `git ls-files spec/*`.split("\n")
|
13
|
-
s.homepage = 'https://github.com/Smartibuy/
|
13
|
+
s.homepage = 'https://github.com/Smartibuy/ideate-and-scrape'
|
14
14
|
s.license = 'MIT'
|
15
15
|
|
16
16
|
# depend gem
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: secondHandler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sheng Jung Wu
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2015-10-
|
14
|
+
date: 2015-10-25 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: minitest
|
@@ -55,8 +55,7 @@ dependencies:
|
|
55
55
|
- - ">="
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: '0'
|
58
|
-
description:
|
59
|
-
and Facebook
|
58
|
+
description: ''
|
60
59
|
email:
|
61
60
|
executables:
|
62
61
|
- second_handler
|
@@ -72,7 +71,7 @@ files:
|
|
72
71
|
- lib/second_handler/version.rb
|
73
72
|
- secondhandler.gemspec
|
74
73
|
- spec/second_handler_spec.rb
|
75
|
-
homepage: https://github.com/Smartibuy/
|
74
|
+
homepage: https://github.com/Smartibuy/ideate-and-scrape
|
76
75
|
licenses:
|
77
76
|
- MIT
|
78
77
|
metadata: {}
|
@@ -92,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
91
|
version: '0'
|
93
92
|
requirements: []
|
94
93
|
rubyforge_project:
|
95
|
-
rubygems_version: 2.4.
|
94
|
+
rubygems_version: 2.4.6
|
96
95
|
signing_key:
|
97
96
|
specification_version: 4
|
98
97
|
summary: ''
|