Class: X::Topic
Overview
A topic a space is about
The API offers no lookup of topics, so a topic is read from the response of the space that expanded it, and the class answers no finder. from_id builds one from its identifier, which a topic the response did not expand is built as too, and which compares equal to the topic it identifies, but hydrate and refresh raise UnsupportedOperation for one that is not hydrated, since there is nothing to look it up with.
Constant Summary collapse
- FIELDS =
Every public topic field
A minor release may add to it the fields the API adds, so that a lookup asks for them too; see Resource#hydrated? for what that means for a resource looked up with a list of fields of its own.
%w[description id name].freeze
Instance Attribute Summary collapse
-
#description ⇒ String?
readonly
What the topic is about.
-
#name ⇒ String?
readonly
The name of the topic.
Class Method Summary collapse
-
.default_params ⇒ Hash{String => Array<String>}
The default query parameters, which request every field.
Constructor Details
This class inherits a constructor from X::Resource
Instance Attribute Details
#description ⇒ String? (readonly)
What the topic is about
57 |
# File 'x-objects/lib/x/objects/topic.rb', line 57 attribute :description |
#name ⇒ String? (readonly)
The name of the topic
49 |
# File 'x-objects/lib/x/objects/topic.rb', line 49 attribute :name |
Class Method Details
.default_params ⇒ Hash{String => Array<String>}
The default query parameters, which request every field
The API offers no lookup of topics, so they are requested by the spaces that expand them, which ask for these fields, and a topic a response included with all of them is hydrated.
30 |
# File 'x-objects/lib/x/objects/topic.rb', line 30 def self.default_params = {"topic.fields" => FIELDS} |