fb_graph2 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b2b9b9ad7cc7f2a67a303299d8e7c5cf5ebe340
4
- data.tar.gz: 63f1e3cf00cb81bd7bef711ca63a4d95df3cff9a
3
+ metadata.gz: 36118b88d2a643fbdb24e008836464a7ad2a990b
4
+ data.tar.gz: 456e43dc3fc30c68e405eb50cb837387aff0935b
5
5
  SHA512:
6
- metadata.gz: e565d948fbdd173babbdf36ee32c7cadb063c9f06e26d6de5b8bb8fdf37380cd844c03dad45f754f8cb2f7f7a95831dc4e1138bcc036774e051838035299bf90
7
- data.tar.gz: b25b43d048747bf8c276d5a04ed2aba6cf25d82068bc2b599e204daa29ec9e812875a15f86c0a36c605b8a7258bf81f987bddb162077fde3ef2bd049afb80ae6
6
+ metadata.gz: f4ca3844173c6badc1dda2700b7ec074d4c269c2360375d900927f450cb0e5b60b30941025ab9f682abe6f736370ef56eb1f5a8bcd951b9be8f00351dddbcff5
7
+ data.tar.gz: 0e2ecae32df118e409d71142c1a99d2561f913e86975e073baa188753111abfe65c77fd220159f0ff8645bdf2bd1e3d26ff589808a8a50ecae418ca29fec99fb
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.2
1
+ 0.5.3
@@ -51,6 +51,8 @@ module FbGraph2
51
51
  Collection.new(raw).collect! do |_raw_|
52
52
  Message.new _raw_[:id], _raw_
53
53
  end
54
+ when :location
55
+ Struct::Location.new raw
54
56
  when :page
55
57
  Page.new raw[:id], raw
56
58
  when :pages
@@ -0,0 +1,12 @@
1
+ module FbGraph2
2
+ class Edge
3
+ module Domains
4
+ def domains(params = {})
5
+ domains = self.edge :domains, params
6
+ domains.collect! do |domain|
7
+ Domain.new(domain[:id], domain).authenticate self.access_token
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
@@ -7,6 +7,14 @@ module FbGraph2
7
7
  Struct::Score.new score
8
8
  end
9
9
  end
10
+
11
+ def score!(score, params = {})
12
+ self.post params.merge(score: score), edge: :scores
13
+ end
14
+
15
+ def unscore!(params = {})
16
+ self.delete params, edge: :scores
17
+ end
10
18
  end
11
19
  end
12
20
  end
@@ -46,6 +46,7 @@ module FbGraph2
46
46
  # NOTE: only as Struct::Education#classes and Struct::Work#projects
47
47
  :with
48
48
  ],
49
+ location: [:location],
49
50
  custom: [
50
51
  :category_list, :context, :location, :parking, :restaurant_services, :restaurant_specialties,
51
52
  # NOTE: undocumented
@@ -63,9 +64,6 @@ module FbGraph2
63
64
  if attributes.include? :context
64
65
  self.context = Struct::Context::PageContext.new attributes[:context]
65
66
  end
66
- if attributes.include? :location
67
- self.location = Struct::Location.new attributes[:location]
68
- end
69
67
  if attributes.include? :parking
70
68
  self.parking = Struct::Parking.new attributes[:parking]
71
69
  end
@@ -2,7 +2,7 @@ module FbGraph2
2
2
  class Struct
3
3
  class Location < Struct
4
4
  register_attributes(
5
- raw: [:country, :city, :longitude, :zip, :state, :street, :located_in, :latitude]
5
+ raw: [:city, :country, :latitude, :located_in, :longitude, :name, :region, :state, :street, :zip]
6
6
  )
7
7
  end
8
8
  end
@@ -7,6 +7,7 @@ module FbGraph2
7
7
  include Edge::Applications
8
8
  include Edge::AppRequests
9
9
  include Edge::Books
10
+ include Edge::Domains
10
11
  include Edge::Events
11
12
  include Edge::Family
12
13
  include Edge::Feed
@@ -41,9 +42,10 @@ module FbGraph2
41
42
 
42
43
  register_attributes(
43
44
  raw: [
44
- :about, :bio, :email, :first_name, :gender, :installed, :is_verified, :last_name, :link, :locale,
45
- :middle_name, :name, :name_format, :political, :quotes, :relationship_status, :religion,
46
- :timezone, :third_party_id, :token_for_business, :verified, :website,
45
+ :about, :bio, :email, :first_name, :gender, :install_type, :installed, :interested_in, :is_eligible_promo,
46
+ :is_shared_login, :is_verified, :last_name, :link, :locale, :meeting_for, :middle_name, :name, :name_format,
47
+ :political, :quotes, :relationship_status, :religion, :test_group, :third_party_id, :timezone, :token_for_business,
48
+ :verified, :viewer_can_send_gift, :website,
47
49
  # NOTE: in family edge context
48
50
  :relationship,
49
51
  # NOTE: in page admin context
@@ -54,21 +56,25 @@ module FbGraph2
54
56
  :x, :y
55
57
  ],
56
58
  time: [
57
- # NOTE: undocumented attribute
58
59
  :updated_time,
60
+ :shared_login_upgrade_required_by,
59
61
  # NOTE: in photo tags context
60
- :created_time
62
+ :created_time,
61
63
  ],
62
64
  date: [:birthday],
63
65
  page: [:hometown, :location],
64
- pages: [:favorite_athletes, :favorite_teams, :inspirational_people, :languages],
66
+ pages: [:favorite_athletes, :favorite_teams, :inspirational_people, :languages, :sports],
65
67
  user: [
66
68
  :significant_other,
67
69
  # NOTE: in photo tags context
68
70
  :tagging_user
69
71
  ],
70
72
  photo: [:cover],
71
- custom: [:age_range, :context, :currency, :devices, :education, :work]
73
+ location: [:address],
74
+ custom: [
75
+ :age_range, :context, :currency, :devices, :education, :payment_mobile_pricepoints, :payment_pricepoints,
76
+ :security_settings, :suggested_groups, :video_upload_limits, :work
77
+ ]
72
78
  )
73
79
 
74
80
  def initialize(id, attributes = {})
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.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - nov matake
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-03 00:00:00.000000000 Z
11
+ date: 2015-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient
@@ -198,6 +198,7 @@ files:
198
198
  - lib/fb_graph2/edge/declined.rb
199
199
  - lib/fb_graph2/edge/dispute.rb
200
200
  - lib/fb_graph2/edge/docs.rb
201
+ - lib/fb_graph2/edge/domains.rb
201
202
  - lib/fb_graph2/edge/events.rb
202
203
  - lib/fb_graph2/edge/family.rb
203
204
  - lib/fb_graph2/edge/feed.rb