fb_graph2 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/fb_graph2/collection.rb +4 -2
- data/lib/fb_graph2/edge.rb +1 -1
- data/lib/fb_graph2/edge/banned.rb +17 -0
- data/lib/fb_graph2/edge/offers.rb +5 -0
- data/lib/fb_graph2/friend_list.rb +0 -2
- data/lib/fb_graph2/offer.rb +2 -3
- data/lib/fb_graph2/user.rb +2 -0
- data/spec/fb_graph2/edge/applications_spec.rb +20 -0
- data/spec/fb_graph2/edge/attending_spec.rb +20 -0
- data/spec/fb_graph2/edge/banned_spec.rb +60 -0
- data/spec/fb_graph2/edge/blocked_spec.rb +1 -1
- data/spec/fb_graph2/edge/comments_spec.rb +1 -1
- data/spec/fb_graph2/edge/declined_spec.rb +20 -0
- data/spec/fb_graph2/edge/inbox_spec.rb +20 -0
- data/spec/fb_graph2/edge/invited_spec.rb +20 -0
- data/spec/fb_graph2/edge/maybe_spec.rb +20 -0
- data/spec/fb_graph2/edge/members_spec.rb +21 -0
- data/spec/fb_graph2/edge/noreply_spec.rb +20 -0
- data/spec/fb_graph2/edge/offers_spec.rb +35 -0
- data/spec/fb_graph2/edge/outbox_spec.rb +19 -0
- data/spec/fb_graph2/edge/roles_spec.rb +20 -0
- data/spec/fb_graph2/edge_spec.rb +1 -1
- data/spec/fb_graph2/page_spec.rb +7 -7
- data/spec/mock_json/app/banned.json +12 -0
- data/spec/mock_json/app/roles.json +10 -0
- data/spec/mock_json/event/attending.json +17 -0
- data/spec/mock_json/event/declined.json +17 -0
- data/spec/mock_json/event/invited.json +17 -0
- data/spec/mock_json/event/maybe.json +17 -0
- data/spec/mock_json/event/noreply.json +17 -0
- data/spec/mock_json/group/members.json +22 -0
- data/spec/mock_json/page/offers.json +19 -0
- data/spec/mock_json/user/applications.json +16 -0
- data/spec/mock_json/user/events.json +2 -2
- data/spec/mock_json/user/inbox.json +41 -0
- data/spec/mock_json/user/notifications.json +2 -2
- data/spec/mock_json/user/outbox.json +36 -0
- data/spec/mock_json/user/statuses.json +2 -2
- metadata +26 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f05a10f821a086f7ea190dbcc24779b6be74800
|
4
|
+
data.tar.gz: a5f88f9a3b0d588ad8cc347ea87d7981d68a3a9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02d5b41196ae8d6736e0573b8ea6140b397ae64657595c9f6b991d2b9e41363a64d9600600989771ae3b75d203ec249c420fa71654984289d37e3e179c297006
|
7
|
+
data.tar.gz: 99cc98fd43dd6f6a7f5923bd06f352a1ce8f136d335827cf09acf9b0f286e010ff8429a83e24f9527f5fa7f9c9992bedbd32c04d9b012762f7556ec30a5f54c4
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/lib/fb_graph2/collection.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module FbGraph2
|
2
2
|
class Collection < Array
|
3
|
-
attr_accessor :before, :after, :next, :previous, :
|
3
|
+
attr_accessor :before, :after, :next, :previous, :total_count, :summary
|
4
4
|
|
5
5
|
def initialize(collection = [])
|
6
6
|
collection = normalize collection
|
@@ -35,8 +35,10 @@ module FbGraph2
|
|
35
35
|
|
36
36
|
def summarize(summary)
|
37
37
|
self.summary = summary
|
38
|
-
self.order = summary.try(:[], :order)
|
39
38
|
self.total_count = summary.try(:[], :total_count)
|
39
|
+
if summary.try(:[], :updated_time)
|
40
|
+
self.summary[:updated_time] = Time.parse summary[:updated_time]
|
41
|
+
end
|
40
42
|
end
|
41
43
|
|
42
44
|
def params_in(url)
|
data/lib/fb_graph2/edge.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module FbGraph2
|
2
2
|
class Edge < Collection
|
3
3
|
attr_accessor :owner, :edge, :params, :options, :collection
|
4
|
-
delegate :
|
4
|
+
delegate :summary, :total_count, to: :collection
|
5
5
|
|
6
6
|
def initialize(owner, edge, params = {}, options = {})
|
7
7
|
self.owner = owner
|
@@ -7,6 +7,23 @@ module FbGraph2
|
|
7
7
|
User.new(user[:id], user).authenticate self.access_token
|
8
8
|
end
|
9
9
|
end
|
10
|
+
|
11
|
+
def banned?(user, params = {})
|
12
|
+
users = self.edge :banned, params, edge_scope: user
|
13
|
+
users.present?
|
14
|
+
end
|
15
|
+
|
16
|
+
def ban!(user, params = {})
|
17
|
+
self.post params.merge(
|
18
|
+
uid: Util.as_identifier(user)
|
19
|
+
), edge: :banned
|
20
|
+
end
|
21
|
+
|
22
|
+
def unban!(user, params = {})
|
23
|
+
self.delete params.merge(
|
24
|
+
uid: Util.as_identifier(user)
|
25
|
+
), edge: :banned
|
26
|
+
end
|
10
27
|
end
|
11
28
|
end
|
12
29
|
end
|
@@ -7,6 +7,11 @@ module FbGraph2
|
|
7
7
|
Offer.new(offer[:id], offer).authenticate self.access_token
|
8
8
|
end
|
9
9
|
end
|
10
|
+
|
11
|
+
def offer!(params = {})
|
12
|
+
offer = self.post params, edge: :offers
|
13
|
+
Offer.new(offer[:id], params.merge(offer)).authenticate self.access_token
|
14
|
+
end
|
10
15
|
end
|
11
16
|
end
|
12
17
|
end
|
data/lib/fb_graph2/offer.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
module FbGraph2
|
2
2
|
class Offer < Node
|
3
3
|
register_attributes(
|
4
|
-
raw: [:claim_limit, :coupon_type, :image_url, :
|
5
|
-
time: [:created_time, :expiration_time
|
6
|
-
timestamp: [:scheduled_publish_time],
|
4
|
+
raw: [:claim_limit, :coupon_type, :image_url, :redemption_code, :redemption_link, :terms, :title, :message],
|
5
|
+
time: [:created_time, :expiration_time],
|
7
6
|
page: [:from]
|
8
7
|
)
|
9
8
|
end
|
data/lib/fb_graph2/user.rb
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe FbGraph2::Edge::Applications do
|
4
|
+
context 'included in User' do
|
5
|
+
let(:me) { FbGraph2::User.me('token') }
|
6
|
+
|
7
|
+
describe '#applications' do
|
8
|
+
it 'should return an Array of FbGraph2::App' do
|
9
|
+
apps = mock_graph :get, 'me/applications/developer', 'user/applications', access_token: 'token' do
|
10
|
+
me.applications
|
11
|
+
end
|
12
|
+
apps.should be_instance_of FbGraph2::Edge
|
13
|
+
apps.should_not be_blank
|
14
|
+
apps.each do |app|
|
15
|
+
app.should be_instance_of FbGraph2::App
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe FbGraph2::Edge::Attending do
|
4
|
+
context 'included in Event' do
|
5
|
+
let(:event) { FbGraph2::Event.new('event_id').authenticate('token') }
|
6
|
+
|
7
|
+
describe '#attending' do
|
8
|
+
it 'should return an Array of FbGraph2::User' do
|
9
|
+
users = mock_graph :get, 'event_id/attending', 'event/attending', access_token: 'token' do
|
10
|
+
event.attending
|
11
|
+
end
|
12
|
+
users.should be_instance_of FbGraph2::Edge
|
13
|
+
users.should_not be_blank
|
14
|
+
users.each do |user|
|
15
|
+
user.should be_instance_of FbGraph2::User
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe FbGraph2::Edge::Banned do
|
4
|
+
context 'included in App' do
|
5
|
+
let(:app) { FbGraph2::App.app('app_token') }
|
6
|
+
let(:user_id) { 'user_id' }
|
7
|
+
let(:user) { FbGraph2::User.new(user_id) }
|
8
|
+
|
9
|
+
describe '#banned' do
|
10
|
+
it 'should return an Array of FbGraph2::User' do
|
11
|
+
users = mock_graph :get, 'app/banned', 'app/banned', access_token: 'app_token' do
|
12
|
+
app.banned
|
13
|
+
end
|
14
|
+
users.should be_instance_of FbGraph2::Edge
|
15
|
+
users.should_not be_blank
|
16
|
+
users.each do |user|
|
17
|
+
user.should be_instance_of FbGraph2::User
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
describe '#banned?' do
|
23
|
+
context 'when String given' do
|
24
|
+
it do
|
25
|
+
mock_graph :get, "app/banned/#{user_id}", 'app/banned', access_token: 'app_token' do
|
26
|
+
app.banned? user_id
|
27
|
+
end.should be true
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
context 'when FbGraph2::User given' do
|
32
|
+
it do
|
33
|
+
mock_graph :get, "app/banned/#{user_id}", 'app/banned', access_token: 'app_token' do
|
34
|
+
app.banned? user
|
35
|
+
end.should be true
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe '#ban!' do
|
41
|
+
it do
|
42
|
+
mock_graph :post, 'app/banned', 'true', access_token: 'app_token', params: {
|
43
|
+
uid: user_id
|
44
|
+
} do
|
45
|
+
app.ban! user
|
46
|
+
end.should be true
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
describe '#unban!' do
|
51
|
+
it do
|
52
|
+
mock_graph :delete, 'app/banned', 'true', access_token: 'app_token', params: {
|
53
|
+
uid: user_id
|
54
|
+
} do
|
55
|
+
app.unban! user
|
56
|
+
end.should be true
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -4,7 +4,7 @@ describe FbGraph2::Edge::Blocked do
|
|
4
4
|
context 'included in Page' do
|
5
5
|
let(:page) { FbGraph2::Page.new('page_id').authenticate('page_token') }
|
6
6
|
let(:user_id) { 'user_id' }
|
7
|
-
let(:user) { FbGraph2::
|
7
|
+
let(:user) { FbGraph2::User.new(user_id) }
|
8
8
|
|
9
9
|
describe '#blocked' do
|
10
10
|
it 'should return an Array of FbGraph2::User' do
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe FbGraph2::Edge::Declined do
|
4
|
+
context 'included in Event' do
|
5
|
+
let(:event) { FbGraph2::Event.new('event_id').authenticate('token') }
|
6
|
+
|
7
|
+
describe '#declined' do
|
8
|
+
it 'should return an Array of FbGraph2::User' do
|
9
|
+
users = mock_graph :get, 'event_id/declined', 'event/declined', access_token: 'token' do
|
10
|
+
event.declined
|
11
|
+
end
|
12
|
+
users.should be_instance_of FbGraph2::Edge
|
13
|
+
users.should_not be_blank
|
14
|
+
users.each do |user|
|
15
|
+
user.should be_instance_of FbGraph2::User
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe FbGraph2::Edge::Inbox do
|
4
|
+
context 'included in User' do
|
5
|
+
describe '#inbox' do
|
6
|
+
let(:me) { FbGraph2::User.me('token') }
|
7
|
+
it 'should return an Array of FbGraph2::Thread' do
|
8
|
+
threads = mock_graph :get, 'me/inbox', 'user/inbox', access_token: 'token' do
|
9
|
+
me.inbox
|
10
|
+
end
|
11
|
+
threads.should be_instance_of FbGraph2::Edge
|
12
|
+
threads.should_not be_blank
|
13
|
+
threads.each do |thread|
|
14
|
+
thread.should be_instance_of FbGraph2::Thread
|
15
|
+
end
|
16
|
+
threads.summary.should include unseen_count: 0, unread_count: 0, updated_time: Time.parse('2014-09-02T03:51:40+0000')
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe FbGraph2::Edge::Invited do
|
4
|
+
context 'included in Event' do
|
5
|
+
let(:event) { FbGraph2::Event.new('event_id').authenticate('token') }
|
6
|
+
|
7
|
+
describe '#invited' do
|
8
|
+
it 'should return an Array of FbGraph2::User' do
|
9
|
+
users = mock_graph :get, 'event_id/invited', 'event/invited', access_token: 'token' do
|
10
|
+
event.invited
|
11
|
+
end
|
12
|
+
users.should be_instance_of FbGraph2::Edge
|
13
|
+
users.should_not be_blank
|
14
|
+
users.each do |user|
|
15
|
+
user.should be_instance_of FbGraph2::User
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe FbGraph2::Edge::Maybe do
|
4
|
+
context 'included in Event' do
|
5
|
+
let(:event) { FbGraph2::Event.new('event_id').authenticate('token') }
|
6
|
+
|
7
|
+
describe '#maybe' do
|
8
|
+
it 'should return an Array of FbGraph2::User' do
|
9
|
+
users = mock_graph :get, 'event_id/maybe', 'event/maybe', access_token: 'token' do
|
10
|
+
event.maybe
|
11
|
+
end
|
12
|
+
users.should be_instance_of FbGraph2::Edge
|
13
|
+
users.should_not be_blank
|
14
|
+
users.each do |user|
|
15
|
+
user.should be_instance_of FbGraph2::User
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe FbGraph2::Edge::Members do
|
4
|
+
context 'included in Group' do
|
5
|
+
let(:group) { FbGraph2::Group.new('group_id').authenticate('token') }
|
6
|
+
|
7
|
+
describe '#invited' do
|
8
|
+
it 'should return an Array of FbGraph2::User' do
|
9
|
+
users = mock_graph :get, 'group_id/members', 'group/members', access_token: 'token' do
|
10
|
+
group.members
|
11
|
+
end
|
12
|
+
users.should be_instance_of FbGraph2::Edge
|
13
|
+
users.should_not be_blank
|
14
|
+
users.each do |user|
|
15
|
+
user.should be_instance_of FbGraph2::User
|
16
|
+
end
|
17
|
+
users.last.administrator.should be true
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe FbGraph2::Edge::Noreply do
|
4
|
+
context 'included in Event' do
|
5
|
+
let(:event) { FbGraph2::Event.new('event_id').authenticate('token') }
|
6
|
+
|
7
|
+
describe '#noreply' do
|
8
|
+
it 'should return an Array of FbGraph2::User' do
|
9
|
+
users = mock_graph :get, 'event_id/noreply', 'event/noreply', access_token: 'token' do
|
10
|
+
event.noreply
|
11
|
+
end
|
12
|
+
users.should be_instance_of FbGraph2::Edge
|
13
|
+
users.should_not be_blank
|
14
|
+
users.each do |user|
|
15
|
+
user.should be_instance_of FbGraph2::User
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe FbGraph2::Edge::Offers do
|
4
|
+
context 'included in Page' do
|
5
|
+
let(:page) { FbGraph2::Page.new('page_id').authenticate('page_token') }
|
6
|
+
|
7
|
+
describe '#offers' do
|
8
|
+
it 'should return an Array of FbGraph2::Offer' do
|
9
|
+
offers = mock_graph :get, 'page_id/offers', 'page/offers', access_token: 'page_token' do
|
10
|
+
page.offers
|
11
|
+
end
|
12
|
+
offers.should be_instance_of FbGraph2::Edge
|
13
|
+
offers.should_not be_blank
|
14
|
+
offers.each do |offer|
|
15
|
+
offer.should be_instance_of FbGraph2::Offer
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe '#offer!' do
|
21
|
+
it 'should return FbGraph2::Offer' do
|
22
|
+
offer = mock_graph :post, 'page_id/offers', 'success_with_id', access_token: 'page_token', params: {
|
23
|
+
title: 'Foobar',
|
24
|
+
expiration_time: 10.days.from_now.to_s
|
25
|
+
} do
|
26
|
+
page.offer!(
|
27
|
+
title: 'Foobar',
|
28
|
+
expiration_time: 10.days.from_now
|
29
|
+
)
|
30
|
+
end
|
31
|
+
offer.should be_instance_of FbGraph2::Offer
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe FbGraph2::Edge::Outbox do
|
4
|
+
context 'included in User' do
|
5
|
+
describe '#outbox' do
|
6
|
+
let(:me) { FbGraph2::User.me('token') }
|
7
|
+
it 'should return an Array of FbGraph2::Thread' do
|
8
|
+
threads = mock_graph :get, 'me/outbox', 'user/outbox', access_token: 'token' do
|
9
|
+
me.outbox
|
10
|
+
end
|
11
|
+
threads.should be_instance_of FbGraph2::Edge
|
12
|
+
threads.should_not be_blank
|
13
|
+
threads.each do |thread|
|
14
|
+
thread.should be_instance_of FbGraph2::Thread
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe FbGraph2::Edge::Roles do
|
4
|
+
context 'included in App' do
|
5
|
+
let(:app) { FbGraph2::App.app('app_token') }
|
6
|
+
|
7
|
+
describe '#roles' do
|
8
|
+
it 'should return an Array of FbGraph2::Struct::Role' do
|
9
|
+
roles = mock_graph :get, 'app/roles', 'app/roles', access_token: 'app_token' do
|
10
|
+
app.roles
|
11
|
+
end
|
12
|
+
roles.should be_instance_of FbGraph2::Edge
|
13
|
+
roles.should_not be_blank
|
14
|
+
roles.each do |role|
|
15
|
+
role.should be_instance_of FbGraph2::Struct::Role
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/spec/fb_graph2/edge_spec.rb
CHANGED
data/spec/fb_graph2/page_spec.rb
CHANGED
@@ -24,37 +24,37 @@ describe FbGraph2::Page do
|
|
24
24
|
describe '#parking' do
|
25
25
|
subject { page.parking }
|
26
26
|
[:street, :lot, :valet].each do |key|
|
27
|
-
its(key) { should
|
27
|
+
its(key) { should be false }
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
31
|
describe '#restaurant_services' do
|
32
32
|
subject { page.restaurant_services }
|
33
33
|
[:kids, :delivery, :catering, :waiter, :outdoor, :takeout].each do |key|
|
34
|
-
its(key) { should
|
34
|
+
its(key) { should be false }
|
35
35
|
end
|
36
36
|
[:groups, :reserve, :walkins].each do |key|
|
37
|
-
its(key) { should
|
37
|
+
its(key) { should be true }
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
41
|
describe '#restaurant_specialties' do
|
42
42
|
subject { page.restaurant_specialties }
|
43
43
|
[:coffee, :drinks, :breakfast, :lunch].each do |key|
|
44
|
-
its(key) { should
|
44
|
+
its(key) { should be false }
|
45
45
|
end
|
46
46
|
[:dinner].each do |key|
|
47
|
-
its(key) { should
|
47
|
+
its(key) { should be true }
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
51
|
describe '#payment_options' do
|
52
52
|
subject { page.payment_options }
|
53
53
|
[:cash_only, :discover].each do |key|
|
54
|
-
its(key) { should
|
54
|
+
its(key) { should be false }
|
55
55
|
end
|
56
56
|
[:amex, :mastercard, :visa].each do |key|
|
57
|
-
its(key) { should
|
57
|
+
its(key) { should be true }
|
58
58
|
end
|
59
59
|
end
|
60
60
|
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
{
|
2
|
+
"data": [{
|
3
|
+
"app_id": "210798282372757",
|
4
|
+
"user": "579612276",
|
5
|
+
"role": "administrators"
|
6
|
+
}],
|
7
|
+
"paging": {
|
8
|
+
"next": "https://graph.facebook.com/v2.1/210798282372757/roles?limit=5000&offset=5000&__after_id=enc_AezKeljwOb-ajJmD2AAQnxKG4ppLUt__oG9ScW9Um9PcjIxWf1zs1-LbrM8skz4rDAVCAQxs3SO_-GeS6OnwPJNA"
|
9
|
+
}
|
10
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"data": [{
|
3
|
+
"name": "Akira Otaishi",
|
4
|
+
"rsvp_status": "attending",
|
5
|
+
"id": "553375548107883"
|
6
|
+
}, {
|
7
|
+
"name": "Shin-ichiro Kagaya",
|
8
|
+
"rsvp_status": "attending",
|
9
|
+
"id": "241546062702044"
|
10
|
+
}],
|
11
|
+
"paging": {
|
12
|
+
"cursors": {
|
13
|
+
"after": "TVRBd01EQXdNRFl6TWpjME1qSTBPakUwTVRBMU1UQTJNREE2TVRZMU1EZzBPRGsyT0RRNE5UZ3g=",
|
14
|
+
"before": "TVRBd01EQXpNRFl6TWpjM01qTXhPakUwTVRBMU1UQTJNREE2TVRjMk9UQTRNVE0xTmpnM09UWXg="
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"data": [{
|
3
|
+
"name": "Akira Otaishi",
|
4
|
+
"rsvp_status": "attending",
|
5
|
+
"id": "553375548107883"
|
6
|
+
}, {
|
7
|
+
"name": "Shin-ichiro Kagaya",
|
8
|
+
"rsvp_status": "attending",
|
9
|
+
"id": "241546062702044"
|
10
|
+
}],
|
11
|
+
"paging": {
|
12
|
+
"cursors": {
|
13
|
+
"after": "TVRBd01EQXdNRFl6TWpjME1qSTBPakUwTVRBMU1UQTJNREE2TVRZMU1EZzBPRGsyT0RRNE5UZ3g=",
|
14
|
+
"before": "TVRBd01EQXpNRFl6TWpjM01qTXhPakUwTVRBMU1UQTJNREE2TVRjMk9UQTRNVE0xTmpnM09UWXg="
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"data": [{
|
3
|
+
"name": "Akira Otaishi",
|
4
|
+
"rsvp_status": "attending",
|
5
|
+
"id": "553375548107883"
|
6
|
+
}, {
|
7
|
+
"name": "Shin-ichiro Kagaya",
|
8
|
+
"rsvp_status": "attending",
|
9
|
+
"id": "241546062702044"
|
10
|
+
}],
|
11
|
+
"paging": {
|
12
|
+
"cursors": {
|
13
|
+
"after": "TVRBd01EQXdNRFl6TWpjME1qSTBPakUwTVRBMU1UQTJNREE2TVRZMU1EZzBPRGsyT0RRNE5UZ3g=",
|
14
|
+
"before": "TVRBd01EQXpNRFl6TWpjM01qTXhPakUwTVRBMU1UQTJNREE2TVRjMk9UQTRNVE0xTmpnM09UWXg="
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"data": [{
|
3
|
+
"name": "Akira Otaishi",
|
4
|
+
"rsvp_status": "attending",
|
5
|
+
"id": "553375548107883"
|
6
|
+
}, {
|
7
|
+
"name": "Shin-ichiro Kagaya",
|
8
|
+
"rsvp_status": "attending",
|
9
|
+
"id": "241546062702044"
|
10
|
+
}],
|
11
|
+
"paging": {
|
12
|
+
"cursors": {
|
13
|
+
"after": "TVRBd01EQXdNRFl6TWpjME1qSTBPakUwTVRBMU1UQTJNREE2TVRZMU1EZzBPRGsyT0RRNE5UZ3g=",
|
14
|
+
"before": "TVRBd01EQXpNRFl6TWpjM01qTXhPakUwTVRBMU1UQTJNREE2TVRjMk9UQTRNVE0xTmpnM09UWXg="
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"data": [{
|
3
|
+
"name": "Akira Otaishi",
|
4
|
+
"rsvp_status": "attending",
|
5
|
+
"id": "553375548107883"
|
6
|
+
}, {
|
7
|
+
"name": "Shin-ichiro Kagaya",
|
8
|
+
"rsvp_status": "attending",
|
9
|
+
"id": "241546062702044"
|
10
|
+
}],
|
11
|
+
"paging": {
|
12
|
+
"cursors": {
|
13
|
+
"after": "TVRBd01EQXdNRFl6TWpjME1qSTBPakUwTVRBMU1UQTJNREE2TVRZMU1EZzBPRGsyT0RRNE5UZ3g=",
|
14
|
+
"before": "TVRBd01EQXpNRFl6TWpjM01qTXhPakUwTVRBMU1UQTJNREE2TVRjMk9UQTRNVE0xTmpnM09UWXg="
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"data": [
|
3
|
+
{
|
4
|
+
"name": "Hayashi Tatsuya",
|
5
|
+
"administrator": false,
|
6
|
+
"id": "10152167763779825"
|
7
|
+
},
|
8
|
+
{
|
9
|
+
"name": "Ryo Ito",
|
10
|
+
"administrator": false,
|
11
|
+
"id": "10203204372262716"
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"name": "Nov Matake",
|
15
|
+
"administrator": true,
|
16
|
+
"id": "579612276"
|
17
|
+
}
|
18
|
+
],
|
19
|
+
"paging": {
|
20
|
+
"next": "https://graph.facebook.com/v2.1/343659285716553/members?limit=5000&offset=5000&__after_id=***"
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
{
|
2
|
+
"data": [{
|
3
|
+
"id": "797106500309744",
|
4
|
+
"from": {
|
5
|
+
"category": "Software",
|
6
|
+
"name": "FbGraph",
|
7
|
+
"id": "117513961602338"
|
8
|
+
},
|
9
|
+
"title": "Foobar",
|
10
|
+
"created_time": "2014-09-02T09:56:14+0000",
|
11
|
+
"expiration_time": "2014-09-12T14:59:59+0000",
|
12
|
+
"image_url": "https:\/\/fbcdn-profile-a.akamaihd.net\/hprofile-ak-xap1\/v\/t1.0-1\/p200x200\/12758_485082394845491_483124061_n.png?oh=ffdf2fc204852be4167eebaeb7f1b2ec&oe=54733980&__gda__=1415926027_bbf6edaad90b94e23268131e6d8f258b",
|
13
|
+
"claim_limit": 1000000000,
|
14
|
+
"coupon_type": "in_store_only"
|
15
|
+
}],
|
16
|
+
"paging": {
|
17
|
+
"next": "https:\/\/graph.facebook.com\/v2.0\/117513961602338\/offers?limit=50&offset=50&__after_id=enc_Aey48t-R5OQbq6nWOeyBEJKEHiddR7mdWX_5Pg0nBoVbmDoe_Lr4d_5XIg4vhahIQ7oFJzHsY8P91oMo_GD_ZrNy"
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"data": [{
|
3
|
+
"name": "gem sample",
|
4
|
+
"namespace": "gem-sample",
|
5
|
+
"id": "210798282372757"
|
6
|
+
}, {
|
7
|
+
"name": "Localhost",
|
8
|
+
"id": "158245434257042"
|
9
|
+
}, {
|
10
|
+
"name": "OAuth.jp",
|
11
|
+
"id": "126213067419995"
|
12
|
+
}],
|
13
|
+
"paging": {
|
14
|
+
"next": "https://graph.facebook.com/v2.1/579612276/applications?type=developer&limit=25&offset=25&__after_id=***"
|
15
|
+
}
|
16
|
+
}
|
@@ -10,7 +10,7 @@
|
|
10
10
|
}
|
11
11
|
],
|
12
12
|
"paging": {
|
13
|
-
"previous": "https://graph.facebook.com/v2.0/579612276/events?limit=25&since=1402653600&__paging_token
|
14
|
-
"next": "https://graph.facebook.com/v2.0/579612276/events?limit=25&until=1402653600&__paging_token
|
13
|
+
"previous": "https://graph.facebook.com/v2.0/579612276/events?limit=25&since=1402653600&__paging_token=***",
|
14
|
+
"next": "https://graph.facebook.com/v2.0/579612276/events?limit=25&until=1402653600&__paging_token=***"
|
15
15
|
}
|
16
16
|
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
{
|
2
|
+
"data": [{
|
3
|
+
"id": "741737742539677",
|
4
|
+
"to": {
|
5
|
+
"data": [{
|
6
|
+
"id": "579612276",
|
7
|
+
"name": "Nov Matake"
|
8
|
+
}, {
|
9
|
+
"id": "10152167763779825",
|
10
|
+
"name": "Hayashi Tatsuya"
|
11
|
+
}]
|
12
|
+
},
|
13
|
+
"updated_time": "2014-09-02T03:51:40+0000",
|
14
|
+
"unread": 0,
|
15
|
+
"unseen": 0,
|
16
|
+
"comments": {
|
17
|
+
"data": [{
|
18
|
+
"id": "741737742539677_1409625688",
|
19
|
+
"from": {
|
20
|
+
"id": "579612276",
|
21
|
+
"name": "Nov Matake"
|
22
|
+
},
|
23
|
+
"message": "ヒゲキョクチョ",
|
24
|
+
"created_time": "2014-09-02T02:41:28+0000"
|
25
|
+
}],
|
26
|
+
"paging": {
|
27
|
+
"previous": "https://graph.facebook.com/v2.1/741737742539677/comments?limit=25&since=1409629900&__paging_token=***",
|
28
|
+
"next": "https://graph.facebook.com/v2.1/741737742539677/comments?limit=25&until=1409625439&__paging_token=***"
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}],
|
32
|
+
"paging": {
|
33
|
+
"previous": "https://graph.facebook.com/v2.1/579612276/inbox?limit=25&since=1409629900&__paging_token=***",
|
34
|
+
"next": "https://graph.facebook.com/v2.1/579612276/inbox?limit=25&until=1403524175&__paging_token=***"
|
35
|
+
},
|
36
|
+
"summary": {
|
37
|
+
"unseen_count": 0,
|
38
|
+
"unread_count": 0,
|
39
|
+
"updated_time": "2014-09-02T03:51:40+0000"
|
40
|
+
}
|
41
|
+
}
|
@@ -39,7 +39,7 @@
|
|
39
39
|
"unread": 1
|
40
40
|
}],
|
41
41
|
"paging": {
|
42
|
-
"previous": "https://graph.facebook.com/v2.1/579612276/notifications?limit=5000&since=1409272999&__paging_token
|
43
|
-
"next": "https://graph.facebook.com/v2.1/579612276/notifications?limit=5000&until=1408919679&__paging_token
|
42
|
+
"previous": "https://graph.facebook.com/v2.1/579612276/notifications?limit=5000&since=1409272999&__paging_token=***",
|
43
|
+
"next": "https://graph.facebook.com/v2.1/579612276/notifications?limit=5000&until=1408919679&__paging_token=***"
|
44
44
|
}
|
45
45
|
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
{
|
2
|
+
"data": [{
|
3
|
+
"id": "741737742539677",
|
4
|
+
"to": {
|
5
|
+
"data": [{
|
6
|
+
"id": "579612276",
|
7
|
+
"name": "Nov Matake"
|
8
|
+
}, {
|
9
|
+
"id": "10152167763779825",
|
10
|
+
"name": "Hayashi Tatsuya"
|
11
|
+
}]
|
12
|
+
},
|
13
|
+
"updated_time": "2014-09-02T03:51:40+0000",
|
14
|
+
"unread": 0,
|
15
|
+
"unseen": 0,
|
16
|
+
"comments": {
|
17
|
+
"data": [{
|
18
|
+
"id": "741737742539677_1409625688",
|
19
|
+
"from": {
|
20
|
+
"id": "579612276",
|
21
|
+
"name": "Nov Matake"
|
22
|
+
},
|
23
|
+
"message": "ヒゲキョクチョ",
|
24
|
+
"created_time": "2014-09-02T02:41:28+0000"
|
25
|
+
}],
|
26
|
+
"paging": {
|
27
|
+
"previous": "https://graph.facebook.com/v2.1/741737742539677/comments?limit=25&since=1409629900&__paging_token=***",
|
28
|
+
"next": "https://graph.facebook.com/v2.1/741737742539677/comments?limit=25&until=1409625439&__paging_token=***"
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}],
|
32
|
+
"paging": {
|
33
|
+
"previous": "https://graph.facebook.com/v2.1/579612276/outbox?limit=25&since=1409629900&__paging_token=***",
|
34
|
+
"next": "https://graph.facebook.com/v2.1/579612276/outbox?limit=25&until=1403014440&__paging_token=***"
|
35
|
+
}
|
36
|
+
}
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"updated_time": "2014-06-03T06:27:20+0000"
|
10
10
|
}],
|
11
11
|
"paging": {
|
12
|
-
"previous": "https://graph.facebook.com/v2.0/579612276/statuses?limit=25&since=1401776840&__paging_token
|
13
|
-
"next": "https://graph.facebook.com/v2.0/579612276/statuses?limit=25&until=1384770778&__paging_token
|
12
|
+
"previous": "https://graph.facebook.com/v2.0/579612276/statuses?limit=25&since=1401776840&__paging_token=***",
|
13
|
+
"next": "https://graph.facebook.com/v2.0/579612276/statuses?limit=25&until=1384770778&__paging_token=***"
|
14
14
|
}
|
15
15
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fb_graph2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nov matake
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -291,29 +291,41 @@ files:
|
|
291
291
|
- spec/fb_graph2/edge/activities_spec.rb
|
292
292
|
- spec/fb_graph2/edge/admins_spec.rb
|
293
293
|
- spec/fb_graph2/edge/albums_spec.rb
|
294
|
+
- spec/fb_graph2/edge/applications_spec.rb
|
295
|
+
- spec/fb_graph2/edge/attending_spec.rb
|
296
|
+
- spec/fb_graph2/edge/banned_spec.rb
|
294
297
|
- spec/fb_graph2/edge/blocked_spec.rb
|
295
298
|
- spec/fb_graph2/edge/books_spec.rb
|
296
299
|
- spec/fb_graph2/edge/comments_spec.rb
|
300
|
+
- spec/fb_graph2/edge/declined_spec.rb
|
297
301
|
- spec/fb_graph2/edge/events_spec.rb
|
298
302
|
- spec/fb_graph2/edge/feed_spec.rb
|
299
303
|
- spec/fb_graph2/edge/friend_lists_spec.rb
|
300
304
|
- spec/fb_graph2/edge/friends_spec.rb
|
301
305
|
- spec/fb_graph2/edge/groups_spec.rb
|
302
306
|
- spec/fb_graph2/edge/home_spec.rb
|
307
|
+
- spec/fb_graph2/edge/inbox_spec.rb
|
303
308
|
- spec/fb_graph2/edge/interests_spec.rb
|
304
309
|
- spec/fb_graph2/edge/invitable_friends_spec.rb
|
310
|
+
- spec/fb_graph2/edge/invited_spec.rb
|
305
311
|
- spec/fb_graph2/edge/likes_spec.rb
|
306
312
|
- spec/fb_graph2/edge/links_spec.rb
|
313
|
+
- spec/fb_graph2/edge/maybe_spec.rb
|
314
|
+
- spec/fb_graph2/edge/members_spec.rb
|
307
315
|
- spec/fb_graph2/edge/milestones_spec.rb
|
308
316
|
- spec/fb_graph2/edge/movies_spec.rb
|
309
317
|
- spec/fb_graph2/edge/music_spec.rb
|
318
|
+
- spec/fb_graph2/edge/noreply_spec.rb
|
310
319
|
- spec/fb_graph2/edge/notifications_spec.rb
|
320
|
+
- spec/fb_graph2/edge/offers_spec.rb
|
321
|
+
- spec/fb_graph2/edge/outbox_spec.rb
|
311
322
|
- spec/fb_graph2/edge/permissions_spec.rb
|
312
323
|
- spec/fb_graph2/edge/photos_spec.rb
|
313
324
|
- spec/fb_graph2/edge/picture_spec.rb
|
314
325
|
- spec/fb_graph2/edge/pokes_spec.rb
|
315
326
|
- spec/fb_graph2/edge/posts_spec.rb
|
316
327
|
- spec/fb_graph2/edge/promotable_posts_spec.rb
|
328
|
+
- spec/fb_graph2/edge/roles_spec.rb
|
317
329
|
- spec/fb_graph2/edge/scores_spec.rb
|
318
330
|
- spec/fb_graph2/edge/shared_posts_spec.rb
|
319
331
|
- spec/fb_graph2/edge/statuses_spec.rb
|
@@ -332,16 +344,25 @@ files:
|
|
332
344
|
- spec/fb_graph2/util_spec.rb
|
333
345
|
- spec/fb_graph2_spec.rb
|
334
346
|
- spec/mock_json/app/app.json
|
347
|
+
- spec/mock_json/app/banned.json
|
348
|
+
- spec/mock_json/app/roles.json
|
335
349
|
- spec/mock_json/app/subscriptions.json
|
336
350
|
- spec/mock_json/app/test_users.json
|
337
351
|
- spec/mock_json/blank_collection.json
|
338
352
|
- spec/mock_json/error/400/191.json
|
339
353
|
- spec/mock_json/error/400/2500.json
|
340
354
|
- spec/mock_json/error/invalid_format.json
|
355
|
+
- spec/mock_json/event/attending.json
|
356
|
+
- spec/mock_json/event/declined.json
|
357
|
+
- spec/mock_json/event/invited.json
|
358
|
+
- spec/mock_json/event/maybe.json
|
359
|
+
- spec/mock_json/event/noreply.json
|
360
|
+
- spec/mock_json/group/members.json
|
341
361
|
- spec/mock_json/page/admins.json
|
342
362
|
- spec/mock_json/page/block_succeeded.json
|
343
363
|
- spec/mock_json/page/blocked.json
|
344
364
|
- spec/mock_json/page/milestones.json
|
365
|
+
- spec/mock_json/page/offers.json
|
345
366
|
- spec/mock_json/page/promotable_posts.json
|
346
367
|
- spec/mock_json/page/with_optional_fields.json
|
347
368
|
- spec/mock_json/post/comments.json
|
@@ -357,6 +378,7 @@ files:
|
|
357
378
|
- spec/mock_json/user/achievements.json
|
358
379
|
- spec/mock_json/user/activities.json
|
359
380
|
- spec/mock_json/user/albums.json
|
381
|
+
- spec/mock_json/user/applications.json
|
360
382
|
- spec/mock_json/user/books.json
|
361
383
|
- spec/mock_json/user/events.json
|
362
384
|
- spec/mock_json/user/feed.json
|
@@ -364,6 +386,7 @@ files:
|
|
364
386
|
- spec/mock_json/user/friends.json
|
365
387
|
- spec/mock_json/user/groups.json
|
366
388
|
- spec/mock_json/user/home.json
|
389
|
+
- spec/mock_json/user/inbox.json
|
367
390
|
- spec/mock_json/user/interests.json
|
368
391
|
- spec/mock_json/user/invitable_friends.json
|
369
392
|
- spec/mock_json/user/likes.json
|
@@ -373,6 +396,7 @@ files:
|
|
373
396
|
- spec/mock_json/user/movies.json
|
374
397
|
- spec/mock_json/user/music.json
|
375
398
|
- spec/mock_json/user/notifications.json
|
399
|
+
- spec/mock_json/user/outbox.json
|
376
400
|
- spec/mock_json/user/permissions.json
|
377
401
|
- spec/mock_json/user/photos.json
|
378
402
|
- spec/mock_json/user/picture.json
|