Class: Kentico::Kontent::Delivery::Responses::DeliveryTaxonomyResponse
- Inherits:
-
ResponseBase
- Object
- ResponseBase
- Kentico::Kontent::Delivery::Responses::DeliveryTaxonomyResponse
- Defined in:
- lib/delivery/responses/delivery_taxonomy_response.rb
Overview
The response of a successful query for a taxonomy group. See github.com/Kentico/kontent-delivery-sdk-ruby#taxonomy
Instance Attribute Summary
Attributes inherited from ResponseBase
Instance Method Summary collapse
-
#initialize(response) ⇒ DeliveryTaxonomyResponse
constructor
A new instance of DeliveryTaxonomyResponse.
-
#taxonomy ⇒ Object
Parses the response from a Kentico::Kontent::Delivery::DeliveryClient.taxonomy call.
Methods inherited from ResponseBase
Constructor Details
#initialize(response) ⇒ DeliveryTaxonomyResponse
Returns a new instance of DeliveryTaxonomyResponse.
21 22 23 24 25 26 27 |
# File 'lib/delivery/responses/delivery_taxonomy_response.rb', line 21 def initialize(response) @response = response super 200, "Success, '#{taxonomy.system.codename}' returned", JSON.generate(@response) end |
Instance Method Details
#taxonomy ⇒ Object
Parses the response from a Kentico::Kontent::Delivery::DeliveryClient.taxonomy call.
-
Returns:
-
Kentico::Kontent::Delivery::TaxonomyGroup
-
16 17 18 19 |
# File 'lib/delivery/responses/delivery_taxonomy_response.rb', line 16 def taxonomy @taxonomy unless @taxonomy.nil? @taxonomy = Kentico::Kontent::Delivery::TaxonomyGroup.new(@response) end |