lib/fb_graph/node.rb in fb_graph-1.6.5 vs lib/fb_graph/node.rb in fb_graph-1.6.7
- old
+ new
@@ -23,12 +23,15 @@
def connection(connection, options = {})
collection = options[:cached_collection] || Collection.new(get(options.merge(:connection => connection)))
Connection.new(self, connection, options.merge(:collection => collection))
end
+ def update(options = {})
+ post(options)
+ end
+
def destroy(options = {})
- options[:access_token] ||= self.access_token if self.access_token
delete(options)
end
protected
@@ -105,10 +108,10 @@
_response_.map!(&:with_indifferent_access)
when Hash
_response_ = _response_.with_indifferent_access
if _response_[:error]
case _response_[:error][:type]
- when 'OAuthAccessTokenException', 'QueryParseException', 'OAuthInvalidRequestException', 'OAuthInvalidTokenException', 'OAuthException'
+ when /OAuth/
raise Unauthorized.new(_response_[:error][:message])
else
raise BadRequest.new("#{_response_[:error][:type]} :: #{_response_[:error][:message]}")
end
else
\ No newline at end of file