fb_graph2 0.0.10 → 0.0.11
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/VERSION +1 -1
- data/lib/fb_graph2/attribute_assigner.rb +5 -1
- data/lib/fb_graph2/node.rb +8 -1
- data/lib/fb_graph2/page.rb +1 -1
- data/lib/fb_graph2/struct/device.rb +9 -0
- data/lib/fb_graph2/struct/education.rb +1 -1
- data/lib/fb_graph2/user.rb +14 -5
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4f60a4edc36068c5e05c3b7e63431744ab0da6c
|
4
|
+
data.tar.gz: b5fa5048e0e41fe3f9264038dc3c028ab323a086
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e07ffef61980cc47920ef52472d7000bd54879f45fa48eb4d4734622d86d03e906b39140971efd9943c601bc90207fa2b34e2e6368e950517f31d98ea720a4c
|
7
|
+
data.tar.gz: 5c3e5d12925f9e802522438446c609d6a82cf28b2e413c7c77db62967285c45ff78ad8f65dabee1681b46d7f3ec519936fc7ff689709fa8a8e44ede8222437cc
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.11
|
@@ -29,7 +29,7 @@ module FbGraph2
|
|
29
29
|
when :date
|
30
30
|
Date.strptime raw, '%m/%d/%Y' rescue raw
|
31
31
|
when :time
|
32
|
-
Time.parse raw
|
32
|
+
Time.parse raw rescue raw
|
33
33
|
when :timestamp
|
34
34
|
Time.at raw
|
35
35
|
when :actions
|
@@ -70,6 +70,10 @@ module FbGraph2
|
|
70
70
|
end
|
71
71
|
when :user
|
72
72
|
User.new raw[:id], raw
|
73
|
+
when :users
|
74
|
+
Collection.new(raw).collect do |_raw_|
|
75
|
+
User.new _raw_[:id], _raw_
|
76
|
+
end
|
73
77
|
else
|
74
78
|
# NOTE: handle these attributes in each class
|
75
79
|
next
|
data/lib/fb_graph2/node.rb
CHANGED
@@ -96,7 +96,14 @@ module FbGraph2
|
|
96
96
|
end
|
97
97
|
|
98
98
|
def build_params(params = {})
|
99
|
-
params.present?
|
99
|
+
if params.present?
|
100
|
+
if params.include? :fields
|
101
|
+
params[:fields] = Array(params[:fields]).join(',')
|
102
|
+
end
|
103
|
+
params
|
104
|
+
else
|
105
|
+
nil
|
106
|
+
end
|
100
107
|
end
|
101
108
|
|
102
109
|
def handle_response
|
data/lib/fb_graph2/page.rb
CHANGED
data/lib/fb_graph2/user.rb
CHANGED
@@ -39,7 +39,7 @@ module FbGraph2
|
|
39
39
|
|
40
40
|
register_attributes(
|
41
41
|
raw: [
|
42
|
-
:about, :bio, :email, :first_name, :gender, :installed, :is_verified, :link, :locale,
|
42
|
+
:about, :bio, :email, :first_name, :gender, :installed, :is_verified, :last_name, :link, :locale,
|
43
43
|
:middle_name, :name, :name_format, :political, :quotes, :relationship_status, :religion,
|
44
44
|
:timezone, :third_party_id, :verified, :website,
|
45
45
|
# NOTE: in family edge context
|
@@ -64,7 +64,7 @@ module FbGraph2
|
|
64
64
|
:tagging_user
|
65
65
|
],
|
66
66
|
photo: [:cover],
|
67
|
-
custom: [:age_range, :context, :currency, :education, :work]
|
67
|
+
custom: [:age_range, :context, :currency, :devices, :education, :work]
|
68
68
|
)
|
69
69
|
|
70
70
|
def initialize(id, attributes = {})
|
@@ -78,11 +78,20 @@ module FbGraph2
|
|
78
78
|
if attributes.include? :currency
|
79
79
|
self.currency = Struct::Currency.new attributes[:currency]
|
80
80
|
end
|
81
|
+
if attributes.include? :devices
|
82
|
+
self.devices = attributes[:devices].collect do |device|
|
83
|
+
Struct::Device.new device
|
84
|
+
end
|
85
|
+
end
|
81
86
|
if attributes.include? :education
|
82
|
-
self.education =
|
87
|
+
self.education = attributes[:education].collect do |education|
|
88
|
+
Struct::Education.new education
|
89
|
+
end
|
83
90
|
end
|
84
91
|
if attributes.include? :work
|
85
|
-
self.work =
|
92
|
+
self.work = attributes[:work].collect do |work|
|
93
|
+
Struct::Work.new work
|
94
|
+
end
|
86
95
|
end
|
87
96
|
end
|
88
97
|
|
@@ -90,4 +99,4 @@ module FbGraph2
|
|
90
99
|
new(:me).authenticate access_token
|
91
100
|
end
|
92
101
|
end
|
93
|
-
end
|
102
|
+
end
|
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.0.
|
4
|
+
version: 0.0.11
|
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-
|
11
|
+
date: 2014-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -256,6 +256,7 @@ files:
|
|
256
256
|
- lib/fb_graph2/struct/app_link.rb
|
257
257
|
- lib/fb_graph2/struct/context.rb
|
258
258
|
- lib/fb_graph2/struct/currency.rb
|
259
|
+
- lib/fb_graph2/struct/device.rb
|
259
260
|
- lib/fb_graph2/struct/education.rb
|
260
261
|
- lib/fb_graph2/struct/group_file.rb
|
261
262
|
- lib/fb_graph2/struct/image_source.rb
|