Class: Facebooker::Admin
- Inherits:
-
Object
- Object
- Facebooker::Admin
- Defined in:
- lib/facebooker/admin.rb
Instance Method Summary (collapse)
-
- (Object) get_allocation(integration_point)
Integration points include..
-
- (Object) get_app_properties(*properties)
** BETA *** properties: Hash of properties you want to view.
-
- (Object) get_restriction_info(*restrictions)
** BETA ***.
-
- (Admin) initialize(session)
constructor
A new instance of Admin.
-
- (Object) set_app_properties(properties)
** BETA *** properties: Hash of properties you want to set.
-
- (Object) set_restriction_info(restrictions)
** BETA *** restrictions: Hash of restrictions you want to set.
Constructor Details
- (Admin) initialize(session)
A new instance of Admin
3 4 5 |
# File 'lib/facebooker/admin.rb', line 3 def initialize(session) @session = session end |
Instance Method Details
- (Object) get_allocation(integration_point)
Integration points include..
:notifications_per_day, :requests_per_day, :emails_per_day, :email_disable_message_location
38 39 40 |
# File 'lib/facebooker/admin.rb', line 38 def get_allocation(integration_point) @session.post('facebook.admin.getAllocation', :integration_point_name => integration_point.to_s).to_i end |
- (Object) get_app_properties(*properties)
** BETA *** properties: Hash of properties you want to view.
16 17 18 19 20 |
# File 'lib/facebooker/admin.rb', line 16 def get_app_properties(*properties) json = @session.post('facebook.admin.getAppProperties', :properties => properties.to_json) hash = Facebooker.json_decode(CGI.unescapeHTML(json)) @properties = ApplicationProperties.from_hash(hash) end |
- (Object) get_restriction_info(*restrictions)
** BETA ***
30 31 32 33 34 |
# File 'lib/facebooker/admin.rb', line 30 def get_restriction_info(*restrictions) json = @session.post('facebook.admin.getRestrictionInfo') hash = Facebooker.json_decode(CGI.unescapeHTML(json)) @restrictions = ApplicationRestrictions.from_hash(hash) end |
- (Object) set_app_properties(properties)
** BETA *** properties: Hash of properties you want to set
9 10 11 12 |
# File 'lib/facebooker/admin.rb', line 9 def set_app_properties(properties) properties = properties.respond_to?(:to_json) ? properties.to_json : properties (@session.post 'facebook.admin.setAppProperties', :properties => properties) == '1' end |
- (Object) set_restriction_info(restrictions)
** BETA *** restrictions: Hash of restrictions you want to set.
24 25 26 27 |
# File 'lib/facebooker/admin.rb', line 24 def set_restriction_info(restrictions) restrictions = restrictions.respond_to?(:to_json) ? restrictions.to_json : restrictions (@session.post 'facebook.admin.setRestrictionInfo', :restriction_str => restrictions) == '1' end |