Class: OpenC3::CalendarTopic

Inherits:
Topic show all
Defined in:
lib/openc3/topics/calendar_topic.rb

Constant Summary collapse

PRIMARY_KEY =
'__openc3_calendar'.freeze

Class Method Summary collapse

Methods inherited from Topic

clear_topics, get_cnt, method_missing

Class Method Details

.write_entry(entry, scope:) ⇒ Object

Write an activity to the topic

“‘json

{
  "type" => "metadata",
  "kind" => "created",
  "metadata" => {
    "target" => "FOO",
    "start" => 1621875570,
    "color" => "#FF0000",
    "metadata" => {"test"=>"123456"}
  },
}

“‘



43
44
45
# File 'lib/openc3/topics/calendar_topic.rb', line 43

def self.write_entry(entry, scope:)
  Topic.write_topic("#{scope}#{PRIMARY_KEY}", entry, '*', 1000)
end