-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Want to get card data. Found one solution. But want to ask if there is a proper way?
client = Metabase::Client.new(
url: 'domain',
token: "token"
)
client.current_user
# Sniffer.enable! for debugging gem
parameters = [{"type":"string/=","value":["SOME"],"target":["dimension",["template-tag","property"]]}.deep_stringify_keys]
client.query_card(4329, format: :json, parameters: parameters.to_json)
AND
in lib/metabase/connection.rb
comment one line
def connection
@connection ||= Faraday.new(url: @url) do |c|
c.response :logger, ::Logger.new(STDOUT), bodies: true
# c.request :json, content_type: /\bjson$/
c.response :json, content_type: /\bjson$/
c.request :url_encoded, content_type: /x-www-form-urlencoded/
c.adapter Faraday.default_adapter
c.headers['User-Agent'] =
"MetabaseRuby/#{VERSION} (#{RUBY_ENGINE}#{RUBY_VERSION})"
end
end
Metadata
Metadata
Assignees
Labels
No labels