Class: SFRest::Theme

Inherits:
Object
  • Object
show all
Defined in:
lib/sfrest/theme.rb

Overview

Tell the Factory that there is theme work to do

Instance Method Summary collapse

Constructor Details

#initialize(conn) ⇒ Theme

Returns a new instance of Theme.

Parameters:



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