class ContentfulModel::Asset
Module for providing querying capabilities to Asset
Public Class Methods
all(query = {})
click to toggle source
# File lib/contentful_model/asset.rb, line 9 def all(query = {}) client.assets(query) end
client()
click to toggle source
# File lib/contentful_model/asset.rb, line 17 def client if ContentfulModel.use_preview_api @preview_client ||= ContentfulModel::Client.new( ContentfulModel.configuration.to_hash ) else @client ||= ContentfulModel::Client.new( ContentfulModel.configuration.to_hash ) end end
find(id)
click to toggle source
# File lib/contentful_model/asset.rb, line 13 def find(id) client.asset(id) end