Class: Mogli::Profile

Inherits:
Model
  • Object
show all
Defined in:
lib/mogli/profile.rb

Direct Known Subclasses

Page, User

Instance Attribute Summary

Attributes inherited from Model

#type

Attributes included from Model::Search

#search_type

Instance Method Summary collapse

Methods inherited from Model

#==, add_creation_method, #client, #client=, creation_keys, creation_properties, define_properties, #destroy, #fetch, find, has_association, hash_populating_accessor, included, #initialize, #merge!, #method_missing, #post_params, property, recognize?, #warn_about_invalid_property

Methods included from Model::Search

#search

Constructor Details

This class inherits a constructor from Mogli::Model

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Mogli::Model

Instance Method Details

#image_urlObject

Facebook’s defaults image url, which seems to be the same as square_image_url at this time



21
22
23
# File 'lib/mogli/profile.rb', line 21

def image_url
  "https://graph.facebook.com/#{id}/picture"
end

#large_image_urlObject

About 200 pixels wide, variable height image url



36
37
38
# File 'lib/mogli/profile.rb', line 36

def large_image_url
  "#{image_url}?type=large"
end

#small_image_urlObject

50 pixels wide, variable height image url



31
32
33
# File 'lib/mogli/profile.rb', line 31

def small_image_url
  "#{image_url}?type=small"
end

#square_image_urlObject

50x50 pixel image url



26
27
28
# File 'lib/mogli/profile.rb', line 26

def square_image_url
  "#{image_url}?type=square"
end

#to_sObject



40
41
42
# File 'lib/mogli/profile.rb', line 40

def to_s
  name
end