Class: Contentful::Management::Link
- Inherits:
-
Object
- Object
- Contentful::Management::Link
- Includes:
- Resource, Resource::SystemProperties
- Defined in:
- lib/contentful/management/link.rb
Overview
Resource Class for Links www.contentful.com/developers/documentation/content-delivery-api/#links
Instance Attribute Summary
Attributes included from Resource::SystemProperties
Attributes included from Resource
#client, #default_locale, #properties, #raw_object, #request
Instance Method Summary collapse
-
#resolve(query = {}) ⇒ Object
Queries contentful for the Resource the Link is referring to.
Methods included from Resource
#array?, #destroy, #fields, #nested_locale_fields?, #resource?, #sys, #update
Instance Method Details
#resolve(query = {}) ⇒ Object
Queries contentful for the Resource the Link is referring to
13 14 15 16 17 18 19 |
# File 'lib/contentful/management/link.rb', line 13 def resolve(query = {}) id_and_query = [(id unless link_type == 'Space')].compact + [query] client.public_send( Contentful::Management::Support.snakify(link_type).to_sym, *id_and_query ) end |