Basic structure of schema parsing complete.

* Note that additionalProperties fields are not currently supported and may
  only be accessed in raw form. Shouldn't be a big deal because only the Buzz
  API uses them extensively.
This commit is contained in:
Bob Aman committed 2011-08-10 16:48:22 -04:00
1 parent d9a108415b
commit 27ae32d2e7
3 files changed
+145 -100

No files matched your search

+5 -4
View File
@@ -62,7 +62,10 @@ module Google
#
# @return [String] The service id.
def id
return @discovery_document['id']
return (
@discovery_document['id'] ||
"#{self.name}:#{self.version}"
)
end
##
@@ -160,9 +163,7 @@ module Google
def schemas
return @schemas ||= (
(@discovery_document['schemas'] || []).inject({}) do |accu, (k, v)|
accu[k] = Google::APIClient::Schema.new(
self, self.name, self.version, v
)
accu[k] = Google::APIClient::Schema.parse(self, v)
accu
end
)