Class: Redash::Query

Inherits:
Object
  • Object
show all
Defined in:
lib/redash/query.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Query

Returns a new instance of Query.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/redash/query.rb', line 10

def initialize(attrs = {})
  @id = attrs['id']
  @latest_query_data_id = attrs['latest_query_data_id']
  @name = attrs['name']
  @description = attrs['description']
  @query = attrs['query']
  @query_hash = attrs['query_hash']
  @schedule = attrs['schedule']
  @api_key = attrs['api_key']
  @is_archived = attrs['is_archived']
  @is_draft = attrs['is_draft']
  @updated_at = attrs['updated_at']
  @created_at = attrs['created_at']
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



5
6
7
# File 'lib/redash/query.rb', line 5

def api_key
  @api_key
end

#created_atObject

Returns the value of attribute created_at.



5
6
7
# File 'lib/redash/query.rb', line 5

def created_at
  @created_at
end

#descriptionObject

Returns the value of attribute description.



5
6
7
# File 'lib/redash/query.rb', line 5

def description
  @description
end

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/redash/query.rb', line 5

def id
  @id
end

#is_archivedObject

Returns the value of attribute is_archived.



5
6
7
# File 'lib/redash/query.rb', line 5

def is_archived
  @is_archived
end

#is_draftObject

Returns the value of attribute is_draft.



5
6
7
# File 'lib/redash/query.rb', line 5

def is_draft
  @is_draft
end

#latest_query_data_idObject

Returns the value of attribute latest_query_data_id.



5
6
7
# File 'lib/redash/query.rb', line 5

def latest_query_data_id
  @latest_query_data_id
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/redash/query.rb', line 5

def name
  @name
end

#queryObject

Returns the value of attribute query.



5
6
7
# File 'lib/redash/query.rb', line 5

def query
  @query
end

#query_hashObject

Returns the value of attribute query_hash.



5
6
7
# File 'lib/redash/query.rb', line 5

def query_hash
  @query_hash
end

#scheduleObject

Returns the value of attribute schedule.



5
6
7
# File 'lib/redash/query.rb', line 5

def schedule
  @schedule
end

#updated_atObject

Returns the value of attribute updated_at.



5
6
7
# File 'lib/redash/query.rb', line 5

def updated_at
  @updated_at
end