class Contentful::Link

Resource Class for Links www.contentful.com/developers/documentation/content-delivery-api/#links

Public Instance Methods

resolve(client, query = {}) click to toggle source

Queries contentful for the Resource the Link is refering to Takes an optional query hash

# File lib/contentful/link.rb, line 9
def resolve(client, query = {})
  id_and_query = [(id unless link_type == 'Space')].compact + [query]
  client.public_send(
    Contentful::Support.snakify(link_type).to_sym,
    *id_and_query
  )
end