Method: OpenC3::NoteModel.notify

Defined in:
lib/openc3/models/note_model.rb

.notify(scope:, kind:, start:, stop: nil) ⇒ Object



36
37
38
39
40
41
42
43
44
45
# File 'lib/openc3/models/note_model.rb', line 36

def self.notify(scope:, kind:, start:, stop: nil)
  json = {'type' => NOTE_TYPE, 'start' => start}
  json['stop'] = stop if stop
  notification = {
    'data' => JSON.generate(json),
    'kind' => kind,
    'type' => 'calendar',
  }
  CalendarTopic.write_entry(notification, scope: scope)
end