Class: Embulk::Input::Redash::Client
- Inherits:
-
Object
- Object
- Embulk::Input::Redash::Client
- Defined in:
- lib/embulk/input/redash/client.rb
Overview
Redash API client
Class Method Summary collapse
Class Method Details
.get_rows(url, api_key) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/embulk/input/redash/client.rb', line 8 def self.get_rows(url, api_key) res = RestClient.get(url, params: { api_key: api_key }) data = JSON.parse(res.body) data['query_result']['data']['rows'] end |