mogli 0.0.36 → 0.0.37
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mogli/application.rb +2 -2
- data/lib/mogli/client.rb +1 -1
- data/lib/mogli/comment.rb +4 -4
- data/lib/mogli/status.rb +3 -1
- data/lib/mogli/user.rb +5 -1
- metadata +6 -8
data/lib/mogli/application.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Mogli
|
2
2
|
class Application < Model
|
3
3
|
|
4
|
-
define_properties :id, :name, :description, :category, :subcategory, :link, :canvas_name
|
4
|
+
define_properties :id, :name, :description, :category, :subcategory, :link, :canvas_name, :namespace, :icon_url, :logo_url, :weekly_active_users, :monthly_active_users
|
5
5
|
|
6
6
|
has_association :feed, "Post"
|
7
7
|
has_association :posts, "Post"
|
@@ -10,4 +10,4 @@ module Mogli
|
|
10
10
|
|
11
11
|
|
12
12
|
end
|
13
|
-
end
|
13
|
+
end
|
data/lib/mogli/client.rb
CHANGED
@@ -212,12 +212,12 @@ module Mogli
|
|
212
212
|
end
|
213
213
|
|
214
214
|
def raise_error_if_necessary(data)
|
215
|
-
raise HTTPException if data.respond_to?(:code) and data.code != 200
|
216
215
|
if data.kind_of?(Hash)
|
217
216
|
if data.keys.size == 1 and data["error"]
|
218
217
|
self.class.raise_error_by_type_and_message(data["error"]["type"], data["error"]["message"])
|
219
218
|
end
|
220
219
|
end
|
220
|
+
raise HTTPException if data.respond_to?(:code) and data.code != 200 and data.code != 400
|
221
221
|
end
|
222
222
|
|
223
223
|
def fields_to_serialize
|
data/lib/mogli/comment.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
module Mogli
|
2
2
|
class Comment < Model
|
3
|
-
|
4
|
-
define_properties :id, :message, :created_time, :count, :likes
|
3
|
+
|
4
|
+
define_properties :id, :message, :created_time, :count, :likes, :can_remove, :message_tags, :user_likes
|
5
5
|
creation_properties :message
|
6
6
|
hash_populating_accessor :from, "User","Page"
|
7
|
-
|
7
|
+
|
8
8
|
end
|
9
|
-
end
|
9
|
+
end
|
data/lib/mogli/status.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
module Mogli
|
2
2
|
class Status < Model
|
3
|
-
define_properties :id, :message, :updated_time, :created_time
|
3
|
+
define_properties :id, :message, :updated_time, :created_time, :likes
|
4
4
|
|
5
5
|
hash_populating_accessor :from, "User", "Page"
|
6
|
+
|
7
|
+
has_association :comments, "Comment"
|
6
8
|
end
|
7
9
|
end
|
data/lib/mogli/user.rb
CHANGED
@@ -43,6 +43,9 @@ module Mogli
|
|
43
43
|
# application. the list should be kept in sync with
|
44
44
|
# http://developers.facebook.com/docs/authentication/permissions
|
45
45
|
ALL_EXTENDED_PERMISSIONS = [
|
46
|
+
# timeline
|
47
|
+
:publish_actions,
|
48
|
+
|
46
49
|
# publishing permissions
|
47
50
|
:publish_stream,
|
48
51
|
:create_event,
|
@@ -81,6 +84,7 @@ module Mogli
|
|
81
84
|
:xmpp_login,
|
82
85
|
:ads_management,
|
83
86
|
:user_checkins,
|
87
|
+
:friends_likes,
|
84
88
|
|
85
89
|
# page permissions
|
86
90
|
:manage_pages
|
@@ -112,7 +116,7 @@ module Mogli
|
|
112
116
|
"FROM permissions " +
|
113
117
|
"WHERE uid = #{self.id}"
|
114
118
|
@extended_permissions = {}
|
115
|
-
perms_query_result = client.fql_query(fql).
|
119
|
+
perms_query_result = client.fql_query(fql).first
|
116
120
|
ALL_EXTENDED_PERMISSIONS.each do |perm|
|
117
121
|
@extended_permissions[perm] = (perms_query_result[perm.to_s] == 1)
|
118
122
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mogli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 85
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 37
|
10
|
+
version: 0.0.37
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mike Mangino
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
19
|
-
default_executable:
|
18
|
+
date: 2011-12-23 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: hashie
|
@@ -186,7 +185,6 @@ files:
|
|
186
185
|
- spec/spec_helper.rb
|
187
186
|
- spec/test_user_spec.rb
|
188
187
|
- spec/user_spec.rb
|
189
|
-
has_rdoc: true
|
190
188
|
homepage: http://developers.facebook.com/docs/api
|
191
189
|
licenses: []
|
192
190
|
|
@@ -216,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
216
214
|
requirements: []
|
217
215
|
|
218
216
|
rubyforge_project:
|
219
|
-
rubygems_version: 1.
|
217
|
+
rubygems_version: 1.8.8
|
220
218
|
signing_key:
|
221
219
|
specification_version: 3
|
222
220
|
summary: Open Graph Library for Ruby
|