qoobaa-opensocial 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/opensocial/person.rb +4 -3
- data/lib/opensocial/version.rb +1 -1
- metadata +10 -10
data/lib/opensocial/person.rb
CHANGED
@@ -87,7 +87,8 @@ module OpenSocial #:nodoc:
|
|
87
87
|
# Defines the service fragment for use in constructing the request URL or
|
88
88
|
# JSON
|
89
89
|
SERVICE = "people"
|
90
|
-
|
90
|
+
@@default_fields = [:id, :dateOfBirth, :name, :emails, :gender, :state, :postalCode, :ethnicity, :relationshipStatus, :thumbnailUrl, :displayName]
|
91
|
+
cattr_accessor :default_fields
|
91
92
|
|
92
93
|
# Initializes a request to the specified user, or the default (@me, @self).
|
93
94
|
# A valid Connection is not necessary if the request is to be used as part
|
@@ -99,7 +100,7 @@ module OpenSocial #:nodoc:
|
|
99
100
|
# Sends the request, passing in the appropriate SERVICE and specified
|
100
101
|
# instance variables.
|
101
102
|
def send
|
102
|
-
json = send_request(SERVICE, @guid, @selector, nil, false, :fields =>
|
103
|
+
json = send_request(SERVICE, @guid, @selector, nil, false, :fields => @@default_fields.join(","))
|
103
104
|
|
104
105
|
return parse_response(json["entry"])
|
105
106
|
end
|
@@ -156,7 +157,7 @@ module OpenSocial #:nodoc:
|
|
156
157
|
# Sends the request, passing in the appropriate SERVICE and specified
|
157
158
|
# instance variables.
|
158
159
|
def send
|
159
|
-
@extra_fields[:fields] ||= FetchPersonRequest
|
160
|
+
@extra_fields[:fields] ||= FetchPersonRequest.default_fields.join(",")
|
160
161
|
json = send_request(SERVICE, @guid, @selector, nil, false, @extra_fields)
|
161
162
|
|
162
163
|
return parse_response(json["entry"])
|
data/lib/opensocial/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qoobaa-opensocial
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 2
|
10
|
+
version: 0.2.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Jakub Ku\xC5\xBAma"
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-
|
19
|
+
date: 2010-07-29 00:00:00 +02:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -98,15 +98,15 @@ extensions: []
|
|
98
98
|
extra_rdoc_files: []
|
99
99
|
|
100
100
|
files:
|
101
|
-
- lib/opensocial.rb
|
102
|
-
- lib/opensocial/base.rb
|
103
|
-
- lib/opensocial/person.rb
|
104
|
-
- lib/opensocial/version.rb
|
101
|
+
- lib/opensocial/request.rb
|
105
102
|
- lib/opensocial/activity.rb
|
106
|
-
- lib/opensocial/
|
103
|
+
- lib/opensocial/version.rb
|
107
104
|
- lib/opensocial/appdata.rb
|
108
|
-
- lib/opensocial/request.rb
|
109
105
|
- lib/opensocial/connection.rb
|
106
|
+
- lib/opensocial/group.rb
|
107
|
+
- lib/opensocial/person.rb
|
108
|
+
- lib/opensocial/base.rb
|
109
|
+
- lib/opensocial.rb
|
110
110
|
- LICENSE
|
111
111
|
- NOTICE
|
112
112
|
- README.rdoc
|