facegroups 0.5.0 → 0.6.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/Gemfile.lock +1 -1
- data/lib/facegroups/fb_api.rb +4 -6
- data/lib/facegroups/group.rb +2 -3
- data/lib/facegroups/version.rb +1 -1
- data/spec/facegroups_spec.rb +6 -6
- data/spec/fixtures/cassettes/facebook_api.yml +4 -4
- 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: 3e8f41736cdb85fec7b1349bf2f64fe4afb4f557
|
|
4
|
+
data.tar.gz: 8ed4f0f04d7beb13660571e5d8ea1ec0450b320b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 04e90b92efdb18cba02f9b26543a95a7257a7d33bfe37838c3fad560ee0593dda69a426ecc360dabb076c0124ab1f59bdd78f3fc4afdbfe161ae06cc16fbcf23
|
|
7
|
+
data.tar.gz: 095d23ab0c7c784c46db419fa18faf760e2ec0438c61b64fa7c8e1cc90e6ece79fe4865247a8d9959d66fdc74e33a0743683ca5d9d4b9f394e603766102276ca
|
data/Gemfile.lock
CHANGED
data/lib/facegroups/fb_api.rb
CHANGED
|
@@ -11,12 +11,10 @@ module FaceGroups
|
|
|
11
11
|
TOKEN_KEY = 'fbapi_access_token'
|
|
12
12
|
|
|
13
13
|
GRAPH_QUERY = {
|
|
14
|
-
group:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
'name,message,updated_time,created_time,'\
|
|
19
|
-
'attachments{title,description,url,media}'
|
|
14
|
+
group: 'id,name,feed{name,message,updated_time,created_time,'\
|
|
15
|
+
'attachments{title,description,url,media}}',
|
|
16
|
+
posting: 'name,message,updated_time,created_time,'\
|
|
17
|
+
'attachments{title,description,url,media}'
|
|
20
18
|
}.freeze
|
|
21
19
|
|
|
22
20
|
def self.access_token
|
data/lib/facegroups/group.rb
CHANGED
|
@@ -18,9 +18,8 @@ module FaceGroups
|
|
|
18
18
|
group_data.include?('error') ? nil : new(group_data: group_data)
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
def
|
|
22
|
-
|
|
23
|
-
Time.parse(latest_postings.first['updated_time'])
|
|
21
|
+
def latest_postings
|
|
22
|
+
FbApi.newest_group_postings(id)
|
|
24
23
|
end
|
|
25
24
|
end
|
|
26
25
|
end
|
data/lib/facegroups/version.rb
CHANGED
data/spec/facegroups_spec.rb
CHANGED
|
@@ -57,12 +57,12 @@ describe 'Finding Group Information' do
|
|
|
57
57
|
end
|
|
58
58
|
end
|
|
59
59
|
|
|
60
|
-
describe 'Checking Latest
|
|
61
|
-
it '(HAPPY) should get the latest
|
|
62
|
-
group = FaceGroups::Group.find(id:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
describe 'Checking Latest Postings on Group Feed' do
|
|
61
|
+
it '(HAPPY) should get only the latest postings time from a group feed' do
|
|
62
|
+
group = FaceGroups::Group.find(id: ENV['FB_GROUP_ID'])
|
|
63
|
+
latest_postings = group.latest_postings
|
|
64
|
+
latest_postings.count.must_be :>=, 10
|
|
65
|
+
latest_postings.count.must_be :<=, 25
|
|
66
66
|
end
|
|
67
67
|
end
|
|
68
68
|
end
|
|
@@ -31,13 +31,13 @@ http_interactions:
|
|
|
31
31
|
Content-Type:
|
|
32
32
|
- application/json; charset=UTF-8
|
|
33
33
|
X-Fb-Trace-Id:
|
|
34
|
-
-
|
|
34
|
+
- Bm/5xNVX6AD
|
|
35
35
|
X-Fb-Rev:
|
|
36
36
|
- '2714680'
|
|
37
37
|
X-Fb-Debug:
|
|
38
|
-
-
|
|
38
|
+
- KzjD6HZIj/DQKG2dedE3r8CwIB51QIu+wQSy+r/rHHxEoP0VbUFiFTLM1hDKHM7okcIpfeVQDrLpUB1U66WeZQ==
|
|
39
39
|
Date:
|
|
40
|
-
- Fri, 02 Dec 2016
|
|
40
|
+
- Fri, 02 Dec 2016 06:17:44 GMT
|
|
41
41
|
Connection:
|
|
42
42
|
- close
|
|
43
43
|
Content-Length:
|
|
@@ -46,5 +46,5 @@ http_interactions:
|
|
|
46
46
|
encoding: UTF-8
|
|
47
47
|
string: '{"access_token":"<ACCESS_TOKEN>","token_type":"bearer"}'
|
|
48
48
|
http_version:
|
|
49
|
-
recorded_at: Fri, 02 Dec 2016
|
|
49
|
+
recorded_at: Fri, 02 Dec 2016 06:17:42 GMT
|
|
50
50
|
recorded_with: VCR 3.0.3
|