Class: MetricsApi::V3::Endpoints::Facets
- Inherits:
-
Object
- Object
- MetricsApi::V3::Endpoints::Facets
- Defined in:
- app/services/metrics_api/v3/endpoints/facets.rb
Overview
Facets endpoint. Returns a list of display_collection names
Instance Attribute Summary collapse
-
#primary_key ⇒ Object
readonly
Returns the value of attribute primary_key.
Instance Method Summary collapse
-
#call ⇒ Object
TODO: Better way of collecting display_collection names.
-
#initialize ⇒ Facets
constructor
All endpoints take in a params hash, this endpoint has no params however.
Constructor Details
#initialize ⇒ Facets
All endpoints take in a params hash, this endpoint has no params however
10 11 12 13 14 |
# File 'app/services/metrics_api/v3/endpoints/facets.rb', line 10 def initialize(*) # TODO: maybe this should be a global metrics config? There are now 3+ locations you would need # to update the primary key for metrics @primary_key = 'display_collection' end |
Instance Attribute Details
#primary_key ⇒ Object (readonly)
Returns the value of attribute primary_key.
7 8 9 |
# File 'app/services/metrics_api/v3/endpoints/facets.rb', line 7 def primary_key @primary_key end |
Instance Method Details
#call ⇒ Object
TODO: Better way of collecting display_collection names
17 18 19 |
# File 'app/services/metrics_api/v3/endpoints/facets.rb', line 17 def call SupplejackApi::FacetsHelper.get_list_of_facet_values(primary_key) end |