class SFRest::Theme

Tell the Factory that there is theme work to do

Public Class Methods

new(conn) click to toggle source

@param [SFRest::Connection] conn

# File lib/sfrest/theme.rb, line 7
def initialize(conn)
  @conn = conn
end

Public Instance Methods

process_theme_notification(sitegroup_id = 0) click to toggle source

Processes a theme notification.

# File lib/sfrest/theme.rb, line 19
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 = '') click to toggle source

Sends a theme notification.

# File lib/sfrest/theme.rb, line 12
def send_theme_notification(scope = 'site', event = 'modify', nid = 0, theme = '')
  current_path = '/api/v1/theme/notification'
  payload = { 'scope' => scope, 'event' => event, 'nid' => nid, 'theme' => theme }.to_json
  @conn.post(current_path, payload)
end