Method: Contentstack::Query#initialize
- Defined in:
- lib/contentstack/query.rb
permalink #initialize(content_type) ⇒ Contentstack::Query
Initialize the Query instance Example:
@query = @stack.content_type('blog').query
@entries = @query.where('author', 'John Doe').fetch
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/contentstack/query.rb', line 24 def initialize(content_type) @content_type = content_type @query = { query: "{}", include_count: false, skip: 0, count: 10, desc: 'created_at' } end |