Module: Databasedotcom::Chatter::PhotoMethods
Overview
Defines methods for entities that can have photos i.e. Users, Groups.
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
-
#delete_photo ⇒ Object
Deletes the photo for this resource.
-
#photo ⇒ Object
Returns a Hash with urls for the small and large versions of the photo for this resource.
-
#upload_photo(io, file_type) ⇒ Object
Uploads a photo for this resource.
Class Method Details
.included(base) ⇒ Object
5 6 7 |
# File 'lib/databasedotcom/chatter/photo_methods.rb', line 5 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#delete_photo ⇒ Object
Deletes the photo for this resource.
49 50 51 52 |
# File 'lib/databasedotcom/chatter/photo_methods.rb', line 49 def delete_photo self.class.delete_photo(self.client, self.id) photo end |
#photo ⇒ Object
36 37 38 |
# File 'lib/databasedotcom/chatter/photo_methods.rb', line 36 def photo self.raw_hash["photo"] end |
#upload_photo(io, file_type) ⇒ Object
44 45 46 |
# File 'lib/databasedotcom/chatter/photo_methods.rb', line 44 def upload_photo(io, file_type) self.class.upload_photo(self.client, self.id, io, file_type) end |