Class: SFRest::Theme
- Inherits:
-
Object
- Object
- SFRest::Theme
- Defined in:
- lib/sfrest/theme.rb
Overview
Tell the Factory that there is theme work to do
Instance Method Summary collapse
-
#initialize(conn) ⇒ Theme
constructor
A new instance of Theme.
-
#process_theme_notification(sitegroup_id = 0) ⇒ Object
Processes a theme notification.
-
#send_theme_notification(scope = 'site', event = 'modify', nid = 0, theme = '') ⇒ Object
Sends a theme notification.
Constructor Details
#initialize(conn) ⇒ Theme
Returns a new instance of Theme.
7 8 9 |
# File 'lib/sfrest/theme.rb', line 7 def initialize(conn) @conn = conn end |
Instance Method Details
#process_theme_notification(sitegroup_id = 0) ⇒ Object
Processes a theme notification.
21 22 23 24 25 |
# File 'lib/sfrest/theme.rb', line 21 def process_theme_notification(sitegroup_id = 0) current_path = '/api/v1/theme/process' payload = { 'sitegroup_id' => sitegroup_id }.to_json @conn.post(current_path, payload) end |
#send_theme_notification(scope = 'site', event = 'modify', nid = 0, theme = '') ⇒ Object
Sends a theme notification. rubocop:disable Metrics/ParameterLists
13 14 15 16 17 18 |
# File 'lib/sfrest/theme.rb', line 13 def send_theme_notification(scope = 'site', event = 'modify', nid = 0, theme = '') # rubocop:enable Metrics/ParameterLists current_path = '/api/v1/theme/notification' payload = { 'scope' => scope, 'event' => event, 'nid' => nid, 'theme' => theme }.to_json @conn.post(current_path, payload) end |